Jump to content
 

Servos used as point motors


Dan6470

Recommended Posts

I have been researching the use of RC servos for use as point motors but have become a little confused. My understanding, which I would like confirmed if possible, is that the servo has positive and negative rails and will function with a DC voltage between 3 and 6 volts. The higher the voltage the faster the movement. There is also a control/signal input that will change the direction of the servo from say -45° to 0° to +45°. This seems to be achieved by a train of pulses placed on the control/signal wire/input. From "Intro to RC Servos" at:

 

http://wolfstone.hal...os.html#Driving

 

it would seem that the width of the pulse in the pulse train controls the direction of the servo, a pulse width of 0.6ms will drive the servo to -45°, 1.5ms will drive it to 0° and finally 2.4ms to +45°

 

I had assumed from posts that I had read that I only need one constant control/signal and that I could change the direction by using a DPDT switch connected to the +ve and -ve rails and by operating the switch, thereby changing over the supply rails of a servo then the servo would change position. However, further research indicates that it probably will not change direction but would probably go BANG with a burst of smoke .... not what I required :blink:. So how to control the servo?

 

From a previous thread;

 

Notes on RC Servos as point motors http://www.rmweb.co....d796fa7f2785091

 

Stephen (Bertiedog) published the following 555 based circuit

 

post-9064-0-53139200-1295018717_thumb.jpg

 

but I think this requires the potentiometer R2 to be adjusted to change the pulse width and hence position of the servo. This is fine if you are only controlling one servo but how do I control many servos without duplicating the circuit for each servo? Would it make sense, I mean is it feasible, to control all the servos with two of the above circuits, albeit each set to output a different train of pulses. One set for a train of pulses with a pulse width of 0.6ms and the other with a pulse width of 2.4ms. These two control signals could then be fed to a two way switch for each servo, perhaps use the DPDT switch from earlier (above) but only one side of it (would that be a SPDT ?), and the output of the switch connected to the input of the servo. This, in my mind, seems to work and could be adopted for numerous point motors/servos. However, assuming this does work, I have a couple of queries.;

 

