RC car hack

Anybody know how I can hack this RC car,? it has 1 motor for drive and 1 servo for steering.

I have an arduino uno r3, thanks!!!

Marshiewoo

Can you access the transmitter potentiometers ? If so you might find some way to control the pots with an arduino. If you can't do that then you are probably out of luck.

I do have the transmitter and access to them yes :).

Ideally I would like to mount the arduino onto the car, and not have to use batteries for the transmitter.

Here is the transmitter

One problem is that if you measure the voltage across the transmitter pots it is probably 9V. In order to use a digital pot you would need to find a digital pot that can operate at that voltage. Otherwise you will have to use RC servos to move the gimble sticks. or turn the pot shafts. That is the first thing you need to do. If you cannot control the stick position with an RC servo then I don’t know how to hack it.
If you can get that part working the rest is fairly straight forward. Use the Servo Library to control the RC servos.

The transmitter has no pots, just 4 basic buttons/switches. It runs on about 3v.

I'm fairly sure I can get something working just using the car, without the transmitter, just playing with it at the moment. If anybody has any more tips and comments fire away :) thanks so far!

Step-1
Desolder any buttons or switches using solder wick.
Purchase breadboard friendly replacements to use for initial software testing. These will be replaced by relays in step-2.
If you want you can skip this step and proceed to step 2.

Step-2

Purchase 5V SPST relays
https://www.google.com/#q=arduino+5v+mini+relay+module

step-3

Learn how to control relays:
http://forum.arduino.cc/index.php/topic,4104.0.html
http://playground.arduino.cc/uploads/Learning/relays.pdf
http://arduino.cc/en/tutorial/blink

Thanks for that!

I have found some connections on the car that activate the motor and the steering when connected to ground.

Can I just use a transistor to connect those connections to ground when I pass a small voltage from the arduino digital output?

Thanks

You need to measure the voltage across these points before we can tell you how to connect the transistors.

Can you read the information on the IC's on both the transmitter and the receiver?

If you can - and you see anything like what is detailed in this "mega thread" - then you need to read that thread completely:

http://forum.arduino.cc/index.php/topic,86883.0.html

The ICs you photographed seem to have the proper number of pins to be of the TX#/RX# chipset "family" - you have also identified some of the pins; matching those up to the pins in the various datasheets detailed in that mega thread should get you everything you need to be able to control the vehicle.

Indeed - if you read that thread closely, toward the end I put a link over to another thread (and there is a link from that thread to the "mega thread" as well) whereby an individual was playing around with having the Arduino control the IC directly using a single pin, and emulating the pulse output that is normally provided by the transmitter.

In fact, since you have both the transmitter and the receiver - you should be able to use the transmitter and identify the pin from the radio on the receiver which feeds into the IC (an oscilloscope or similar would be handy to find this) - it will be a repeating square-wave style pattern. From there, you can see what the pattern is for each function on the transmitter, and what the frequency is as well. Once you know that, you could have an Arduino emulate that pattern, and feed that pattern into the IC in lieu of the receiver - thus allowing complete control of the vehicle using only a single pin!

Again - review the thread I posted - there is a ton of information in that thread, which is better to review than to rehash again here.

Thanks everyone for your kind words. I have been successful in this without buying anything... I just followed the tutorial on instructables.... http://www.instructables.com/id/Autonomous-Control-of-RC-Car-Using-Arduino/

One thing I dont know how to do is control the speed. I've used an analogWrite command which works fine but I am under the impression that I need an accelerometer for this to be accurate on different surfaces and to maintain a single speed?

Thoughts on this please :) And whats the best way to go around getting an accelerometer on it.

Doesn' t the car have speed control or is it just ON/OFF motor control ?

Just ON/OFF buttons for both acceleration and steering.

Marshiewoo: One thing I dont know how to do is control the speed. I've used an analogWrite command which works fine but I am under the impression that I need an accelerometer for this to be accurate on different surfaces and to maintain a single speed?

Rather than an accelerometer, monitor the speed of the drive train. You can either monitor the rotations of the wheel, the output shaft, the motor shaft, or any point in between. It will really depend on your mechanical modification ability, as well as what part is easier to access and modify.

