PDA

View Full Version : Drive a digital rc servo motor



2LEGED
11-10-2006, 02:14 AM
IS THERE ANYONE KNOW HOW TO WRITE A PROGRAM IN PROPELLER CHIPS TO DRIVE A·DIGITAL RC SERVO MOTOR?

Post Edited By Moderator (Chris Savage (Parallax)) : 11/9/2006 9:40:37 PM GMT

Tommy Bot
11-10-2006, 03:30 AM
Try the Propellor forum

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
(Frequently heard from other's)

Tommy, I know it wasn't designed to·x, but can you make it·do x·anyway?

·

Chris Savage
11-10-2006, 04:39 AM
This thread is being moved from the·Support Forum to the·Propeller Forum.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

Mike Green
11-10-2006, 04:50 AM
Look at the second page of the Propeller Object Exchange for two different routines to control standard RC servos using a Propeller (one to control up to 32 servos using assembly language and another to control up to 4 servos using SPIN).
<http://ww1.parallax.com/Default.aspx?tabid=65>

Cliff L. Biffle
11-10-2006, 06:47 AM
The standard servo code won't work quite right for the digital servos (which use a higher pulse rate), but by tweaking some timeouts you can probably get it working.

Graham Stabler
11-10-2006, 07:39 AM
Out of interest do these servos also only work with special receivers/transmitters?

Joel Rosenzweig
11-10-2006, 08:12 AM
Actually, the standard analog servos are driven exactly the same way as standard digital servos.· Both types require the exact same pulse width modulated signal at 50hz rates.· They are completely compatible with each other.

There are other servos called "Super Servos" which require a 300hz update.· These require special hardware to drive them.· That is, a standard receiver won't drive it correctly.· They were meant to interface directly with solid state heading hold gyroscopes, which were specially designed to output a 300Hz signal, to complement the "Super Servo".· The higher rates give better servo response, which is really good for helping hold a model helicopter tail rotor.

Driving a servo is fairly straight forward.· Make a routine that outputs a positive pulse every 20ms.· Set the pulse duration to a width between 1.0ms and 2.0ms, which corresponds proportionally to the amount of travel.· 1.5ms is nominally the center point.·

Joel-

Cliff L. Biffle
11-10-2006, 08:23 AM
Joel,

Silly me, I thought all digital servos used the 300hz update. Thanks!

Mike Green
11-10-2006, 09:25 AM
Even with the 300Hz update rate, the general structure of a "Super Servo" driver should be quite similar to that for a standard servo and the existing routines should be good models. A SPIN routine ought to easily handle one servo and may do fine with more than one.

Randy Evans
11-12-2006, 04:27 AM
A digital servo will accept an off pulse width from 2ms to 40 ms. At least the one I recently bought does. It's a HITEK HS-5645MG and has tons of torque. Most of it's parameters are programmable.

Randy

Bryan K.
11-17-2006, 02:52 AM
It depends if you want to use the servo controller board, or just hook the servo directly up to the prop itself. I did just that, and can drive a servo to different positions by just changing the time high and low pulse width (for center, the 1.5 ms pulse, or the 50 hz pulse) for the servo pulse on a pin, connecting through a 1K resistor to the signal pin on the servo controller, and it works quite nicely. or 50 Hz stated above.

John R.
11-17-2006, 04:38 AM
Cliff L. Biffle said...
Joel,

Silly me, I thought all digital servos used the 300hz update. Thanks!
There are two different updates involved.

One is the update from the receiver (or Stamp/SX/Propeller/Servo Controler) and this is usally 50Hz.·

The other update is from the servos internal controler board to the motor.· On many digital servos this is 300 Hz.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.

8 + 8 = 10