Computer Controlled RC Car
August 2003
Update August 2012:
See the Programmable RC Car article for an updated version of this project.
This project article was originally written in 2003 when most computers had parallel ports. This is no longer the case, so much of this information is now outdated.
Introduction
I started getting interested in parallel port interfacing Dec. of 2001. I was taking a high school "Computer Engineering" course and as a bonus the teacher Mr. Damian said we should research how to control an 8 segment display through the computer. I researched and started out in QBasic. It was very neat when I was able to switch an LED on and off via the computer. I then built a circuit using 8 NOT gates and and a number display. From then on I've been quite interested in parallel port interfacing. Later that year I bought an LCD Screen and interfaced it to the parallel port.
I thought up the idea that it would be really
cool to control a remote control car controlled
by the parallel port. I did some research and Mike
Beauchamp did just that and to top it off
it's controllable over the internet (atleast
it used to be). For Christmas I requested one
of those Mini RC cars and off I went.
Want to build your own? How-To
Guide now avaliable in the Articles
Section.
Hardware
The first thing I did open up the remote. 3 screws - no problem. The PCB (middle pic) is exposed and you can clearly see the 2 LEDs and the 4 buttons. There is a screw on the PCB that you can take out and expose the solder side (right pic). I then soldered 1wire to each of the 4 buttons and 1 wire to the common ground. The wires are connected to a connector (see pic below) that I cut off of an old serial port connector.
Up-close solder connections. Gotta love the shrink tube. |
Finished Remote. Aint it pretty? |
The remote closes up nicely with the connector exposed (above, right of the remote). I wanted to do this project without wrecking the remote so that it can be driven without the PC if wanted. The next step involves the contruction of the cable to interface the remote to the PC.
This is the cable I built to interface the remote to the PC's parallel port. I used a standard parallel port connector ($1.00 @ KWSurplus), 4 2N3904 transistors, solder board and floppy drive cable. I'm not very proud of my solder job (right pic). It's extremely messy, but functional. The middle pin of each transistor is connected to 1 pin of the parallel port. One pin on each transistor is connected to both the ground of the computer and the ground of the remote, making a common ground. The last transistor pin is conncted to a pin that connects to the remote (left pic). The pins in the left pic connect to the remote adapter connection. When a PC parallel port pin is turn high (+5V) it completes a circuit between a remote button and the common ground, simulating a button press. In this way, the car's movement can be precisely controlled via PC software (see below).
Software
As I was building it, I was testing functionality
with QBasic because of it's easy to use parallel
port control. After I knew everything was working,
I wrote a fairly simple program (just the main
screen) and then modified it considerably for
my Gr 11 computer science final project.
Main Screen:
The car can be manually driven via arrow
keys or A-W-S-D. The arrow directions turn blue
when the corresponding key is pressed.
Config / Extras Screen:
This is the bulk of the program. You can temporarily
change the port that the program outputs to, have
the car be controlled via random motion, write
a sequence of movements (in a txt file) and have
the car follow them or have the car runs one of
the 4 predifined sequences. Options are setup
in config.txt included in the zip file. Extensive
documentation on the software can be found here and you can download (and hopefully use) this
software here.
Source code for a similar, but simpler example program can be found here (also written in VB6).
Pics
Fits Nicely Together |
Project Cost
Item: | Cost: |
Mini RC Car | 23.00 |
Solder Board | 0.50 |
Transistors | 1.50 |
Wires, cables, connectors | 3.00 |
Total: | $28 |