Space Heater Thermostat
This project implements a space heater thermostat. It uses an ATtiny84P microcontroller, a DS1775 I2C temperature sensor, and a SAA1064 I2C LED display controller. And a pushbutton rotary encoder.
This is the second version of this project; the first used a KTM-S1201 LCD display and a solid-state relay. It suffered from two problems: The LCD had no backlight, and in operation it could barely be seen; and the solid-state relay kept burning up. The SSR was rated at 30 amps and the heater ran about 7 amps, and was well heatsunk, but the problem seemed to be in the screw connections. They somehow worked loose over time causing resistance, heat, and burning. I destroyed two relays the same way before retiring the design. This project uses regular heavy-duty relay which will hopefully never fail (nice try, see below).
(Click to enlarge the schematic.)The green module in the top left corner of the inside view is the 5V power supply. It came from a USB-type 5V 1A wall-wart switching supply with the case removed. Below the DS1775 is mounted on a surface-mount board, the only way to manage such a tiny part with almost no pins. The relay is 110 VAC 10 amp contacts, with a 5 VDC coil (see below). My relay draws about 200 mA and closes easily at 4V. Any NPN driver transistor can be used as long as it can handle the relay's current.
Programming notes:
1. The DS1775 is a celsius device, and my project displays celsius. Converting to fahrenheit is not difficult but some programming effort would be required.
2. The on/off hysteresis
is specified in a define in main.c, 1.6 degrees C in my code. Depending
on the environment and location of the sensor, a larger or smaller
value might be appropriate. It is easy to change and re-compile the
code. As with all my AVR projects, Atmel Studio is used with WinAVR
GCC compiler, all free to download. Create a project, select the
ATtiny84A device, add the source code modules and build the code.