Motorized Shade Repair


Background

When I wired my home for home control years ago, I ran wires to the frame of the three windows in the master bedroom with the idea of some day installing motorized window treatments.  Then about 10 years ago I installed motorized pleated shades and added them to my home control system.  This worked great for years until one of the shades began to operate flaky.  The shade would stop in the wrong position or not move at all.  I disassembled the shade and removed the existing motor and controller which you can see below.

The controller was actually pretty sophisticated.  There's a DC motor and gearbox with an encoder as well as a controller board.  The black color you see above is not from overheating but is painted to protect the encoder led from false signals.  I had to provide the height of the opening when I purchased the shades and I believe that the encoder count for full open must be embedded in the controller.  The shade could be controlled by either an IR remote control or a button on a small pendant.  I just paralleled a relay output from my controller across the button contacts.  If power was lost, the controller lost it's position and would not respond until it received an up signal from the IR remote at which time the shade would go up until it reached the top and then reset the top position.  After that, the shade could be controlled from the controller.

After inspection, the problem was that the gearbox shafts were supported in the metal side frames of the gearbox without any type of bushing or bearing.  Finally one of the shaft holes wallowed out to the point that the gears would not reliably engage.  There did not appear to be a simple way to repair the assembly so I started to look for a replacement.  Not surprisingly the shade motor assembly was obsolete and the original manufacturer no longer had any replacement parts.  I did locate a company at blindsparts.com that claimed to have the part and even had a picture online.  Although the price was $300. I decided to order one to save time.  The company immediately charged my card but, despite numerous calls, never shipped the part.  I finally had to get a credit from American Express.  I would definitely not recommend them.

I looked at buying a new shade but the prices ranged in the order of $450. - probably as much as I paid for all 3 when I first purchased them.  Since it was time for a new approach, I decided to add my own motor and design a controller.

Mechanical Modifications

There are actually lots of DC motor/gearbox combinations available these days - mostly due to the popularity of robotics.  After quite a bit of research I settled on a 75:1 Metal Gearmotor with a 48 CPR Encoder, Item #2286 from Pololu Robotics & Electronics.  This would physically fit in the shade header and already had the encoder built in.  Here's what the motor looks like:

All I had to do now was couple the output shaft to the shaft in the shade and then mount the motor/gearbox assembly.  For a coupling I just used a 1/2" diameter by 1" long aluminum spacer from McMaster Carr that I drilled out on either end to match the corresponding shaft diameters and then added a couple of set screws to ensure there was no slippage.

I tried to use a mount that I also purchased from Pololu but couldn't really get it to fit in correctly.  I finally ended up making some mounts from some poly that I had laying around on my CNC.  This worked out really well and the final assembly was very clean.




Electrical Design


When I started thinking about the electrical control I decided I wanted the design to meet several criteria.
For motor control I went with Pololu again with their #2136 DC Motor Driver which utilizes the TI DRV8801 controller chip.  This is a very simple driver with a 2 pin speed and direction interface that can provide 1 amp continuous current at 8 to 36 volts DC.  Since I am using 9 volts and I had measured the current to drive the existing shades at 500 ma, this seemed perfect.  I also chose an Atmel Attiny4313 for the logic since I like the AVR chips and I already have the programmer and software to work with them.  Here's my schematic drawn with TinyCad:


A few comments on the schematic:

I designed the project around 2 circuit boards using FreePCB.  The first was the base board that had the motor driver, the AVR processor, and all of the  miscellaneous components and connectors and a second board that had the switches and LEDs that would actually be mounted on the outside of the enclosure.  I purchased the boards from Itead Studio where I was able to put both boards on one 10 cm by 10 cm board.  The cost for 10 boards (minimum order) was $24.90 + shipping.  I used to make some of my own boards but there are just too many inexpensive board services to bother with the mess of making my own.  Here's both sides of the boards:



I installed the main board in a Pactec Model K-CNL-0000 enclosure and added some openings for the various headers as well as the switch and LED board.  Heres the board in the enclosure as well as the complete assembly:




I ordered the boards before I selected an enclosure so I had to put a few spacers in the enclosure to position the board.




Operation and Software

I developed the software using the BascomAVR compiler.  I've used this software for a long time and find it to be fast, powerful, and easy to use.  The shade control is really pretty simple.  The two encoder inputs are set up as pin change interrupts and a simple interrupt routine tracks the position of the shade in encoder counts.  After powering up the circuit, the red LED is illuminated and the automatic control is disabled.  You then need to use the manual up button to raise the shade to the top position and press the calibrate button momentarily after which the yellow LED flashes one time to indicate that this is the zero or top position.  Then you need to use the manual down button to lower the shade to the bottom position and press the calibrate button for 2 seconds after which the yellow LED flashes several times and the current encoder reading is stored in EEPROM as the bottom position count.  Now the green LED is illuminated and automatic control is enabled.  In automatic each time the auto button is pressed or the home controller closes it's connected relay, the shade moves in the opposite direction of it's last travel until the correct position is reached.

Final Thoughts


I have been extremely pleased with the final result.  The shade moves very smoothly and is actually quieter than the other shades.  The speed is just slightly slower than the original controller and I did not need to implement variable speed control.  Here's the final installation:



There wasn't much I could do about the wires but it doesn't really make any difference since there is a valance on the window and the controller and wires are never seen.

I have included a download file that includes the schematic, PCB board layout and Bascom source.  Please feel free to contact me with any questions or comments.  Thanks for looking.

DOWNLOAD FILES


link_blue16 (1K)


Home