Project Description

Report 5 Downloads 97 Views
Project Description Problem: I have a gas forced hot air furnace with an Aprilair Humidifier. I live in the Mid-Atlantic states. My winter Humidity is controlled by Honeywell Humidistats. They are grossly inaccurate and my house is either too dry or too humid. My Solution: Design and build an Arduino based Humidistat. It will be powered by the furnace 24VAC @ 500ma terminal on the Furnace’s circuit board that is active only during the heating cycle when the fan is on. The design details and parameters: Are as follows: • • • • • •

The 24VAC will be converted to 7.5VDC and will turn on and power the Arduino. The ambient Humidity will be sampled by a DHT22 Temperature and Humidity Sensor. A potentiometer will set the point to turn on the humidifier and will set a humidity range between 30% and 50% initially but may be reprogrammed to set a range between 20% and 40%. If the humidity drops below the set point a optically coupled solid state relay will be energized which will turn on the water solenoid to supply water to the humidifier. The humidity will be sampled every 5 seconds if the sampled humidity is higher than the set point. If the water solenoid is energized there will be a two minute delay before the humidity is sampled again to avoid short cycling of the humidifier’s water valve solenoid.

Progress so far: • • • • • • •

Project completed Circuit Description completed Schematic completed Arduino code sketch completed Pictures completed Final project mounted and connected to furnace and humidifier Final testing phase (will last a couple of weeks)

Circuit Description Please Reference Schematic

24 VAC @ 500ma is fed from the furnace (HUM) terminal on the furnace’s circuit board to the bridge rectifier and filtered with a 100uf 50 volt electrolytic capacitor yielding about 35VDC. The (HUM) terminal only receives power when the furnace is in its heating cycle and the circulating fan is running. The 35VDC is fed into a DC/DC adjustable linear regulator set to 7.5VDC. The output of the regulator is fed into the Arduino’s power jack and will power the Arduino only when the furnace is in the heat cycle and the circulating fan is running, hence starting the Arduino’s program. A 10 K Ohm potentiometer is connected to 5VDC, ground, and the wiper is connected to the analog input (A0). This generates values between zero and 1023 to the Arduino. This value gets converted to a range of 30 to 50 and is used to as a set point for the humidity. It is compared to the humidity read from the DHT22 and is used to trigger the solenoid to supply water to the Humidifier. A DHT22 (I2C) Humidity/Temperature sensor is connected to 5VDC (Pin1), ground (Pin 4) and (Pin 2) to the Arduino’s Pin2 and measures Temperature and Humidity. The program reads this value of this sensor every 5 seconds. Note that there is a 10K Ohm resister between Pin 1 and Pin 2 of the DHT22 sensor. Pin 4 of the Arduino is connected to an optically-coupled solid state AC relay through a 330 Ohm resistor. If pin 4 goes high, the relay triggers to the on state and completes the circuit between pins 6 and pins 8 of the relay. The relay contacts are connected in parallel with the old furnace Humidistat (note the old furnace Humidistat is used for failsafe backup but is normally turned off). If the relay contacts are energized (closed), they will complete the circuit and turn on the furnace’s water valve solenoid suppling water to the Humidifier on the furnace. Three LEDs are used for status. All are connected through 3.3K Ohm resistors for current limiting. The first is a power indicator and is connected to 5VCD to indicate the Arduino is being powered. The second is connected to Pin 11 on the Arduino and indicated activity, it flashes for 250ms every time the DHT22 is sampled. The third is connected to Pin 13 on the Arduino and lights when the water solenoid relay is triggered supply water to the humidifier. The program is written with a test to make sure that the DHT sensor is connected and working. If the sensor cannot be read, both the Activity and the Water Solenoid lights will flash for 10 times, ½ second on, 1 second off to let you know there is a problem. If the Humidifier relay is energized, it will latch for two minutes, before sampling the room’s ambient humidity again. Once the humidity in the room reaches the set point, the Humidistat’s relay will deenergize and the program will again start to sample the ambient humidity and test it against the set point every 5 seconds.

Once the heat cycle on the furnace completes, the (HUM) terminal on the furnace will no longer supply voltage to the Arduino and the Arduino will power off.

Arduino Sketch #include "DHT.h" #define #define #define #define

DHTPIN 2 // what pin we're connected to DHTTYPE DHT22 // DHT 22 (AM2302) solenoid 4 // Pin to Activate water solenoid activity 11 // Pin to show activity (reading sensor)

DHT dht(DHTPIN, DHTTYPE); void setup() { pinMode(activity, OUTPUT); pinMode(13,OUTPUT); pinMode(solenoid, OUTPUT); Serial.begin(9600); dht.begin(); } void loop() { // Wait a 5 seconds between measurements. delay(5000); // // // //

Reading temperature or humidity takes about 250 milliseconds! Sensor readings may also be up to 2 seconds 'old' (it is a very slow sensor) digitalWrite(activity, HIGH); delay(100); float h = dht.readHumidity(); digitalWrite(activity, LOW);

// Read temperature as Celsius float t = dht.readTemperature(); float tt = dht.convertCtoF(t);

// Check if any reads failed and exit early (to try again). if (isnan(h) || isnan(t)) { Serial.println("Failed to read from DHT sensor!"); // If the sensor fails to read successfully execute for loop // and flash the activity and solenoid lights together for // 10

// times a total of 15 seconds for(int x=0; x < 10; x++){ digitalWrite(activity,HIGH); digitalWrite(13,HIGH); delay(1000); digitalWrite(13,LOW); digitalWrite(activity,LOW); delay(500); } return; }

// // // // // // //

Read pot and convert to humidity values between 30 and 50% humidtiysetpoint = the pot value setpointvalue = the set point for the target humidity level Test to see if the humidity is less than the set point if so turn on solenoid If not turn off solenoid Temp is just displayed on serial console but not used float setpointvalue; int humidtiysetpoint=analogRead(A0); if (humidtiysetpoint < 0) { humidtiysetpoint = 0; } if (humidtiysetpoint > 1023) { humidtiysetpoint = 1023; } setpointvalue=((humidtiysetpoint - 1) * 20 / 1023) + 30; if(h < setpointvalue ) { digitalWrite(solenoid, HIGH); digitalWrite(13, HIGH); delay(120000); } else { digitalWrite(solenoid, LOW); digitalWrite(13,LOW); }

Serial.println (setpointvalue); Serial.print("Humidity: "); Serial.print(h); Serial.print(" %\t"); Serial.print("Temperature: "); Serial.print(tt);

Serial.println(" F "); }

Project Pictures Note: Remote Control used for size reference.

Parts List Many of the parts are standard over the counter parts and not listed here. These are: Common Parts Bridge Rectifier Capacitors Resistors Potentiometers LED’s Connectors

Specialized Parts DHT-22 Humidity and Temperature sensor ~ $3.50 Amazon Arduino Uno (clone) ~ $3.20 Aliexpress Panasonic AQH0213 Compact DIP Solid State Relay ~ $2.00 from Newark Electronics Arduino Prototype Shield ~ $1.10 from Aliexpress DC-DC 5v 9v 12v 24v Converter Buck Module Linear Regulator Step Down Board ~ $6.00 eBay Two low voltage ½ height electrical boxes ~ $1.20 Home Depot Sheet of Plexiglas ~ $2.00 Home Depot

Total cost of the project is about $30.00

Recommend Documents