[ELECTRON] Servo control question

Ross Feilen gm7wed at ntlworld.com
Tue Aug 3 15:09:11 UTC 2010


Hi Roy,

I see - you're already using the Freeduino board to work with the  
servos. (A simpler controller than the Freeduino doesn't really exist  
because there's precious little more on an Arduino board other than  
the controller and re-programming interface).

Power for the servos: if you use two separate power supplies, one for  
the Freeduino and another for the servos then they will be at floating  
voltages relative to each other (as each will have a mains transformer  
which isolates the mains from the secondary pre-rectified AC voltage).  
At the very least you'd have to connect the two ground lines together  
to make them common. Then, if the voltage to the servo motors is not  
the same as the Freeduino's then the control voltage for the servo  
might be wrong (as it comes from the Freeduino board). Do you have a  
datasheet for the servo motors you are going to use? Plus, make sure  
whatever servo motors which would be in the final design can be  
purchased for a reasonable price - if they're moving window blinds you  
might find something heavy-duty enough could cost a fair bit! Bear in  
mind most servos move through a fixed angle which is less than 360  
degrees, and you'd need some gearing to convert that to the  
appropriate number of turns to open/close the blind, and problems if  
the blind belt/gearing moves or slips from the calibrated position.

The mega will likely be more suitable for this after all, though the  
previous idea about multiplexing is good for reading the inputs (you'd  
only need 1 analogue input and 4 digital output IO pins) you still  
want 9 pwm capable outputs, which the Freeduino can't do.

Jumping randomly between servo positions sounds like the control PWM  
signal to the servo isn't being properly generated from the Arduino  
(can check with oscilloscope), or the control pots measuring the  
voltage correlating to the desired position are noisy (like an old  
volume control in a hifi which crackles), or that for some reason the  
Arduino program is rebooting or halting in a strange way, which might  
be the fault of the program you're trying.

In any case you should get your design working 100% with the Freeduino  
board before committing the design and spending money to scale up to  
the Mega board. Otherwise any bugs will likely remain after the change.

I had a plan similar to this once: to open and close curtains through  
a clock timer, so they'd open in the morning and close at night.  
However, my idea was to have microswitches sensing the open and closed  
positions on the curtain rail, with a regular geared motor turning  
until the desired position was reached. Never thought much more about  
it, and I know you'd have to consider how to reverse the motor  
direction, but it sounds like for what you want this might be a more  
suitable idea. Or else, if you need variable positioning, how about a  
stepper motor which can run in either direction and open/close buttons  
which you hold down until either the desired position is reached or a  
microswitch sensor detects you're at the end of travel for the blind  
[or an analogue pot selector system which calculates how many steps of  
stepper motor to move the blind from current to desired position]?

You're welcome to come along to the SOLDER group for more advice. We  
meet Wednesdays (NOT Tuesdays), including tomorrow, 5:30 to 8:30pm.  
Try to bring along everything with you if possible to make it easy to  
diagnose problems.

Ross


On 3 Aug 2010, at 15:31pm, Roy Mohan Shearer wrote:

> Hi Ross,
>
> I like your suggestion. Was doing the servo tutorials this morning
> actually to see what it would take and got a bit disillusioned as the
> servo started behaving quite erratically (jumping randomly between
> positions, and causing the red LED on the freeduino to flash). I
> figured it might be drawing too much power from the board, so I tried
> using an external power supply for the motor and then couldn't make
> things work at all.
> A mega would be a good to way go I think. The installation is
> permanent and for controlling blinds on skylights so I want it to be
> as robust as possible, hence thinking a simple controller might be
> better but at least I can find my way around arduino a little more
> easily than electronics generally..
> Any ideas on why the servo might be misbehaving? Maybe would be
> easiest to bring it into the club on Tuesday sometime?
> Roy



More information about the members mailing list