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 PROGRAMMER AND POSSIBLY YOUR COMPUTER, AND YOU MAY BE INJURED. Best bet is to program the AVR externally then plug it into the circuit.

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, with an integrated push button, available from DigiKey as part number GH7295-ND. (More information on this part can be found on my rotary encoder page. I don't recommend using the Greyhill encoder anymore.) 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 temperature sensor somewhere within. The power cord contains 4 conductors, two for heating the blanket and two for the sensor. I have connected the sensor as part of a resistive divider and connected it to ADC0. In the program, ADC0 is sampled periodically and the sensor's resistance is calculated. The trouble is, I do not know the characteristic of the sensor, except to observe that its resistance increases when heated. If I can gather enough information about the sensor's temperature-resistance characteristic, I can use it to enhance the program to a add overheat protection.

Update regarding Safety: The blanket I use is made by Biddeford. Their web site here describes how the temperature sensor works. Briefly they say "the Resistive Heating Conductor is then surrounded with a Fusible Material. Simply put, this means that this material will signal at a specific temperature."
(Please read the full web page.) So the sensor is more complex than just a thermistor. If you decide to substitute another controller for the original one, you must consider the risks. On the one hand, I have been using my controller for many years with no issue. But there is always risk of failure which, in the case of electrical apparatus, can result in fire, shock and injury. I have always been nervous about electric blankets. Even when used properly, the cords wear and fail. A different brand I used had the socket fail from flexing over a number of years, resulting in intermittant heat and arcing. The manufacturer was not interested in my report. Biddeford plug has failed once with arcing inside the cable at the plug, again due to flexing over some years. Biddeford sent me 2 new controllers with no charge. What else can go wrong? Anyway I replace my blankets after 10 years or so, to be sure.

Download WinAVR C source code for the controller

Back to VE3LNY's AVR Project Page