Temperature & Humidity Sensor


Buy Project Parts

Another New Year resolution! Be sure that your filament is stored properly by monitoring the temperature and humidity of the storage area or bins!

This month came with:

  • Arduino Nano with USB cord
  • Temperature & Humidity module
  • 16x2 LCD with module & potentiometer
  • Prototype breadboard with sticky back
  • 6 Male to male wires

Download Arduino Project Code

Note, if you'd like to change the Celsius to Fahrenheit you can edit the following code in the Arduino project file (Thank you to Mark Rink!)

//lcd.print("C");
lcd.print("F");

and

//lcd.print(i[2]);
lcd.print((int)round(1.8*i[2]+32));

Download LCD Screen Driver 1.3.5

Download 3D Printable Case Files

Alternative case by Tony Nunez / Casa Del Whacos: https://www.thingiverse.com/thing:3352002

  1. Place Arduino into breadboard, straddling the center break
  2. Arduino 5v pin to + on breadboard
  3. Arduino GND pin to - on breadboard
  4. Place 4 pins of LCD screen starting in the last row, and in the last column before the center break (note, you will need to bend the pins out so they're at 90 degrees. To do this, I put them all in the last row of the breadboard and then bent them all at once)
  5. 1st row of LCD is GND, connect wire on breadboard -
  6. 2nd row of LCD is VCC, connect wire to + on breadboard
  7. 3rd row of LCD is SDA, use wire to connect to breadboard corresponding to Arduino pin A4
  8. 4th row of LCS is SCL, use wire to connect to breadboard corresponding to Arduino pin A5
  9. Connect female to female wires to temp & humidity sensor, Brown to +, Red to Out, Orange to -
  10. Connect the other end of the female to female wires to the Arduino ICSP pins on the 2nd row... Orange on the Left, Red to Center, Brown to Right pin.

Wiring is complete!

Programming the Arduino:

I am using Arduino IDE 1.8.5. I have seen that with newer versions, there are "new" and "old" bootloaders. So in the step to select the processor, if the 328p doesn't work, try the 328p (old bootloader). If that also doesn't work, check in the Device Manager that the Nano is actually being recognized and being assigned a COM port. If it's listed under unknown or other devices, try installing the drivers from https://www.ftdichip.com/Drivers/D2XX.htm

  1. Fire up Arduino IDE
  2. Download the project code above and open the project file in Arduino IDE
  3. Download the LCD Screen Driver, then go to Sketch > Include Library > Include ZIP Library, find the downloaded LCD zip file and include it.
  4. Go to Tools > Board > Select Arduino Nano
  5. Go to Tools > Processor > Select ATMega328P
  6. Go to Tools > Port and make note of what ports are listed
  7. Plug in the Arduino Nano to a USB port
  8. Go back to Tools > Port and select the new port that has shown up.
  9. Click the Upload button, and... after compiling and uploading...
  10. You should have a working Temperature and Humidity sensor!

Construct the case:

The case is designed so you can run the wires of the temperature/humidity sensor through the back, and then has a lip so that you can cut out a square in a plastic tub and seal the case lip to the tub. Use silicone or E6000, also plug the wire hole.

  1. Align the assembled electronics so that the Micro USB of the Nano is flush to the bottom port to be able to plug in the USB cord.
  2. Peel the sticky cover off the breadboard and stick it to the inside of the case.
  3. Run the wires of the temp/humidity sensor 1 at a time through the small hole in the back.
  4. Snap the top onto the case. (May have to bend some pins for the top to sit flush)
  5. Optional: Glue/Silicone the case through a hole in a plastic tub to use it as a dry box and monitor the humidity/temp of your drybox =)
Image

Leave a Reply