RoboCAR – Arduino RC -> Robot project

RoboCAR testdrive hookup

My oldest son got an RC car for Christmas a few years ago, but now he’s lost the remote and hasn’t used it in ages. So I asked him if it was ok for daddy to mess with it and see if we couldn’t build something cool out of it instead of it just sitting there gathering dust.

RoboCAR 1.0

Now, him being a cool kid and all, he let me start the work. First thing we did was have a look at what was already inside to we could determine what we needed to build to let this car drive on its own.

Inside of the RC-car before rebuild

Inside there were 2 DC-motors, the one driving forward bigger then the one driving the steering. The battery-pack located underneath was of course dimensioned to drive these motors, so we’ll be using that to power the car, while we have a separate power supply for the Arduino which we are using to steer the vehicle and analyze input from sensors to avoid hitting stuff.

Ping sensors

For controlling the distance to the nearest obstacle I decided to use ultra-sonic sensors. These send out a sound the ear can’t hear, and calculates the distance based on how long it takes for the sound to bounce back. I’m planning on using one in the front and one in the back of the vehicle. First I had to test them on a breadboard to make sure I understood how these worked and was able to get a reading from them. The sensors are a pair of HC-SR04 from DealExtreme (US$4.00).

These worked great together with the NewPing library for Arduino.

I used this code to test them, and got readings in my Serial Output window:

To drive the motors I ordered a L9110 DC / Stepper Motor Driver, also from DealExtreme (US$4.30). This shield can be used to control two DC motors with external power supply, so fits perfectly for this project.

After hooking up the wiring like this:

  • GND – GND on the external power supply
  • VCC – positive on the external power supply
  • B-IB – pin 9
  • B-IA – pin 6
  • A-IB – pin 5
  • A-IA – pin 3

To try this out I uploaded the following sketch to the Arduino:

This proved to work and it drove one motor at half-ish speed for 10 seconds, then the other at full speed for 10 seconds and repeating.

Now the time had come to hook it all up to the chassis and combine the code to go for a test drive.

RoboCAR testdrive hookup

Here you can see everything hooked up and ready to go for a test-drive.

I uploaded the following code, really just a combination of the earlier, separate ones for the motors and the ultra-sonic sensors.

This resulted in this:

At least it went forward and backwards like it should, but I need to set up the sensors in a better way. I’m thinking maybe on the front roof. After this was shot the vehicle got stuck and one of the motor controllers burned so it needs to get replaced (luckily I’ve got another one lying around). Before hooking the other one up I need to figure out how to stop the motors if it gets stuck.

Updates will come as the project progress.


2 Comments on RoboCAR – Arduino RC -> Robot project

  1. Hi Arduino r/c car great but if a tv remote is used with a infared sensor what would the same schematic look like?

Leave a Reply