Temperature and humidity controlled fan

PRINCIPLE:

Basically this device is used to switch on fan, when conditions are good for drying wheat. Conditions are good when the humidity is lower than RH<70% and T<24ºC. When these conditions are met, the fan has to switch on. The fan is big and needs to be switched on rarely and switching on the fan frequently may kill the fan starting schematic. Therefore it doesn't need to change the relay state frequently.

HARDWARE:

I am using for this Arduino Mini Pro 3,3V, Nokia 5110 LCD, relay, LEDs, AM2305, BC547 transistors and voltage adjuster. The brain of the whole thing is Arduino, directly is connected to it 5110 LCD, relays are being run through the BC547 transistors. AM2305 sensor is connected to Arduino pin.

SOFTWARE:

For controlling the LCD is used LCD5110_Basic library. The LCD displays info from sensor: temperature, humidity, temperature limit, humitity limit, relay state and countdown timer. The code checks sensor every 30 seconds and updates display accordingly. The relay state is checked and changed every 600 seconds (10 min), because the fan could be switched on and off multiple times in a short period if the temperature and humidity is on the limit. Therefore the 10 minute time is used.
For AM2305 sensor is used  DHT22 sample code. The DHT sensor code is like DHT11 needs different code and DHT22 and newer sensors seem to work with same code.

PCB:

On PCB I made on the left side buttons, to change temperature and humidity limit. I didn't use these, because coding this would be a bit problematic and I decided to make these hardcoded, that can be changed by uploading a new program to Arduino.

ETCHED SCHEMATIC:

Here is the etched and assembled product.

AM2305 SENSOR:


I had some problems finding info how to get it working. It was really simple, the sensor works with DHT22 sensor code perfectly. Sometimes the sensor provides no good data, then on LCD the numbers are NAN. 90% it works okay. When this situation should appear when switching fan, then the code restarts and tries again to get the data from sensor.

TESTING:

It has worked on table outside for about a week and it seems to be working good. To protect it from humidity and water I painted it with

Comments

Popular posts from this blog

ZTE MF29A router and Openwrt

ESP8266 connection to MQTT server (Attempting MQTT connection...failed, rc=-2)

Audi A6 C4 Webasto DBW46