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.
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).
![]() |
![]() |