In order to prevent unwanted heating water flow in our combined ground/solar/wood heating I needed a special function thermostat that would activate flow valves at 45 degrees C and keep them activated until the temperature drops below 40 degrees C. The ones I found commercially were very expensive Jumo thermostats - so it was time to dig in the electronic projects junk box.
Suitable parts I found was,
- a Arduino Mini Pro microcontroller
- a Dallas DS1820 temperature sensor
- a optocoupled 5V SPDT relay
- a 4,7kohm resistor
- a used iPhone 5W charger
- some connectors, wires and cables
The only thing I had to buy was a DIN rail enclosure. Welleman had a D2MG closure for under 5 euros.
Here is a picture of the wired internal parts of the thermostat. The Arduino has the FTDI pins fitted so it is possible to reprogram it even when it is fitted in the enclosure. In order to be able to fit the iPhone charger the wall plug pins had to be shortened and the width of the charger filed from 35mm to 33mm. The relay board is mounted on the charger with double sided tape.
The Welleman D2MG enclosure.
The assembled thermostat and sensor cabling.
And finally here is the Arduino code if someone would need a similar thermostat. My_DS1820Thermostat.ino.txt Remove the .txt extension and put the file in a folder named My_DS1820Thermostat
Bookmarks