Hi, Im working on my first Arduino based simple robot. I'm using a RC truck with the top shell removed for the base. I have access to the motor controller and the steering servo. The front steering servo has 4 wires, red, black, orange and blue. How do I controll the servo with 4 wires? The motor controller has 4 wires too, but I assume its for forward and reverse, pluss the voltage and ground. How do I program a four wire servo, and how do i program front wheel steering for a simple Bot? Such as when the front sensser detects an obstruction, how do I program the reverse, turn and avoid the obstruction?
When you're dealing with an off-the-shelf toy RC car, it is very difficult to say what is what without a bit of hacking; we certainly can't tell anything here without at least some pictures (hint, hint). Even pictures may not be enough, without a further teardown...
Take for instance the steering system - you don't mention whether it only has full left/right control, or proportional control. If you don't know what that means, then do some googling - it will help. If its the former control system, then those four wires might simple go to two electromagnets: Energize one to make it turn one way, energize the other to turn the other way. There is then probably a center-return spring so that if neither is energized, it goes straight.
Or - if it is proportional steering - then two of those wires might go to a small DC motor, and two of them come from a potentiometer (although I would expect three wires - maybe its a really cheap system?). In that case, the potentiometer acts as a feedback positioning sensor, to tell how much the motor (well, the attached gearbox) has turned, and thus in what direction the wheels point. You would then have to hook up an h-bridge (or hack into the controller's h-bridge) to control the motor, and read the potentiometer to know what direction things are pointing.
Ideally - you want to try to hack into the motor control circuitry on-board the system as-is. This may take a bit of doing; the best way is to trace the wires back from the motors/servos, where hopefully they lead to something that looks like an h-bridge (either a chip or discrete transistors/mosfets - hopefully the latter). Then diagram out things, draw rough schematics - get a feel for the actual hardware designs. Eventually, as you trace back further, you're going to start hitting the RF control section of the system (knowing when you're there will require some knowledge of what you are seeing, unfortunately).
If things start looking greek, then it might be best to just remove all electronic components leaving the motors/servos, then figure those out (especially that steering "servo" - knowing whether it is proportional or not is key to getting it to work); sometimes this is the only way to really move forward with such a project...
Thank you. I've isolated the motor control circuit . The Electronic end I'm familiar with, though not very much experience with servos and such. I'll work on figuring out the steering servo, if I remember correctly , its proportional. I'll post what I find and take some pics. Its the programing I'm short on. Its been since collage since I've done any programing. Are there any example sketches for the front wheel steering? Along the lines of a basic obstacle avoidance robot using two momentary contact switches ?
If nothing else I may pull out the front servo and buy one for it. Could you recommend a low cost servo for the steering? Its a medium sized truck frame about 12 inches long, not to heavy. The only brand name i can find on it is "NIKKO". I guess I better post a picture of it to. (I'm new to forums)