Shop OBEX P1 Docs P2 Docs Learn Events
Speed Controller on a RC car Nube question — Parallax Forums

Speed Controller on a RC car Nube question

jdoleckijdolecki Posts: 726
edited 2010-07-26 17:37 in BASIC Stamp
I have· Traxxis RC Car with a speed controller.

I know i can control the steering servo and transmission servo.

Can the BS control the speed control?

If so what signalsdo the speed controller need?

Thanks

Comments

  • Spiral_72Spiral_72 Posts: 791
    edited 2010-07-26 15:00
    Yes you can. It gets exactly the same type of signal the servos do. PWM with a 20ms frequency. The actual pulse width may or may not be different than a servo though...

    While you're working on it, put a BUNCH of fail safes in there..... like run the control signal though a pushbutton, and/or disconnect the power to the wheels through a big toggle switch and make a fixture to hold the car securely with the wheels elevated. Ya don't want the car to go flying off your bench when you flip on BS power!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • jdoleckijdolecki Posts: 726
    edited 2010-07-26 15:28
    Is there any sample code anywere?

    thanks
    john
  • FranklinFranklin Posts: 4,747
    edited 2010-07-26 16:08
    Check out the boebot manual.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • jdoleckijdolecki Posts: 726
    edited 2010-07-26 17:26
    Found This




    The ESC Module shall have as input an R/C servo signal, and shall generate a modulated pulse whose width and polarity are proportional to width of that signal. By default, Futaba timings will be used to control the output, however a mechanism shall be provided to calibrate the timings to a specific transmitter.
    The Futaba timings define "neutral" or "no activation" to be 1522 uSeconds. Widths less than this amount are considered to be a "reverse" command, widths greater than this amount are considered to be "forward" commands. A dead zone of 20 uSeconds is defined to exist around neutral, such that any pulse that is within 10uS of neutral (wider or narrower) shall be considered to be equivalent to a neutral pulse. This specification insures that small variations in the output signal around neutral do not cause motor activation or "jitter."
    The relationship between the input and the motor activation is shown below in figure 1.
    esc-timeline.gif

    Figure 1: Relationship of Pulse Input to Motor Activation
    The system uses 16 forward and 16 reverse speeds, created by a activating the H-bridge for n 16ths of a period. When n is 0 the motor is not activated at all, when n is 16 the motor is continually activated.· The base PWM frequency is determined primarily by sample clock (1Khz) divided by 16 time slots, or a base frequency of 62.5 Hz. This frequency may be increased however be aware that around 325 Hz it will interfere with Futaba PCM receivers.
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-07-26 17:37
    That's exactly right! On airplane ESC, you have to have the throttle in idle, or else it will "beep.....beep.....beep" and never initialize. Car ESC may be the same.... it's a safety feature of the ESC. I mention this because if you accidentally send it a full speed signal from the BS on power up, the ESC may not initialize although the servos should still function normally during this time.

    If you go on Parallax website, find the servos they sell and download the sample code, that will be everything you need. You'll have to tweak the timing numbers a bit for an ESC, but it's all there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
Sign In or Register to comment.