Create a system that will turn a fan on when the temperature in a greenhouse reaches a specific threshold temperature and off when it falls back below that threshold.
This project uses a Raspberry Pi 4, a BHT22 (AM2302) temperature and humidity sensor, and and SSR-40 DA solid state Relay to turn a 120V fan.
CAUTION: This project requires knowledge of working with 120V electricity. Do not attempt this without the proper training and experience.
What you Need
- Raspberry Pi (3 or 4. 2 might also work)
- DHT22 (ASM2302) Temperature and Humidity Sensor
- SSR-40 DA solid state relay
- 40-pin Ribbon Cable (not required if you're not using a cobbler)
- T-Cobbler (optional)
- Push button
- 2 x 1k ohm resistors
Most parts are purchased from Elmwood Electronics https://elmwoodelectronics.ca/ Good prices and ship quickly.
If you're in the US, Adafruit https://www.adafruit.com/ is the source for so much maker wonderfulness.
The video covers the hardware setup but here are the main points.
The Raspberry Pi 4 connected to the breadboard by the ribbon cable and cobbler.
I’ve hooked the 3.3 volt power up to the power bus and the ground to the negative bus.
Then I connected the DHT22 sensor to power (red positive 3.3 V and black to ground) and the yellow wire to GPIO 4.
There is an LED that connects from the ground to a 1k resistor that connects to GPIO 25
The push button connects from the 3.3 V to a resistor and then GPIO 16.
SSR – Solid State Relay. GPIO 26 goes to the positive terminal of the 3.3V side and the negative terminal connects to the ground.