Gregory GriffesTroy Gentry
Published

RC Car Hack To Smart Car

Want a cheap and awesome smart robot car? Why not buy an RC car and convert it? This project shows how to hack the hardware and get control.

IntermediateWork in progress2 hours1,048
RC Car Hack To Smart Car

Things used in this project

Hardware components

RC Car - Street Warrior Off Road Pickup Truck
×1
Breadboard (generic)
Breadboard (generic)
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
SparkFun Breadboard Power Supply 5V/3.3V
SparkFun Breadboard Power Supply 5V/3.3V
I got 5 and 3.3 from the Nscope, but any supply will work.
×1
Resistor 100 ohm
Resistor 100 ohm
×4
Resistor 330 ohm
Resistor 330 ohm
schematic shows 470, but 330 will work too
×4
Resistor 10k ohm
Resistor 10k ohm
×4
PSoC 4 Pioneer Kit
Cypress PSoC 4 Pioneer Kit
×1

Story

Read more

Schematics

Typical RC car motor controller

This is a schematic for the typical motor controller board on an RC car. The partial rectangle on the left is the integrated circuit that feeds electrical signals from the remote control to the motor controller.
I drew circles around the electrical nets from the integrated circuits where we will hack into the motor controller and disconnect it from the remote control decoder integrated circuit.
I removed "R13, R14, R15, and R16" from the motor controller board to disconnect the on-board remote controller integrated circuit. In the next schematic I will show how I took control of the motor controller using switches.
Dsc08428 36wli3i5ra

Remove resistors from RC car motor controller board

This is the motor controller board in the RC car. You can see power from the batteries coming to the board on the brown and black wires, rear wheel wires are blue and white and front steering wires are red and black. The important thing to notice are the resistors R6 and R4 along with two other resistors covered up by the black wire from the switch.
I was able to determine that those four resistors are the equivalent to R13, R14, R15, and R16 on the schematic. I used a volt meter to look at the voltage output from the remote controller integrated circuit to the resistors and then by flipping the controls on the remote controller determine which resistor performed which function. Then, I removed the tiny resistors with a soldering iron tip being careful not to damage the pads on the circuit board.
Dsc08417 zsnfblykai

Wiring to the motor controller board

Now you can see how I soldered the green, yellow, white, and orange wires to the transistor side of the motor controller completely disconnecting the remote controller integrated circuit outputs from the motor controller.
The new wires represent control as such:
Yellow = steer right
Green = steer left
Orange = rear wheels forward
White = rear wheels reverse
Dsc08423 bt60k3wwfk

Breadboard schematic

On this schematic, I had to convert the +5VDC down to 3.3VDC to drive the motor controller. Then you can see each switch and the voltage dividers and current limiter. When the switch is not pressed, the base of the H-bridge transistor is grounded through a 10K resistor and turned off. When the switch is pressed, current flows from 3.3V power through the 100 ohm resistor and the 470 ohm current limiting resistor to forward bias the transistor which turns on the bridge and applies curren to the motor.

WARNING: H bridges are highly susceptible to being toasted (i.e. burned out, flame out, smoke released, etc.) If you turn on two switches at the same time, such as forward and reverse, you will short power to ground through the H-bridge transistors, thus exceeding the collector current rating for both transistors. The tiny little silicon traces inside the transistors don't like that and will POP! The same thing can happen if you miss wire the breadboard, so, be careful and test it with a volt meter before you hook it up to the RC car motor controller.

WARNING 2:
The 470 ohm current limiting transistor has a very important purpose of limiting the base current to the transistors in the H-bridge. The 100 ohm resistor will probably protect them for a while, but you don't want to exceed the base current on the transistors for long; they will POP too.
Switch breadboard schem wflj3svdcj

PSoC wired to motor controller

Now, instead of a breadboard, the Cypress PSoC 4 Pioneer kit is mounted in the bed of the truck and wired to the motor controller.
Dsc08438 toiiy8m4lg

Workshop challenge slides

These are the slides for the workshop on Saturday

Empirical velocity and acceleration measurements

By programming the PSoC to run the car at time intervals and by measuring the distance (on a hard floor) one can calculate and graph the velocity, acceleration, and wheel angular velocity. One interesting thing to note is that the wheel diameter is 3.8 inches or 0.3167 feet. When multiplied by Pi, the result is almost 1 which results in the angular velocity almost being equal to the linear velocity.
Velocity and accleration rmeasurements dx1trhfakx

Code

Cypress PSoC project archive

C/C++
This is the project archive that can be opened in the PSoC Creator development environment
No preview (download only).

Debounce circuit

C/C++
This includes the latching debounced switch
No preview (download only).

Final-Design-drives-in-a-square-pattern

C/C++
Final design working on the car
No preview (download only).

PSoC Creator bundle zip for measuring velocity and acceleration

C/C++
In this design, I dumped the down counter to simplify the design and set the clock at 2Hz (500ms period). In the LUT, it's easy to run the car in 0.5 second increments by just adding a 1 or 0.
No preview (download only).

Credits

Gregory Griffes

Gregory Griffes

3 projects • 6 followers
Experienced electrical and computer engineer.
Contact
Troy Gentry

Troy Gentry

1 project • 2 followers
Contact

Comments