Shop OBEX P1 Docs P2 Docs Learn Events
Drive a digital rc servo motor — Parallax Forums

Drive a digital rc servo motor

2LEGED2LEGED Posts: 2
edited 2006-11-16 21:38 in Propeller 1
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

Comments

  • Tommy BotTommy Bot Posts: 60
    edited 2006-11-09 20:30
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-09 21:39
    This thread is being moved from the·Support Forum to the·Propeller Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2006-11-09 21:50
    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&gt;
  • Cliff L. BiffleCliff L. Biffle Posts: 206
    edited 2006-11-09 23:47
    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 StablerGraham Stabler Posts: 2,507
    edited 2006-11-10 00:39
    Out of interest do these servos also only work with special receivers/transmitters?
  • Joel RosenzweigJoel Rosenzweig Posts: 52
    edited 2006-11-10 01:12
    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. BiffleCliff L. Biffle Posts: 206
    edited 2006-11-10 01:23
    Joel,

    Silly me, I thought all digital servos used the 300hz update. Thanks!
  • Mike GreenMike Green Posts: 23,101
    edited 2006-11-10 02:25
    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 EvansRandy Evans Posts: 24
    edited 2006-11-11 21:27
    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.Bryan K. Posts: 47
    edited 2006-11-16 19:52
    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.John R. Posts: 1,376
    edited 2006-11-16 21:38
    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
Sign In or Register to comment.