1. What happens when the servo gets to it end position? say a 2.4ms train of pulse is switched to the input of the servo, the servo will travel to the +45° position but what happens since the 2.4ms pulse train continues to be applied to the input. Does the servo simply stop at that position because of its mechanical construction in which case the motor is constantly powered (that can't be good perhaps the pulse train should be switched off by other means when the servo reaches its end position? ) or does the servo stop because of its internal electronics sensing the +45° position?

 

2. I would like the servos to operate as slowmotion point motors. Consequently, how do I control the speed of switching from -45° to +45°. Above I assumed that the speed could be controlled by the voltage on the supply rails but perhaps it could be controlled by the frequency of the pulses, the gap between pulses?

 

If anybody can give me some advice in regard to using servos in this fashion, I'd be most grateful. I am aware of control circuits from the likes of MERG or MUTR but I consider these prohibitive on price. I know that the MUTR servo control is less than £3.00 but my MR (still in the design stage) will have in excess of 50 turnouts. Assuming £2.00 for each servo that £100.00 to then add another £150+ is not acceptable when the above 555 based circuit could be built for just a few pounds and could, if my assumptions are correct, be used by all the servos.

 

Thanks

Dan

Link to post
Share on other sites

  • RMweb Premium

I have been researching the use of RC servos for use as point motors but have become a little confused. My understanding, which I would like confirmed if possible, is that the servo has positive and negative rails and will function with a DC voltage between 3 and 6 volts. The higher the voltage the faster the movement. There is also a control/signal input that will change the direction of the servo from say -45° to 0° to +45°. This seems to be achieved by a train of pulses placed on the control/signal wire/input. From "Intro to RC Servos" at:

 

http://wolfstone.hal...os.html#Driving

 

it would seem that the width of the pulse in the pulse train controls the direction of the servo, a pulse width of 0.6ms will drive the servo to -45°, 1.5ms will drive it to 0° and finally 2.4ms to +45°

 

I had assumed from posts that I had read that I only need one constant control/signal and that I could change the direction by using a DPDT switch connected to the +ve and -ve rails and by operating the switch, thereby changing over the supply rails of a servo then the servo would change position. However, further research indicates that it probably will not change direction but would probably go BANG with a burst of smoke .... not what I required :blink:. So how to control the servo?

 

From a previous thread;

 

Notes on RC Servos as point motors http://www.rmweb.co....d796fa7f2785091

 

Stephen (Bertiedog) published the following 555 based circuit

 

post-9064-0-53139200-1295018717_thumb.jpg

 

but I think this requires the potentiometer R2 to be adjusted to change the pulse width and hence position of the servo. This is fine if you are only controlling one servo but how do I control many servos without duplicating the circuit for each servo? Would it make sense, I mean is it feasible, to control all the servos with two of the above circuits, albeit each set to output a different train of pulses. One set for a train of pulses with a pulse width of 0.6ms and the other with a pulse width of 2.4ms. These two control signals could then be fed to a two way switch for each servo, perhaps use the DPDT switch from earlier (above) but only one side of it (would that be a DPST ?), and the output of the switch connected to the input of the servo. This, in my mind, seems to work and could be adopted for numerous point motors/servos. However, assuming this does work, I have a couple of queries.;

 

1. What happens when the servo gets to it end position? say a 2.4ms train of pulse is switched to the input of the servo, the servo will travel to the +45° position but what happens since the 2.4ms pulse train continues to be applied to the input. Does the servo simply stop at that position because of its mechanical construction in which case the motor is constantly powered (that can't be good perhaps the pulse train should be switched off by other means when the servo reaches its end position? ) or does the servo stop because of its internal electronics sensing the +45° position?

 

2. I would like the servos to operate as slowmotion point motors. Consequently, how do I control the speed of switching from -45° to +45°. Above I assumed that the speed could be controlled by the voltage on the supply rails but perhaps it could be controlled by the frequency of the pulses, the gap between pulses?

 

If anybody can give me some advice in regard to using servos in this fashion, I'd be most grateful. I am aware of control circuits from the likes of MERG or MUTR but I consider these prohibitive on price. I know that the MUTR servo control is less than £3.00 but my MR (still in the design stage) will have in excess of 50 turnouts. Assuming £2.00 for each servo that £100.00 to then add another £150+ is not acceptable when the above 555 based circuit could be built for just a few pounds and could, if my assumptions are correct, be used by all the servos.

 

Thanks

Dan

 

Hi

 

You would need the circuit above for each servo.

 

The MERG Servo4 (one PCB controls 4 servos) works out at £1.125 per servo and is fully configurable. Total cost for your 50 points £58.50 plus MERG membership for a year. I know which I would choose.

 

Cheers

 

Paul

Link to post
Share on other sites

It might be possible to do it with two servo drivers. One of them adjusted to maximum pulse length and one to minimum. Use one of them to drive the servo/point to the switched position and the other to drive it straight ahead.

The most obvious problem that springs to mind is that there may be interference picked up that may destabilise the servos and cause them to "jitter", especially at power up.

Link to post
Share on other sites

Your concept of how R/C Servos work appears to be somewhat flawed.

First, supply voltage. The vast majority are intended to work from between 4.8V and 6V. The reason for this is convenience of working with either 4 or 5 standard 1.2V Nicad cells. You cannot reverse the supply connections to control the servo position.

The controlling circuit generates pulses, typically between 1 and 2 milliseconds in length, every 20 milliseconds. The actual length of the pulse is what determines the servo position.

Each time a pulse is sent to a servo, it triggers a circuit in the servo which generates a second pulse, internal to the servo. Part of the circuit which generates the internal pulse is a potentiometer attached to the motor gearing. The voltage that the potentiometer produces is related directly to the servo position.

The lengths of the internal and external pulses are compared. If they are the same length, there is zero error, meaning the servo must be in the required position. If one pulse is longer than the other, an error signal is generated, either positive or negative, depending on which is of the two is longest. The error signal now drives the servo motor and gears in the required direction to reduce the error signal back to zero.

Thus by changing the external pulse width the servo responds by changing position to match it internally.

It is possible to stop sending pulses to the servo once it has achieved position. However, this relies on the stiffness of the servo gear chain to maintain position as no error corrections are made in the absence of pulses.

Hope this helps.

Link to post
Share on other sites

  • RMweb Gold

I'd really recommend joining the MERG. I joined just over a year ago and had had great fun playing the Servo4 drivers all the CBUS modules and linking up to PC with JMRI. Only risk is you spend too much time playing with electronics and not enough time modeling.

 

David Barham

Link to post
Share on other sites

Only risk is you spend too much time playing with electronics and not enough time modeling.

Ah yes, I remember 'Modelling'.

It is something I used to do a lot more of before electronics became dominant.

Still, it is an aspect of the hobby which allows all sorts of things to be done which would otherwise be impossible.

Link to post
Share on other sites

Not sure if you want to take this route however, I think the ESU Switch Pilot Servo can be used on DC.

An extract from the introduction reads " The Switch Pilot Servo can also be used without a digital control unit. For this eight push buttons can be connected to directly to control the servo motor."

 

The unit cntrols up to 4 servo's, and costs £25.

 

Using DCC I am quite happy with how the unit works.

 

Gordon A

Bristol

Link to post
Share on other sites

The Switch Pilot Servo can also be used without a digital control unit. For this eight push buttons can be connected to directly to control the servo motor."

Since the OP'er has indicated he is on a tight budget this is an expensive way to do it, the MERG Servo 4 does it for £4.50, and needs only a simple on/off switch per point.

Mind you, he will be doing well to get decent servos for £2 each, best I found the other day was £2.50, and the way exchange rates with China are going they will doubtless increase soon.

Keith

Link to post
Share on other sites

Hi.

 

Thank you for all your comments, I really appreciate your efforts.

 

Your concept of how R/C Servos work appears to be somewhat flawed.

First, supply voltage. The vast majority are intended to work from between 4.8V and 6V. The reason for this is convenience of working with either 4 or 5 standard 1.2V Nicad cells. You cannot reverse the supply connections to control the servo position.

The controlling circuit generates pulses, typically between 1 and 2 milliseconds in length, every 20 milliseconds. The actual length of the pulse is what determines the servo position.

Each time a pulse is sent to a servo, it triggers a circuit in the servo which generates a second pulse, internal to the servo. Part of the circuit which generates the internal pulse is a potentiometer attached to the motor gearing. The voltage that the potentiometer produces is related directly to the servo position.

The lengths of the internal and external pulses are compared. If they are the same length, there is zero error, meaning the servo must be in the required position. If one pulse is longer than the other, an error signal is generated, either positive or negative, depending on which is of the two is longest. The error signal now drives the servo motor and gears in the required direction to reduce the error signal back to zero.

Thus by changing the external pulse width the servo responds by changing position to match it internally.

It is possible to stop sending pulses to the servo once it has achieved position. However, this relies on the stiffness of the servo gear chain to maintain position as no error corrections are made in the absence of pulses.

Hope this helps.

 

Gordon, that is an excellent explanation that you have provided, it has clarified a lot of the gray areas in my understanding, thank you.

 

Smokebox, the circuit that you have provided is very similar to what I have in mind, but I had considered to use a DPDT switch with one side switching the frog polarity. With regard to a centre off switch that you mention this may cause problems, if I have followed Gordons' explanation properly a constant input to the servo is required in order for it to rigidly hold its position.

 

With regard to the price of servos, I purchased 8 for £12.00 inc delivery between Christmas and New Year. I'm sure that currency fluctuations will cause the price to rise but if my little tests work then I'll try and buy in bulk and negotiate a better price ;).

 

Dan

Link to post
Share on other sites

Hi.

 

Thank you for all your comments, I really appreciate your efforts.

 

 

 

Gordon, that is an excellent explanation that you have provided, it has clarified a lot of the gray areas in my understanding, thank you.

 

Smokebox, the circuit that you have provided is very similar to what I have in mind, but I had considered to use a DPDT switch with one side switching the frog polarity. With regard to a centre off switch that you mention this may cause problems, if I have followed Gordons' explanation properly a constant input to the servo is required in order for it to rigidly hold its position.

 

With regard to the price of servos, I purchased 8 for £12.00 inc delivery between Christmas and New Year. I'm sure that currency fluctuations will cause the price to rise but if my little tests work then I'll try and buy in bulk and negotiate a better price ;).

 

