PDA

View Full Version : Discussion Need help with servo slection


dvsvkimo
Mar 27, 2009, 05:08 AM
I have been struggling with servo control for months now. These GWS mini servos just don't look like they can be controlled with the general 1ms to 2ms timing scheme.

I have tried implementing my pulse widths, and I have tried Pololu servo controller to turn these servos. And the result is... they only go one way.

So does anyone know if GWS MINI servos only turn in one direction regardless of the pulse widths? Or are both of the servo controls I tried not functional. I hope its the prior case because I can at least ask for the question: is there any servo that satisfies the general timing scheme for 1ms to 2ms control pulse widths? If so, I will need to purchase them ASAP. I am looking for small size servos.

slipstick
Mar 27, 2009, 05:17 AM
I've never had any problem with any commercial servos, GWS or others, like that either controlled by the radio (which implements 1-2ms pulses) or run from a PIC. But "these GWS mini servos" doesn't tell me what exactly you're using.

When you say they only go one way do you mean the servo turns say clockwise and then refuses to return to its starting point ?

Or can you describe exactly how does it move ? You centre it with 1.5ms pulses, then what happens when you change the pulse length to 1ms and to 2ms ?

Steve

Alan Hopper
Mar 27, 2009, 05:23 AM
dvsvkimo,
Your servos should definitely work with 1ms to 2ms pulses every 20ms or so. Either they are faulty or your pulses or connections are. If you have nothing else to test them with, the hobby shop you got them from ought to be able to test them. It might just be possible to make servos move as you describe by having the signal and 0v swapped.
Alan

dvsvkimo
Mar 27, 2009, 01:36 PM
First of all, I need to verify how servos work. I have not seen any servo working under my control so I don't know what to expect to see from the servo if it works.

If I send a pulse say 1 ms, and servo moves its position. Does it move to one "specific angle" and stop? Or do I have to continously feeding the same pulse and eventually it will reach the specific angle and stop? None of these are really coming out of my servo and I am just not sure why this thing behaves so differently than I expected.

The first one on the list is what i am using. I have tried some really weird timing and had it to turn counter clockwise...
http://www.gwsus.com/english/product/servo/mini.htm

Here are some symptoms that I have been getting the whole time:

Servo either move nonstop and go 1 direction (using my PWM signal from the PIC18F4331). Last time i tried, I had it running and stop at 1 position but... that position is always the same regardless of pulse width.

Or with Pololu, (they claimed of being able to send pulses between 0.25ms to 2.75ms range) I had sent both ends of pulse width on that range and all i got is 2 servo steps in clockwise direction, regardless of the pulse width.

Maybe I should use an oscilliscope to see these pulses...

Alan Hopper
Mar 27, 2009, 03:40 PM
given a fairly continuous stream of pulses a rc servo should go to a position proportional to the pulse length. It will then try to hold that position, it is generally not good practice to try and move servos by pushing the output arm, however you can feel it resisting movement if it is getting a valid signal. Servos often move a little bit as they power up, so if connected wrongly, you could be effectively powering them up on each pulse and creating the movement you describe. The center cable( red )is +ve the darkest outer cable( black or brown )is 0v and the other outer cable (white or orange ) is the pulse. For testing with the pololu I would try 1 and 2ms pulses just in case your servos don't like the extremes you mentioned. To confirm your pulse lengths simply use a pc sound card scope program or a sound recording program like audacity

F-111 John
Mar 27, 2009, 05:26 PM
First of all, I need to verify how servos work. I have not seen any servo working under my control so I don't know what to expect to see from the servo if it works.

If I send a pulse say 1 ms, and servo moves its position. Does it move to one "specific angle" and stop? Or do I have to continously feeding the same pulse and eventually it will reach the specific angle and stop?...
Basically, a servo is made up of a motor, a potentiometer, a pulse generator, and a comparator.

The receiver presents a continuous train of pulses to the servo, with the width of the pulse corresponding to the position of the transmitter's stick position. The servo is also making it's own pulses internally with the width set by using an RC time constant, with the R coming from a potentiometer tied to the output arm. The comparator compares the width of the pulses being generated internally with the pulses it is getting from the receiver. If they are not the same, an error voltage drives the servo motor in one direction or the other, depending on if the internal pulses are wider or narrower than the incoming pulses.

As the motor turns, the servo arm turns, and the potentiometer turns. As the potentiometer turns, the pulses being created inside the servo change. When the internal pulses and the external pulses have the same pulse width the comparator generates no error signal, and the motor stops.

The comparator continues to compare the incoming pulses from the receiver (or your control board) with the internal pulses being generated, and when there is an error either through the receiver pulse changing or pressure on the servo arm, the comparator will drive the servo motor in the direction necessary to cancel the error.

The servo must be receiving a continuous stream of pulses in order to operate. If you stop sending pulses, the servo stops where it is and won't do anything until it has an incoming pulse train again.

In other words, you cannot send a single pulse to the servo and expect it to move to the desired position. You must send a continuous series of pulses of a given width, and the servo will drive it's internal pot (and the connected arm) to match that pulse width.

RC Servo Basics (http://wolfstone.halloweenhost.com/Motors/svoint_RCServos.html)

Typical Servo IC Data Sheet (http://media.digikey.com/pdf/Data%20Sheets/NJR%20PDFs/NJM2611.pdf)

slipstick
Mar 27, 2009, 05:28 PM
A servo expects a continuous stream of pulses of length 1-2ms repeated approximately every 20ms. For any particular pulse length it should go to a specific position. As you change the pulse length the servo should move to a different position. But servos are not instantaneous, you need to send a stream of pulses and it will gradually move into position (over maybe 100-200ms or so).

Steve

dvsvkimo
Mar 28, 2009, 02:44 AM
I have got the servo to work for the 1ms to 2ms scheme now. But it's a different servo I purchased today. Thanks for the info. I just don't know what was wrong with the previous servo. I got this new servo today, plug it to my sevo control and it works. I have been spending so much time figuring out why the previous servos don't work.