Temperature Controller

Hi I am totally new to Arduino and programing.

I am helping my daughter with a school science project. The concept is to build a unit that can be used to measure the themal difference between two chambers. In one chamber the temperatyre will be measured with a DS18B20 module from Freetronics[url=http://.]..
The other chamber needs to be kept at consistant 20 degrees celcius using a hair dryer as a heat source. So what I am looking for is a sketch to turn the heater on and of and a circuit diagram to do this.

I assume you will have a temperature sensor in the second chamber as well.

The safest way to turn the hairdryer on and off is via a solid state relay. All mains voltage connections need to be in a safe purpose made box (not in a shoe box!). The relay can be driven directly from the Arduino output.

Your program would need to loop around reading the sensor and when it is below 20 deg, turn on the heat for a short time. Depending on the size of the chamber, the time may be a couple of seconds or tens of seconds.

Let the temperature stabilise for a few seconds before reading the temperature again and heating again if necessary.

You could used the sensor to turn the heat off as well but if the chamber is small, the sensor may only be sensing the heat from the drier.

Do not change on above and below a fixed temperature. This will cause “chatter” with the heater going on and off rapidly. Used <19 to turn it on and >20 to turn it off.


My thought would be to use another DS18B20 sensor module in the heated chamber and a hysterisis type program to switch on and off the heater between 19 and 21 degrees with a difusser to direct the heat away sensor module