Overview video for this sensor: https://youtu.be/VefbT6RuT-4
Build video (part 1 - hardware): https://youtu.be/fA91LcJRbhI
Build video (part 2 - software): https://youtu.be/uDsnqi1Vl4U
Build video (part 3 - openHAB): https://youtu.be/yHt19wZBnDo
SEE BELOW FOR BUILD INSTRUCTIONS
This project is my homemade/DIY temperature/humidity sensor, based on the NodeMCU ESP8266, and a DHT22 sensor. It uses a custom-made breakout board for the NodeMCU/DHT I designed in Eagle (available on Tindie: https://www.tindie.com/products/11677/). The breakout board allows me to easily connect things like an OLED screen (for local display), motion sensors or WS2812 RGB LED strings (for LED strip control). The NodeMCU itself runs either code I wrote (or ESPEasy) to get the temp/humidty/motion inputs, and publish them via MQTT to my openHAB home automation system.
This enclosure was designed to make the whole setup look more pleasing to the (wife's) eye, rather than having random PCBs out around the house.
Design features incorporated since original prototype (9/17/17):
-Edges on the bottom of the enclosure serve to hold the PCB in place
-Rounded edges for a more aesthetic look.
-Mounting posts for the OLED display (melt down with soldering iron to hold display in place)
-EXT connector for connecting external inputs/outputs (motion, pressure, luminosity sensors, servos, etc...)
-Louvers to match the DHT sensor's side/top openings (for better airflow/sensing and aesthetics)
-Second version of the box available, with diagonal louvers along both sides (originally for airflow, but with calibration resolving reporting issues, they're purely aesthetic now)
-Breakout board supports both NodeMCU 0.9 as well as 1.0 ("v2"). Note: V3 is supported as well, but will NOT fit in this enclosure!
-Counter-sunk holes on the bottom cover to hide screw heads and make box flat on the wall
-3.3/5v selector jumper (i.e. selecting which of those voltages is sourced for the EXTernal sensor power rail).
-Board is 100% tested and works!
This design is COMPLETE
Check out my YouTube channel https://www.youtube.com/c/BKHobby for how to videos about 3d modeling, printing and home automation
Check out my (mostly functional) 3D designs - (https://www.thingiverse.com/bkpsu/designs) ! If you like them and want to support my projects, use one of the links below when you're planning to buy anything from these sites (it won't cost you anything extra!). Thank you in advance!
How to build sensor
Parts List (Affiliate links to parts I've used/tested):
-OLED screen (http://amzn.to/2xR4iQP)
-NodeMCU breakout board (https://www.tindie.com/products/11677/)
-NodeMCU ESP8266 dev board v0.9 ($6 & Prime from Amazon: http://amzn.to/2hd6RJk, $3 from AliExpress: https://goo.gl/fQGwBN) or 1.0 (http://amzn.to/2ymAkak).
-DHT-22 sensor (http://amzn.to/2ymmODK)
-solid hook-up wire, 22awg (https://amzn.to/2voliAb)
- Print enclosure and cover
- Solder left/right inner headers onto the OSHPark carrier board (15 pins each)
- Solder DHT22 sensor onto board, with openings facing out
- Stick NodeMCU board onto carrier board, USB connector facing opposite from DHT22
- De-pin OLED screen (cut the black plastic holding pins together, remove pins one by one) <- alternatively, you can use breadboard wires (http://amzn.to/2fDGqeJ) with connectors on each end if you don't want to de-pin, but you'll have to bend the OLED screen pins to the side.
- Cut seven (7) short (~2 inch) lengths of hook-up wire and strip on each end.
- Connect/solder OLED screen to carrier board as follows:
For SPI OLED (Not recommended):
Board Wire Color OLED
3v3 Red VCC
Gnd Black Gnd
D10 Orange Res
D9 Gray DC
D8 White CS
D7 Yellow D1
D5 Brown D0
For I2C OLED:
Board Wire Color OLED
3v3 Red VCC
Gnd Black Gnd
D4 Yellow SCL
D3 Brown SDA
- Stick OLED screen onto mounting posts (ensuring the screen is within the enclosure opening) and use a soldering iron to melt the posts over it.
- Put NodeMCU carrier board in, ensuring it fits snugly (DHT sensor is tightly within its opening, USB connector is visible)
- Put enclosure cover on, and secure with small screws (or glue in place)
- Program sensor. I've posted my code here: https://github.com/bkpsu/NodeMCU-Home-Automation-Sensor and the ESPEasy project is available here: https://github.com/letscontrolit/ESPEasy
Fusion 360 for the enclosure, Eagle CAD for the circuit/PCB
Overview and Background
A good project to introduce Arduino environment, sensor programming, 3d modelling/printing, PCB design, and DIY/maker community (GitHub, Thingiverse, Fusion, etc.). Successful completion results in a fun project with a take-home end product (finished sensor ready to mount on a wall).
Lesson Plan and Activity
- Download 3d STL files and print the enclosure
- Solder connections/boards in accordance with above procedure
- Complete assembly
- Complete programming and test.
Can be split into multiple lessons/sub projects.
Parts list above.