ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hobby ESC take the same kind of signal as a hobby servo: a 1-2 millisecond pulse, where the pulse length sets the speed and direction. Pulses shorter than about 1.5mS are one direction; pulses longer than 1.5mS are the other.

You can generate the servo drive signal with an arduino running rosserial: http://wiki.ros.org/rosserial_arduino/Tutorials/Servo%20Controller (and it's relatively easy to extend that demo to control two servo outputs; one for your ESC and one for steering).

There are probably libraries for the Raspberry Pi that will generate a similar signal.

I've done this kind of conversion before, and there are a few things to watch out for:

  • Depending on your ESC, there may be a small deadband around the 1.5mS, or that 1.5mS may drift a little bit. This can make it difficult to drive slowly, and difficult to properly send a stop command.
  • Some ESCs have forward/reverse/brake modes. If possible, try to put your ESC into forward/reverse mode instead.
  • Most ESCs will have a 5-6V OUTPUT on the servo connector instead of needing a 5V supply voltage. If you measure this voltage and hook it up to the right voltage supply on your arduino, you can use it to supply power for your arduino or other circuitry.
  • The stock ESC in most hobby RC cars is tuned to go FAST, and getting it to go slowly can be a challenge.

After using the stock ESC in my robot for about a year, I eventually converted it to a brushed 55T rock crawler motor and a Pololu motor controller with direct PWM and direction inputs.