Let's Make Robots!

Need help controlling Traxxas ESC and Servo with Arduino

I'm working on an autonomous ground vehicle, guided by a U-BLOX Neo 6m GPS Module, and HMC5883l compass.

The ESC connects to the 7.2 NiMH Battery pack and is supposed to be connected to a RC receiver with a standard 3 wire servo cable, it also provides 6 volt regulated power from the same cable. Because the power is too high for an Arduino, I used a separate 5 volt power supply for the rest of the electronics, except the steering servo. Using a separate power supply makes the ESC and servo uncontrollable, creating a lot of jitter.

If I power the Arduino and all the other components from the 6v created by the ESC, everything works fine, except the GPS, and the Atmel chip gets a little warm.

Any suggestions on fixing this problem? Thanks a lot guys!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I found that the problem is actually caused by the SoftwareSerial and Servo libraries conflicting. I thought I had fixed it a while ago, by switching to the ServoTimer2.h Library, but the problem is still there :/

Conflict all around us isn't there :-) Yeah, I have the same issue if I used Software serial to send data - receiving I've had no problems at least on BoxHead but sending it apparently uses the conflicting timer to push that data out. There are work arounds and some have done that here I think. I've noticed mine only glitch during the send, would be interesting what yours are doing. Good luck and keep us updated. -Stephen
Nice project - working a similar project myself. I never could use the esc to power the CPU and sensors. CPU reset each time it tried to run the motor. Might just be my esc / brushed motor setup though. You should be able to run separate packs with a shared ground without issues. Keeps the noise off the sensor and CPU side in my opinion. Good luck and and keep use posted! Stephen

Why not just skip the whole 6v entirely? I mean, just don't use it. You said you are using a different 5v supply, why not just use that and not use any of the 6v for anything?

I used a separate 5 volt supply for the CPU, and tied the grounds together. But for some reason, I can't control the ESC or the servo in that situation, the servo jitters back and forth, and the ESC randomly pulses and drives. I don't know why.

You don't mention which Arduino board you are using, but the UNO and many others has onboard power regulation. Why couldn't you power the Arduino directly from the battery (6v might be too low for the regulator to work efficiently, but 7.4v should be perfect) and power the GPS from that?

edit: Also make sure your grounds are connected when using two supplies. That might be the cause of the jitter.

Duh!  --Good catch dude. Yeah, you got 7.2v right there, perfect for a 5v regulator..

I second on the common grounds thing too.

Yes, regulate your 6v down to 5.

Connect your servo to this new 5v supply.