3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Automatic Window Blinds Controller (PICAXE)

Step 2How The Controller Works

It was a simple matter to work out the mechanics of opening and closing my blinds with the Solarbotics GM3 Gear Motor. The only modification I had to make was to drill a small hole in the shaft. The motor's overall design, voltage rating, 224:1 gear ratio, slip clutch, and low cost made it the perfect motor for this project.

At the heart of my design is the versatile and inexpensive PICAXE microcontroller. The PICAXE is very sensitive to supply voltages. Take the voltage much over 5 volts and you will smoke it. Powering the PICAXE directly with 4 AA batteries (6.0v) will destroy it so don't even try it. It works well when powered with 3 AA cells (4.5v).

In my design I wanted to use 4 AA cells for two reasons. First, the extra AA battery would provide a little more time between battery changes. The second reason - because a 4 cell battery holder looks better sitting on top of the controller project box than a 3 cell holder does.

My design uses a light dependent resistor (LDR) hooked up to one of the PICAXE's analog to digital converter (ADC) inputs to monitor the outdoor light level. The ADC sets a program variable to some value between 0 and 255 depending on the intensity of the light shining on the LDR. I have mine set to open the blinds at 250. This keeps them from opening at the crack of dawn and waking me up too early. I have it set to close the blinds at 200 which is about an hour after sundown when it is just starting to get dark outside. You will need to tweak these settings to adjust the controller for your particular light levels and personal preferences. I do need to give you a word of warning here. If you use this controller in your bedroom, you need to be prepared for the blinds to open at any minute in the mornings. It would be really easy to get caught in an embarrassing situation if they opened at a time you were not expecting them to.

When the light shining on the LDR reaches a certain level (either dark or light depending on whether it is morning or evening)) the PICAXE turns on one or both outputs. The PICAXE outputs have a maximum load of 20mA which is not enought to power the relay or motor directly so I used a Darlington Array.

The Darlington Array is simply a set of 7 electronic switches that allow a low current (the PICAXE outputs) to switch a high current (The relay and motor). I used 2 of the array channels (1&2 tied in parallel) to switch the relay on and off, and the remaining 5 channels (3-7 also in parallel) to switch the motor current on and off. The array also has circuits built in that protect the rest of the circuit from voltage spikes created by inductive loads (e.g. relays and motors).

The relay I used is a small 5.0v DPDT relay that fits nicely into a 16 pin DIP socket. I hooked the motor leads up to the 2 common (COM) terminals of the relay and fed the motor outputs from the darlington array to both sets of normally closed (NC) and normally open (NO) contacts in a crisscross pattern. When the relay is off the motor turns in one direction. When the relay is activated the polarity reverses and the motor turns in the opposite direction. I am sure there are other ways to do this but I like this setup.

The PICAXE does have a pulse width modulator (PWM) built in that you could use to control the motor speed, but with the Solarbotics gear motor that wasn't necessary. If you use some other type of motor you might want to use the PWM program command it to slow it down a little. Whenever I reverse the motor, I activate the relay about 10mS before the motor current is turned on. This keeps the relay contacts from arching and should make them last a lot longer.

I included code in the program to prevent the controller from trying to open the blinds when they are already open and from closing them when they are already closed. This works fine except for when the controller is first turned on. When power is first applied the controller is going to try to open or close the blinds regardless of what the light levels are. For this reason, you need to manually set the position of the blinds to the opposite of what they need to be before you power up the controller (e.g. close them if it is during the day and open them if at night).
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
84
Followers
8
Author:biochemtronics
After a career in industrial electronics I went back to college and now do DNA research.