This project started as a way to prevent my pool pump/filter outdoor cupboard from freezing in the winter.
I already realized that a 60w lightbulb should be enough heat in such a small volume (2 cubic metres approx), but I wanted a way to control the heating so nothing would melt either !
This is an easy job for an Arduino UNO and a temperature sensor, but I wanted a single easy to use box without any separate power supplies etc.
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Hardware and Control Box Construction
The control box has a single mains power input through a flying lead with plug. The mains voltage is used inside the box as the power supply for the heating device (light bulb), and also for the arduino, via a cell phone charger plugged into the arduino USB socket. The heat source is plugged into a socket mounted in this control box to make it as self contained as possible.
A single DHT11 is glued onto the box lid and this senses temperature.
List of Main Componants
- Arduino UNO clone board
- DHT11 temperature/humidity sensor
- 5v buzzer
- Cell phone charger (1A) with USB plug on lead.
- Generic 5v Relay board
- Panel mounted mains socket
- Inline mains socket
- 2* 220Vac indicator bulbs. Optional to indicate mains power On, and switched power On.
- 1 LED indicator
Step 2: Logic and Software
Software is attached.
The software simply runs in a loop, reading the temperature from, the DHT11, and turns on the mains output(for the bulb) via a relay if below the temperature setting. If above the temperature setting, the bulb is turned off (relay is de-energized).
In addition, if the temperature falls below a preset warning level (1 Deg C), then a buzzer and "alarm" indicator are latched on. These stay on until the system is reset, regardless of temperature. The idea of this was to give me a warning if the 60W bulb turned out to not provide enough heating.
I love the ability to add self test routines in arduino code, they can be so useful and provide additional functionality.
The box does not have any kind of LCD display telling you the heating setting etc. I realised that I could pass that info without extra hardware. During power-up, the code flashes the heating output and buzzer to represent the number of DegC at which the heating switches on. I have the heating threshold variable set to 4 Deg C. Everytime the arduino powers-up, the relay flashes the lightbulb 4 times (simultaneously with the same number of beeps from the buzzer).
I didn't take care to ensure some hysteresis in the heating on/off command, therefore there is a possibility of excessive switching. In practice, the thermal inertia of the heated volume means that the switching is not too rapid in my application. However, you may want to consider switching the heating off at switch-on temperature +1 or 2 degC.