PROJECT #1 TOO HOT! TOO COLD!
SUMMARY: Our circa 1970s apartment has all electric appliances, including electric element heating (non-ventilation heating). The wall thermostat is a dial where you set the desired heat level. Problem is, it’s tough to get the right temp setting in the winter. So I set out to make the automated equivalent of me adjusting the dial all night long to keep a comfortable temp.
PROBLEM: Once set, our older style dial thermostat tries to maintain a constant bedroom temp throughout the night. But in effect, we wake up in the middle of the night saying “its too hot” or “its too cold.”
PROJECT IDEA: Use a microcontroller, temperature sensor, and a servo motor to automate dial turning CW and CCW throughout the night to maintain the heater at a reasonable temperature above the ambient room temp.
- Texas Instruments Application Note: Thermistor Sensor Circuit
- Arduino Nano
- Small Servo
- FORTH software
Our circa 1970s/80s dial heater thermostat
The dashed lines are the heater settings, so you get to choose only one temp for the entire night sleep
Thermistor circuit I incorporated (I had hoped to use a Maxim 2-wire temp IC, but my skills are not quite high enough to understand the bit banging involved, so I went the sensor-to-ADC route)
Calibrating the thermistor circuit with my decade resistor box
\ Gabe - Automatic Thermostat (ATmega 328P)
\ Initialize the ADC to output temperature continuously
$40 $7c c!
$f3 $7a c!
\ Set PWM Pin 9 as output and run in Frequency Correct mode
$A0 $80 c!
$12 $81 c!
01001110 $87 c! \ ICR1A setup
00011111 $86 c!
11111 $89 c! \ OCR setup
\ Defines a word “thermo.” Simple loop that adjusts the dial according to desired temperature range
$175 > if 1500 $88 !
else 900 $88 ! then
Testing the servo program and thermistor circuit with the heat of my fingers
Bracket for mounting the servo motor to the wall and holding it in place to turn the thermostat dial
Circuits mounted on the wall. Enclosure is a discarded TV dinner tray
Servo motor bracket mounted to wall using 3M dual lock fasteners
Servo horn coupled to the heater dial with a DIY plastic flexible coupling, then to a steel disc and then dual lock onto the dial face
Well, my family’s gonna be uncomfortable again this winter My automatic thermostat project failed. The problem seems to be the servo motor-to-thermostat dial alignment is a little too off. So when the servo moves to different rotations, it binds and strains the motor at each new position. I hoped the flexible coupler would resolve it, but no. At this point, I could try adjusting the servo motor centering screw, or making the coupling better aligned, or try a metal gear servo, but I think I’ll throw in the towel. This project taught me how to access Atmel registers to drive a servo, how to follow along with an industrial application note to build an accurate thermistor circuit, how to make a cheap and easy flex coupler, how to build/use a decade box, and sparked a new interest in programmable control (thanks @ian and @kvk ). So it really wasn’t a failure