Dan

 

You may have a problem using a DPDT switch as the moving rail will probably still be in contact with the stock rail when the frog changes polarity, causing a short. Shouldn't be a problem though if the switch rails have insulating breaks in them.

 

You shouldn't need to have the servo constantly applying force if you are using standard manufactured points with an over centre spring but you may have a problem with hand built points, although in my experience of servos, a fair amount of force is needed to move a servo arm when there it has no power applied due to the gearing in the servo. In the circuit I've drawn, power is maintained to all the servos (which will draw very little current when not moving), only the signal wire is switched. Jittering when the switch is thrown may be an issue though,

Link to post
Share on other sites

An alternative to the MERG kit is: http://www.mutr.co.uk/product_info.php?products_id=1009480

 

It's 6v so there will be a need for a 6v supply.

 

I am currently experimenting with these units, which seem to be very basic. I regret to say that at this time they are very erratic (?) and unstable when used with the small servos (SG90) which are the type seemingly most favoured. They have no control over the speed of movement from one end position of the servo to the other, these positions are set by resistance. There is also some instability in the movement which is proving difficult to eliminate and would preclude there use for semaphore signals. Also depending on how the unit is wired there is current permanently applied to the servo which causes them to get hot, which can't be a good thing. I am hoping to enter into correspondence with MUTR to see if these problems can be solved but any solution will, I suspect require mods to the circuits or extra parts etc.

 

