ARDUINO – SOLID STATE RELAY FAN ventilator control using the w1209 thermistor and SSR-25 DA

Hello world! Today i made a Ventilator / FAN controller for growing tents or rooms, the controller works pretty simple when the temperature is for example below 25.90 the Ventilator/Relay will be OFF, as soon as it become above 25.90 the ventilator/Relay will turn ON. You can set any temperature in the code you like.

Do not use LED lamps to test if your using a lamp.
Led lamps can flicker or stay on when using a solid state relay.
You could have the problem that the light is on even when the relay suppose to be off then your probably using
led lights.

Find more info at this Video.

Schematic:

SSR-SOLID-STATE-RELAY
SSR-SOLID-STATE-RELAY

Simply wire it up like the schematic and upload the code to the arduino.

Parts list.
1: Arduino uno
2: SSR-25 DA Solid state relay
3: NTC Thermistor w1209
4: Ventilator.
5: MM/FF/FM Jumper set kit
6: Solderless Breadboard
Good luck!

Code:

First we define the themistor pin, this is a analog pin and i have set A0 for this.

#define THERMISTORPIN A0 or you can set any other analog pin. A1 A2 etc.
The rest of that parts needs no changes.

in void setup(void) {

we set analogReference(EXTERNAL);
because we are using AREF, 3.3v and A0 connected together with a 10K resistance.
Then we set the pin for the relay to pinMode(7, OUTPUT); I used Digital pin 7 for the SSR-25 DA relay.

in void loop(void) {
we read the value of the THERMISTORPIN at A0

you do not need to change anything here unless you changed the name of the A0 pin then change it here to.

Converting to Fahrenheit
If you want to use fahrenheit instead of celcius then simply uncomment line 62 and 67
then comment line 66 so it does not print out *C to serial monitor.

The if statement
In the if statement we read the value from steinhart.
If the temperature is <= less then or equal to 25.90 Celsius then the relay pin will be set to low, so OFF. if the temperature is >= more then or equal to 25.90 Celsius then the relay pin will be set to HIGH, so ON.
Change the value 25.90 to the value you need.

Subscribe to my youtube channel!

Check out our website for sensors!

facebook-profile-picture
Danny van den Brande

http://www.arduinosensors.nl

<p>I like to code electronics, do 3D Design, Webdesign and Graphic Design.</p>

Leave a Reply

Your email address will not be published. Required fields are marked *