Electric Blanket Controller

Living in the cold north I like to use an electric blanket in the winter. For years they came with a controller that was essentially analog. There was a dial with numbers from 1 to 10, and you could set it at any position you liked, even between numbers. Then I bought a new blanket, and the controller was digital. It had up and down buttons and a single digit readout, which would go from 1 to 9 followed by H. There was no way to set the level between whole number increments.

It was not unusual for me to find one setting, say 5, to be too warm, but when turned down to 4, it would be too cool. Most people would take this situation philisophically, the price we pay for our digital revolution. But not me. Using the power controller circuit I developed for my space heater, coupled with a small microcontroller, I thought I could do much better.

schematic of the power controller

An ATtiny461 is controlling a 2-digit LED display, a rotary encoder, and a power hexfet to provide continuous adjustable power to a resistive load. Most electric blankets appear to be an approimate 100 ohm resistive load. Before you tackle this project, make sure your blanket (or other load) is resistive and consumes no more than 100 watts or so. 

WARNING THIS PROJECT IS *HOT* WITH RESPECT TO THE POWER MAIN. THERE IS REAL RISK OF SHOCK IF YOU ARE NOT CAREFUL. ALSO, YOU MUST USE AN ISOLATED POWER SOURCE WHEN PROGRAMMING THE MICROCONTROLLER IN CIRCUIT. IF YOU FORGET, YOU'LL BLOW UP YOUR PROGRAMER AND POSSIBLY YOUR COMPUTER.

I've learned to love the rotary encoder since I used one in my thermostat. I've used the same part, a Grayhill 62P22-L4, available from DigiKey as part number GH7295-ND. It has an integrated push button. The unit is actually on all the time. When you push the button, it turns the LED display on and sends power to the blanket. Push the button again and the display goes off and power is cut to the blanket.

Finding 100 steps a bit too much, the software increments/decrements the setting by two for each step of the rotary control. This gives 50 steps, and is easily changed if you like in the software. The program saves the last setting and the power on/off state in EEPROM. You don't want the blanket to come on after a power failure if it was off before (or vice-versa).

project photo 1 project photo 2

My electric blanket incorporates a thermistor somewhere within. The power cord contains 4 conductors, two for heating the blanket and two for the thermistor. I have connected the thermistor as part of a resistive divider and connected it to ADC0. In the program, ADC0 is sampled periodically and the thermistor's resistance is calculated. The trouble is, I do not know the characteristic of the thermistor, except to observe that its resistance increases when heated. If I can gather enough information about the thermistor's temperature-resistance characteristic, I can use it to enhance the program to a add overheat protection.

Download WinAVR C source code for the controller

Back to VE3LNY's AVR Project Page