SSR are offered by many companies. Some top companies are Broadcom, Crydom, IXYS, Omron, Panasonic, Phoenix Contact, Scneider Electric, TE Connectivity, Teledyne, Vishay. I am going to use Crydomssr in the project below.
AC auto ON/OFF on Temperature
DHT22 Temperature Sensor
Solid state relay with arduino – Project Circuit Diagram
Project circuit is simple connect the DHT22 digital pin with the digital Pin#2 of arduino. Between the dht22 vcc and data pin insert a 10k pull up resistor. Ground the gnd pin of dht22. I powered the dht22 with the arduino +5 volt output. For SSR(Solid State Relay) i used the digital Pin#7. Connect the input +positive end of ssr directly to Pin#7 of arduino. Make the other pin ground. Insert a 10k pull dpwn resistor between the inputs of SSR. This resistor will tighten the ssr pinnot to float. On the other ends of the ssr connect the mains line of electricity.
Circuit diagram of the project is given on the right hand side. Arduino is powered through an external +12 volt power supply.
The upper configuration worked for me. Running the ssr directly from digital pins of arduino. The crydom ssr given in the above pic that i used requires 3 to 32 volts dc to switch on the other circuit. At output side you can connect a maximum load of 240 volts ac and up to 40 amperes of current. Crydom ssr’s are nice and i used them in many of mine projects. I even purchased the used SSR’s from eBay and used them in my projects and i never received any complainants.
Some people said that this configuration did not worked for them I think it might be due to the input dc voltage required. May be the SSR’s they are using require more voltage and current at input side. So i recommend to used a transistor to switch on the ssr, instead of directly switching on the ssr with microcontroller gpio(General Purpose Input/Output) pin. The transistor configuration is gien on the left hand side. An NPN transistor is used to switch on the ssr with +12 volts.
Note: If you do not have DHT22 with you. You can connect any DHT11 or DHT21 sensor with the same configuration for DHT22. Just replace the DHT22 with DHT11 or DHT21.
I am using DHT22 as only a centigrade/Celsius temperature though it can also output Fahrenheit temperature. I am also not using its humidity value. I am switching the ac on off on the centigrade temperature. If the temperature is less than 22 degree centigrade the ssr remains off. It the temperature increases from 22 degree centigrade the ac automatically switches on. Between each reading i also inserted the 2 seconds delay to ensure that the DHT22 sensor has updated his reading and its not the same as previous one.
I controlled my home ac with the same configuration given above. The only problem that i faced is that the ssr gets too hot when the temperature increases 30 degree centigrade. So i installed a nice big heat sink with the ssr. It still heat up when the temperature goes above 33 but not as much hot as it was heating before heat sink installation.