In the DARPA grand challenge, full-size, un-manned vehicles were tasked with following a route in the desert described by GPS coordinates (DARPA Grand Challenge - Wikipedia). I thought it would be interesting to do the same thing, but with a radio-controlled car (in my case, a Traxxas Slash 5803). To make the car drive autonomously, the radio controller would be replaced with a micro-controller. The way I am planning to do this is to put an Arduino between the radio receiver on the car and the electronic speed control and steering servo. In order for the Arduino to communicate with these components, I first need to understand the signal that they expect. I started with the ESC. The question of this post is: how can I transform the current and voltage of an Arduino Uno into a current and voltage that the electronic speed control on my car can receive?
I have a good idea of the current and voltage that the electronic speed control wants to receive. To figure this out, I first spliced into the wiring between the radio receiver and the speed control and read the signal between the ground (black) and the control wire (white) with my oscilloscope.
In all cases, the wave form was 3 V high. They were 10 ms apart. Thanks to (Rigol DS1052E Oscilloscope) for a good tutorial on taking screen shots with my oscilloscope, a Rigol DS1052E.
At 100% reverse, the wave form was 1 ms wide.
At neutral, the wave form was 1.5 ms wide.
At 100% forward, the wave form was 2 ms wide.
The current running through the circuit is roughly 40 mA.
I know that the Arduino Uno I have kicks out 40 mA @ 5 V or 50 mA @ 3.3 V (http://arduino.cc/en/Main/ArduinoBoardUno). Before I figure out how to imitate the PWM signal, I want to make sure that the Arduino is kicking out a voltage and current that will not fry the speed control. How should I do this? Here are the options I was thinking of:
- The most straight forward solution is throwing caution to the wind and just run the Arduino at 50 mA & 3.3 V and hope that the ESC doesn't melt, because it's getting 10 mA and 0.3 V more than it wants. However, I'm not thrilled about burning up a $40 ESC.
- Another option would be sizing a resistor according to Ohm's law, but was concerned that doing this would reduce the current along with the voltage.
- Then, I was considering using a voltage regulator. I'm not sure which one to use, though. I thought linear would be better than switching for this application, because it seemed like the switching regulators might interfere with the PWM signal I was trying to generate (Voltage regulator - Wikipedia). I found a linear voltage regulator on digikey that could take 5 V in, put 3 V out, and would not put out more than 50 mA (http://search.digikey.com/us/en/products/TPS71530DCKR/296-15045-1-ND/562626). Would this or another voltage regulator work? What would cause it to come closer or farther to that 50 mA maximum?
- Can you think of a better way to transform the signal from an Arduino digital output pin such that its voltage and current would match the ESC inputs without inhibiting its ability to transmit a PWM signal?
I got the general approach for the RC car to autonomous vehicle conversion here: http://www.esawdust.com/blog/autveh/files/AutonomousRC-part1.html