There is also a unit available from Heathcote which controls two servos for about £12. The sevos can be had direct from Hong Kong for about £1.50 including postage! I have done this and they arrived in about ten days. Do a "Google" on SG90 Servos and you will find these.

Link to post
Share on other sites

During my experiments with servo drives I came accross the problem of servo stutter or chatter. This happens when power is initially applied, or reapplied after a shut down due to a short circuit.

The worst was on the small cheap servos I purchased from Hong Kong, which gave quite a twitch when power was applied.

The best I have found are the Hitec HS311 Standard servos at £6.00 each plus p&p from a UK internet supplier. There is virtually no discernable twitch.

I would suggest that you check whatever circuit you use. This I have found is best done when you have three servos of differing types under independent control connected at the same time.

 

Gordon A

Bristol

Link to post
Share on other sites

I came accross the problem of servo stutter or chatter.

But is this really a problem? So when you turn the power on some of the Servos twitch, its all over long before you start running your trains.

And you should not get shorts that affect your 5V auxiliary supplies or there is something worse going on than servos twitching.

Regards

Keith

Link to post
Share on other sites

Also depending on how the unit is wired there is current permanently applied to the servo which causes them to get hot, which can't be a good thing.

 

That is not how these particular circuits should be wired if using resistors. Push buttons are supposed to be used with the resistors so that no current flows when the servo has moved.

Link to post
Share on other sites

That is not how these particular circuits should be wired if using resistors. Push buttons are supposed to be used with the resistors so that no current flows when the servo has moved.

 

Just looking at the MUTR module and it looks like a 556 timer, isn't that basically two 555 timers in one package? And if so how does the push button extension in place of the pot work? I can see that by pressing one button that one train of pulses will be outputted and if the other button is pressed then another stream of pulses but if you only press a button momentarily then the servo may not be quick enough to move all the way to the required location. Surely it would be better to utilize a SPDT switch instead of the push button switches thereby providing a constant output to the servo and consequently the servo will arrive at and hold the required position.

 

Dan

Link to post
Share on other sites

My concern with the servo twitch / chatter is that if a suitable light omega loop is not put in the mechanical link between the servo and whatever item that is being driven, damage will take place. The twitch on the cheaper servo I tried was quite significant, in the realm of 1mm in each direction.

 

Gordon A

Bristol

 

 

Link to post
Share on other sites

Just noticed this post, and the circuit quoted to me was a servo tester that could also move servos to a position, with the output switched between servos.

Chatter is a slight problem, but is not with an omega loop drive anyway, as the rotation is so much more than needed, and even a millimetre movement, which is high, is only about 2% of the rotation available. Chatter can be reduced with increased frequency or damping the output with capacitance.

Link to post
Share on other sites

I've found the following information about using the 555 to drive servos

 

with reference to the circuit in the first post

"The monostable 555 (the right hand 555 circuit) will not reset if the trigger is held high. You need to create a "non-retriggerable" one-shot.

 

The astable 50 Hz gen (the left hand 555 circuit) should be outputting pulses narrower than the narrowest pulse the retriggerable one-shot will generate, i.e. 5% duty cycle or less."

 

