Selecting actuators

A project log for Reflecting the sun into your home

My home doesn't face the sun, so it's dark and cool inside. I want to use mirrors to reflect sunlight into my home.

mimemime 10/04/2020 at 16:150 Comments

An actuator is a fancy name for something you can use to create movement. A motor belongs to this group of things.

A long time ago, I had planned to buy loose DC motors, and connect them to screw threads with a coupler. But I'm running a bit low on time, and also, I'm trying to make this project as easy as possible, so I'm not going to use DC motors, but stepper motors. What is the difference?

DC motors require DC current to turn clockwise or counter clockwise, obviously using opposite polarities. A DC motor has one winding with two wires coming off. This means that when you for instance have a 12V battery and 12V DC motor, connecting +12V to one of the two wires coming out of a DC motor and connecting the other wire to the negative battery terminal, the motor will spin one way. If you reverse the connections, connecting 12V to where you previously had the negative terminal, then the motor will spin the other way. Here's a video of how this works: 

Stepper motors, in their most usual (ebay purchaseable) configuration, have two windings, and the magnets inside the motors are configured intermittently between the two windings, so that when rotating the motor axis, there are lots of little steps where the motor has a natural resting point. By energising first one winding and then the other, the motor can be turned. This is a very roundabout way of explaining how it works, you should really have a look at this video:

So why not using the DC motor?

1) required end position. If you drive a DC motor repeatedly on/off for instance in 100 millisecond intervals, you can make it turn a specific angle. But this angle is far from precise. How large this angle is depends mostly on friction, counter force in terms of weight, and temperature. 

For instance. Let's say you want to move the mirror by 5 degrees, and require the pillar a to extend by 5 mm. You can very accurately measure how long your time pulse needs to be in order to move 5 mm, but if you come back the next day and it is colder, the motor may find it harder to spin. And if you want to move it 5 mm in the opposite way, spinning may be difficult, because gravity is helping you to tilt the mirror down. (It really helps if you have read the previous blog).

So when a DC motor is used, ideally you need a sensor which measures either the length of pillar a, or which counts rotations for pillar a. This adds quite a bit of complication, because then suddenly we have to measure, which could require an analog to digital converter, or a digital counter. It would be nice if with every 'pulse' you apply, you knew exactly how much the angle change was......

The stepper motor

In comes the stepper motor. Typically, stepper motors are configured to change the motor angle by 1.8 degrees. A full circle has 360 degrees, so when you apply 200 steps in one direction, you move a full circle. For the sake of adjusting the mirror angle here, that's plenty accurate.

You have to know how to apply the steps to the two windings, but luckily there are drivers which take this work out of your hands, and they require only two signals: "move a step", usually called something like pulse, and "direction", usually called dir. 

stepper motor driver
stepper motor driver

For instance, on the cheap motor driver shown above (and there are many shops which sell this type), the signals are called DIR and PUL.  There is also an enable signal EN, but that just tells the motor driver to listen to what you're saying on the DIR and PUL inputs. The two motor windings are connected to the A+/A- and B+/B- outputs, and finally you need to provide a DC voltage between 9-40 VDC, and set some switches so that you don't burn out the motor and configure microstepping. Microstepping tells the driver that for instance the motor only changes 1/32nd of a step per step, so that the resulution is now not 200, but 200*32 steps, and the motor is kept somewhere between its natural step.

So this was a bit of a detour. Why was the stepper motor better again?

When you apply a fixed time pulse to a DC motor, you never know exactly where it will end up, but you know exactly where a stepper motor will end up. As long as the stepper motor can move of course. If you provide too much counter force, then it obviously doesn't move and then you get "missed steps". So assuming that's designed properly, with a stepper motor, as long as you've been counting your steps over time, you will know exactly where you are.