Skip to content

Latest commit

 

History

History

FreezerTempAlert

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

IoT Freezer Temperature Monitor

This tutorial covers everything you'll need to build and run your own freezer temperature monitor and alert system. We'll cover how to build the device, setting up a free online database, flashing code onto the device, monitoring the database and sending email alerts. The components used in this project can measure temperatures as low as -200 celsius.

This project takes about 60 to 90 minutes to build.

Materials and Tech

Materials Description Vendor
Adafruit Feather Huzzah32 (a) WiFi enabled ESP32 based prototyping board Adafruit
Adafruit MCP9600 (b) I2C Thermocouple amplifier Adafruit
Adafruit Type K Thermocouple (c) 2 wire thermocouple effective temperature ranger -200c to 800c +/-2c Adafruit
Jumper Wires (d) Adafruit
Breadboard (e) Adafruit
Micro USB cable Used to power the ESP32 board Adafruit
USB Power Supply Adafruit
Software Description Link
AdafruitIO Online database https://adafruit.io
IFTTT Online automation platform http://ifttt.com
Tools
00 Philips Head Screw Driver
Soldering Iron

Picture of all the materials used in the project

Prerequisites

  1. AdafruitIO account, you can sign up for free account here
  2. IFTTT Account, you can join IFTTT here

Build

  1. Solder the screw terminal to the top side of your MCP9600.

  2. Solder the pins to the bottom side of the MCP9600.

    Tip: Put the pins in the breadboard to hold them in place when soldering.

  3. Insert the ESP32 and thermocouple amplifier into the breadboard.

  4. Follow the wiring diagram below to connect the thermocouple amplifier to the ESP32 using your jumper wires.

  5. Connect the Thermocouple to the screw terminals on the MCP9600

    The picture below use a generic ESP32 Dev board, new picture with the Adafruit Huzzah32 coming soon!

Code

Clone this repo to your computer, or you can download the directory for this project here

Once you downloaded the project files you'll need to create a config.h file and fill in your AdafruitIO and WiFi credentials.

  1. In the FreezerTempAlert folder create a new text file called config.h

  2. Copy and paste the code below into that that file and save:

    /************************ Adafruit IO Config *******************************/
    
    // visit io.adafruit.com if you need to create an account,
    // or if you need your Adafruit IO key.
    #define IO_USERNAME "your-username"
    #define IO_KEY "your-key"
    
    /******************************* WIFI **************************************/
    
    #define WIFI_SSID "your-ssid"
    #define WIFI_PASS "your-password"
    
    #include "AdafruitIO_WiFi.h"
    
    AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
  3. Find your Adafruit IO credentials in the top right corner of the Adafruit IO webpage. Adafruit IO Webpage

  4. Copy and paste them in here between the quotes:

    #define IO_USERNAME "your_username"
    #define IO_KEY "your_key"

    Remember to treat your key like a password

  5. Next you will need to add the WiFi SSID, or network name, and the password. Note: The code doesn't support WiFi networks that use a captive portal.

    #define WIFI_SSID "your_ssid"
    #define WIFI_PASS "your_pass"
  6. Open FreezerTempAlert.ino and change the threshold temperature to the temperature you wanted to be alerted at. The default temperature is -50 celsius.

    // Set the temperature you want to be alerted at
    const float thresholdTemperature = -50;

Flashing the code

  1. Follow the first section of this guide to add the ESP32 extension to the Arduino IDE.

  2. Install the libraries listed below using Arduino's Library manager. If you have used the library manager before here is a helpful guide.

    1. Adafruit IO Arduino
    2. Adafruit MCP9600

    Note: If you're prompted to install other dependencies for these libraries, select Install All

  3. With FreezerTempAlert.ino open in the Arduino IDE select Tools>Board>Adafruit ESP32 Feather

  4. Select the active COM Port in Tools>Port

  5. Press the Upload button
    Arduino upload button

    Note: If you output monitor prints out Connecting......._____ you'll need to press the boot button on your ESP32 board. You may have to press boot more than once for it to work.

  6. Open the Arduino serial monitor to verify that everything is working properly on the board.

  7. Go back to Adafruit.io and check that both the temperature feed and the temp_alert feed were created.

Setting up IFTTT

You'll use If This Than That (IFTTT) to set up automated alerts to your email any time the temperatures goes above a threshold. The threshold is set to -50c by default.

  1. Log in to your IFTTT account and press the Create button in the top navigation.
  2. Select the + button to add a trigger.
  3. Search for Adafruit
  4. Follow the prompts to connect and authenticate your Adafruit IO account.
  5. Once your account is connected choose the Any new data trigger.
  6. Select temp_alert from the drop down menu.
  7. Select the next + to set your action.
  8. Scroll down or search for the Email action

    If this is the first time you're using the email action a pin will be sent to you to confirm that you are the owner of the email account.

  9. Customized the email message and select create action
  10. Finally select finish, your IFTTT service is ready to go.

Installing

Now that you project is built and your services are setup you can install the thermocouple in the freezer. You can use a binder clip or a magnet to keep it in place. The ESP32 board should be kept outside the freezer. Many breadboards come with an adhesive back, you can use that to secure your project to the side of the freezer.