Basically, you can use either and opto-slot encoder/sensor, or a side-looking encoder/sensor. Basically, these consist of a phototransistor and an IR LED - either facing each other with a gap in the middle (slot encoder), or both pointing sideways, sometimes with a baffle in between (side-looking).

In the case of the slot encoder, a "wheel" mounted on the shaft to monitor has a bunch of slots in it, which when the pass by the sensor, alternately expose and hide the light - creating pulses that can be monitored; in the case of the side-looking encoder, the light from the IR LED is reflected by a round disk with alternating dark and light sections - again creating a pulse to be monitored.

These pulses are proportional to the speed at which the shaft is turning, obviously. Here's some links to look at:

http://en.wikipedia.org/wiki/Rotary_encoder http://www.societyofrobots.com/sensors_encoder.shtml

Note that encoders don't always have to use optical means - magnets, reed-switches, hall-effect sensors - even lobed cams and microswitches all can be used for monitoring the rotation of a shaft. Also, some encoders can give you absolute position (so you know at what angle the shaft is at); this is how a hobby servo works, for instance (using a potentiometer for this).

Now for speed - here's how it works:

You set your motor speed (however you do that), and you monitor the pulses from the motor output shaft. These pulses will be proportional to the speed you have set when it is "free running" (no load). Let's say you can set the speed from 0-100 - and the number of the pulses is equal to the setting (in the real world, this will not likely happen); so if you set the speed to 100, you'll get 100 pulses out.

Obviously, if you set the motor for 100, and you are going up a hill and only get 90 pulses out - you can't do anything (because you can't make the motor go faster). That said - if you set the motor for 75, and you get fewer pulses out, then you know you have to increase the setting (say to 80 or 85), because something is bogging things down. If you are at a setting of 80 to the motor, though, and your number of pulses is 95, then you know your surface is allowing you to slip in some manner (or you are going downhill) - so drop the number of pulses.

This would be a constant monitoring and change system - it is in essence a servo feedback loop, just like an R/C servo tries to maintain a position (and a thermostat a set temperature), in this case you are using servo feedback to maintain a set speed. There are simple and complex ways to do this servo feedback and such; the simplest would be a comparator function with a percentage window to help avoid oscillation and overshoot, a more complex (or maybe most complex) would be a PID controller.

While an accelerometer could be useful in other ways (and I am not trying to discourage you from investigating it), it might be overcomplicating things where a simpler solution might work just as well.

I guess buying an RC that has speed control is out of the question ? (then you could hack it using the Servo library)

Yeh, I bought this one quite expensive!! :stuck_out_tongue:

I am able to control the speed using the

analogWrite(9, 500);

command, and I imagine that is the same as what having a potentiometer RC car would do. I just don’t think it’s very stable.

FOR EXAMPLE. I want the car to slowly approach a wall, and slow down to come to a stop just before touching the wall. I have some ultrasonic sensors coming by post, but I can’t see this helping with the actual slowing of the car, just being able to determine where a wall is.

Thanks

If you have speed control then what you are describing should be totally doable.

Okay thanks, I will have to wait for my ultrasonic sensors to arrive, because I'm struggling to see any other way for the car to slow down before hitting the wall! ;)

Thanks!!

You know as well as I do that RC cars are not made to brake because they don't have to follow any traffic laws. They coast. The only way I can think of to slow it down is add electronic braking by adding a relay that puts a low resistance power resistor in parallel with the motor. You can also add an electrolytic capacitor which will suck the voltage right off the motor leads when the relay connects it because it will start charging rapidly pulling the motor voltage low momentarily. The resistor will pull the motor voltage down to a very low value immediately slowing the car. If your PWM the transistor driving the relay you can effect Progressive Braking Control with a 0 to 255 value with 0 being no braking and 255 being continuous braking and everything in between being progressive. If you wanted to go crazy you could have more than one resistor switched in resulting in SLOW BRAKE, HARD BRAKE capability, or just use it for PANIC STOP mode.

hahaha! I suppose there are no need for brakes when the operator is capable of operating the reverse button.

One thought could be a small servo that presses against the wheel when forward and backward functions aren't in use.

:p