but try as I can I am unable to produce a duty cycle of 5% at 50hz. In fact with the calculations that I have, I am unable to reduce the duty cycle to less than, say, 50+%. The formulas that I am using are as follows:

 

The output is on for t1 seconds, then off for t2 seconds.

 

t1 = .693 x (R1+R2) x C

t2 = .693 x R2 x C

(R1 and R2 are in Ohms; C is in Farads)

 

I understand that the duty cycle can be reduced further by connecting a diode across R2 but is it really necessary to have a duty cycle of 5% in order for the circuit to work reliably? If my maths are correct, which they may not be, isn't a 5% duty cycle at 50hz = 1ms? (5% of 20ms).

 

I'm just trying to get my head around how this thing functions!

 

Dan

Link to post
Share on other sites

I understand that the duty cycle can be reduced further by connecting a diode across R2 but is it really necessary to have a duty cycle of 5% in order for the circuit to work reliably? If my maths are correct, which they may not be, isn't a 5% duty cycle at 50hs = 1ms? (5% of 20ms).

 

You are correct. A pulse of 1ms will put the servo at one end of its travel. A pulse of 2ms will put it at the opposite end. The pulses are repeated every 20ms. I don't know what the tolerance on the 20ms is. Individual servo types probably vary as to what they can accept.

 

Andrew Crosland

Link to post
Share on other sites

Hi Andrew

 

You are correct. A pulse of 1ms will put the servo at one end of its travel. A pulse of 2ms will put it at the opposite end. The pulses are repeated every 20ms. I don't know what the tolerance on the 20ms is. Individual servo types probably vary as to what they can accept.

 

Andrew Crosland

 

Thank you for your comments. The idea that a pulse of 1ms will put the servo at one end of its travel and a pulse of 2ms will put it at the opposite end isn't quite my understanding, although it will probably be sufficient to move the point blades. However I have come across the following information with regard to the full range of the servos movement.

 

From; http://wolfstone.hal...os.html#Driving

 

 

Theory of Driving RC servos

The servo is controlled by a series of pulses, wherein the length of the pulse indicates the position to take.

 

post-9064-0-31599100-1295468597_thumb.jpg

 

Notes:

 

  • Increasing the pulse width by 10 µSec results in about a degree of movement on the output shaft.
  • These numbers are nominal, and vary slightly between manufacturers and models. For example, the HiTech HS81 likes pulses between 0.74 mSec and 2.14 mSec.

  • The rate at which these pulses are sent isn't terribly important - only the width of the pulse. Some typical rates are 400 Hz (2.5 mSec pulse spacing) and 50 Hz (20 mSec pulse spacing).

end.

 

The 1ms pulse that I referred to in my last post was regarding the output from the Astable 555 circuit (left-hand side cct) which triggers the Monostable 555 circuit (right-hand side cct) to output the required pulse width to drive the servo, in the range of 0.6 to 2.4msec. The problem that I required clarification about was that if the trigger pulse of the Monostable is of a longer duration than the output to the Servo then the Monostable would not be able to reset, Quote "The monostable 555 (the right hand 555 circuit) will not reset if the trigger is held high". If this statement is true then I really need a trigger pulse of a duration less than 0.6msec at 50Hz (*) but I am experiencing difficulty in calculating the values of the components to produce this pulse at 50Hz. So really I want to know what you guys that are successfully using servos as point motors are using for a trigger pulse?

 

 

(*) I know in my previous post I mentioned the 1msec pulse but that was with reference to the quoted 5% duty cycle which would seem to be too long considering that a 0.6mses pulse is required from the Monostable to drive the servo to the 45° position.

 

Dan

Link to post
Share on other sites

So really I want to know what you guys that are successfully using servos as point motors are using for a trigger pulse?

Most people these days probably won't be using a circuit like this at all, but instead will be using a microcontroller based solution such as the MERG Servo4. Such devices can be programmed to give any desired pulse width range and rate of change of pulse width, i.e. the speed at which the servo moves from one position to the other can be controlled too.

With a simple 'two different pulse width' switching circuit the servo always moves at its maximum rate every time the switch is thrown.

The ability to set and vary individual servo end stop positions is also useful, as is the option to use a PC program for setting-up and recording the stored settings.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...