This project came about from a need to monitor temperatures in working areas, as well as signaling when temperatures reach given thresholds. Some research based on temperature exposure limits by OSHA helped to make it practical. Now that it's complete, there's certainly ways for me to improve it, but as a as a proof of concept it worked out quite well.
Step 1: Things You Need:
Surprisingly, most of the things involved you can find in many of the arduino starter kits from places such as Amazon or Ebay.
- Uno Board
- LCD1602 module
- 10k ohm potentiometer for lcd back light
- Mini breadboard (17x5+5 pins)
- DHT11 sensor (I used one already on a board)
- Passive Buzzer
- RGB LED
- 220 ohm resistors x3
- M-M jumpers
- M-F jumpers
- 9-volt Battery
- 9-volt holder with barrel jack
- Enclosure for everything (I 3d printed mine out of black PLA)
- Screws for mounting stuff
- USB cable for programming board
Step 2: Wiring the Miniboard
First, we'll set up the miniboard first, that way we arent fighting jumper wires later to get components slotted in. To get started, take the 10k pot and orient it so that the single pin/output is facing you. Insert it into the breadboard so that the single pin is on one half, and the two pins are on the other. Next, grab the DHT11 sensor and add that to the board on the top half with the sensor turned away from you. This way, the pin order starting on the left is ground, vin, and data. Lastly, take the buzzer and fit that to the board as well. Note, because of how the pins are spaced on the bottom of it, in order to fit, you'll need to slightly turn the buzzer so that it's going into the board at an L shape between the pins (think chess knight movement).
Next, you'll need 8 M-M jumpers, 6 short (2 red, 4 black) and 2 long ones (I used yellow and brown). Using the top left corner, above the pot, labeling that as A1 with the bottom right as J17, we'll start with the ground wires.
- Insert a short black jumper from D1 to F17
- followed by E7 to G17
- and E14 to H17
- finally I17 to F13
For the red jumpers, our VINs-
- E8 to F15
- D3 to G15
Lastly, the jumpers to lead back to the arduino-
- Yellow wire to E9
- Brown wire to E16
Once you have the long jumpers on the miniboard, make sure they're threaded so that they lay towards you. Set this off to the side.
Step 3: Set Up LCD and LED
For this step you'll need 16 M-F jumpers, preferably all long, the three 220 ohm resistors, RGB LED, LCD module, enclosure top, and some screws. Have the arduino on hand as well. Forgive how convoluted the pictures for this step are, didnt think to take pictures before everything was assembled.
I found it easier to attach the lcd to the lid before wiring it all up, but YMMV. Whether you decide to do the same or not, flip the lcd over so that the pin header is facing "up." Starting all the way at the right with the first pin, attach 3 M-F jumpers and tuck them out of the way. The fourth pin you'll connect to pin 7 on the arduino. The 5th pin on the lcd will be another one that you'll tuck out of the way. Connect the lcd's 6th pin to arduino pin 8. You'll leave the next 4 pins unconnected. We're almost done with this part. Connect lcd 11 through 14, respectively, to pins 9,10,11, and 12 on the arduino.
Grab the miniboard from the previous step now. Starting back from the right pin on the lcd (still upside down), connect the first pin jumper to J17 on the miniboard. Connect pin 2 jumper to H15 and pin 3 to H2. Pin 5 will go to G13. The two free jumpers on the left, 15 and 16, connect to I15 and H13 respectively.
Now! For the LED assembly. Instead of soldering the resistors to the LED legs, I used shrink tubing to make a mechanical fit as well as electrically isolate them from each other. E-tape was used to bind everything together and keep the M-F jumpers from sliding off when sliding the whole thing together. In the picture of the assembly above, the legs are bent 90 degrees so that the wiring will follow along the top rather than stick down and risk tangling. For the wires, left to right is Blue, Green, Common ground, Red. I know the colors dont match like they should. Maybe next time.
The LED will friction fit into a hole drilled through the enclosure lid, so no need for glue or anything else. Connect the common ground jumper to I13 on the miniboard, red's to arduino pin 3, green's to pin 5, and blue's to pin 6.
Step 4: Finish the Wiring
This step's easy. Remember the brown jumper we connected to the buzzer? Connect that to pin 2 on the arduino. The yellow jumper from the DHT11? Send that on over to pin 13. Finally, you'll take 2 long jumpers and connect 5v to J15 on the miniboard and one of the grounds to J13. Done! Other than power and programming, all the wiring is now done.
Step 5: Programming and Testing
Go ahead and flip the lcd right side up and plug in the arduino to your computer. Download and open the sketch below. With the arduino IDE, verify the sketch to make sure you have everything needed for it. As long as everything works, upload the sketch to the board. If there arent any problems, the LCD should light up, and the LED turn bright red. Wait a second or two and you should start seeing data displayed on the LCD. Provided the ambient temperature (T) and humidity (RH) create a heat index (HI) value at or below 26 deg Celsius, the LED will turn green as soon as data gets displayed.
Look at the HI chart above, noting the gradient of colors proceeding from yellow to red. 26c and below the LED will be green regardless of how cool it gets (you could modify it to also turn blue as it gets cold out). 26-33c it'll turn a yellow-green for temperatures you should exercise caution. 33-41c it'll turn a more yellow color for the temperature range you want to start considering getting into some shade, cooler air, or otherwise start to cool off. Once it reaches 41c or higher, the LED will blink red and the buzzer will sound off in sync with the LED. An easy way to test if it works is exhale onto the sensor and watch as the data and LED colors change. Next, we move to assembly!
Step 6: Assembling It All
On the safe side, make sure you've unplugged the usb cable at this point.
Leave the battery disconnected for the moment, but connect the barrel plug to the arduino as it's a bit of a tight fit in the enclosure I printed. Slip the board into the enclosure with the barrel plug towards the free space and screw the board to the standoffs. Once it's secure and wont move, attach the LCD to the top of the enclosure as well. To avoid damaging it, I used nuts and bolts I scavenged from old rc car servos. Drill a hole in some location to friction fit the LED as well. If you use a 3d printed enclosure as well, either plan ahead better than I did and design the LED hole before printing it, or just a very slow speed on the drill. You want to make a hole, not melt the plastic (might work in the end?) or crack the material.
At this point you can connect the battery and drop it in the free space. Slide the miniboard in next, and push it to the side over the battery. Next is the fun part. Feed all the jumper wires from the top into the box and, being careful to not pull any jumpers out on accident, close the top and use some short screws to secure the lid to the box. You're all done!
I'm aware there is little air flow the way the box is now, but if there's any issues because of it, I can use a thin drill bit to create some vents.
Step 7: Afterthought
For anyone wondering why specifically I used black PLA instead of other colors for this, one of the main reasons I had for creating this was the environment it's meant to be used in contains radiant heat sources other than the sun, which for this specific use is a negligible factor. It's also a near match for what I need to wear in that environment, and will more closely measure what I myself will likely experience.
This is an entry in the
Arduino Contest 2019