loading
Picture of Put your R/C car under computer control
DSC00822.JPG
A step by step instructable on how to take any R/C car and control it with your computer
 
Remove these adsRemove these ads by Signing Up

Step 1: Overview

my friend leslie got me a radio controlled rat, so I decided to make a computer interface for it (because I'm a huge dork)
This instructable shows how to hack up an R/C car and connect it to your computer. I made a web interface for mine so that my mom could drive a little car around my room from north carolina (I'm in boston), using a webcam to watch it.
This is pretty fun project, takes about an hour to solder up, and if you can make toys computer controlled, you'll uh.....have lots of friends
Also, I'm writing an instructable on using an R/C car to make a digital radio link. Stay tuned, amigos.
-al
http://www.artiswrong.com

Step 2: Get the parts together

Picture of Get the parts together
DSC00805.JPG
so, this is what you need:
an old R/C car and its transmitter--this current version might work for transmitters with digital proportional control, but it's designed for transmitters that just have on/off buttons
a proto board--I really like the radio shack PCB boards that are basically breadboards, except pcbs.
an atmega48--smaller processors will work, too, but I have tons of these around, they cost $1.65, and the code I wrote is guaranteed to work for them
a max232 chip (or a max233, if you're rich, lazy, and classy)
a female DB9 connector (with soldertails)
4 1uF capacitors(for the max232 chip)
a 7805 voltage regulator
as many 2N2222 transistors as you have buttons on your transmitter (I had 6)
a 1K resistor for each transistor

Step 3: Get some tunes

everything is better with music. Take some time and rock out. I'm listening to Vitalic's OK Cowboy album right now, and it's really good. If you're into variety, grab one of my mixes at http://www.artiswrong.com/alex/mix

Step 4: Start actually doing things

Picture of Start actually doing things
OK, let's get down to brass tacks (how much for the ape?) (anybody get that reference? somebody? please????)

open up the transmitter. It probably looks like the picture below. Be careful with the battery wires--they can pull out really easily on some transmitters, and then it's hard to figure out where they went. You might as well just mark where they are now, and then you can fuggetaboutit. Same goes for the antenna wire, if the antenna's not soldered directly to the board.
Now, find the buttons on the remote that make the car do stuff. Give the transmitter power, and using a multimeter, find out which end of the button is at a high voltage and which end is at ground. Remember this.

oh yeah--a note on the buttons. They tend to be DPST buttons, since those are sturdy if you solder them, but they're used like SPST buttons, meaning that when you press the button, all it does is connect one wire to one other wire. Since each button has 4 wires, you'll need to figure out which ones are actually used. Use the multimeter, luke

Step 5: Solder on the transistors

Picture of Solder on the transistors
OK, remember how you just figured out which of the button's leads had a high voltage on them and which were at ground? Cool.
Now we're going to solder transistors to the buttons so that we can control the current flow from another circuit. And by 'we', I mean you. I already did it. That's where all these pretty pictures came from
OK, so you'll want to solder the collector lead of your transistor to the high voltage pin of the button, and the emitter lead to the ground pin of the button. Bend the base lead out of the way, so that you can get to it later. Do this for each button.

Step 6: Build some more stuff

Picture of build some more stuff
DSC00815.JPG
So, now you want to build the circuit from the schematic below. The transistors at the bottom are the ones you just soldered onto the transmitter. And oh yeah--THIS IS IMPORTANT! Don't forget to put your microcontroller in an IC socket. Otherwise you'll be very sad when you want to program it. For now, don't worry about where the VCC for your 7805 is coming from (this will be the 9V we use to power the transmitter).
Feel free to put on a power LED, too. Doing that always gives me a warm feeling inside

Step 7: Connect your board to the transmitter

Picture of Connect your board to the transmitter
OK, so now, solder the 1K resistors onto the base leads of each transistor on you transmitter. Now, solder wires from each of the resistors to the PB0-PB5 lines of your microcontroller. (Remember that my transmitter had 6 buttons, so if yours doesn't have that many, don't feel bad.)
Connect the positive battery(probably red) wire from the transmitter to the 7805's VCC pin on your board. Connect the ground wire to ground on your board.
And now's probably a good time to wire up the serial DB-9 connector to your board. Connect the PC_TX line to pin 2 of the DB9 connector, the PC_RX line to pin3, and the GND line to pin 5. There are tiny little numbers on the solder side of the DB-9 connector that should give you an idea of what I'm talking about. If you don't see them, look up DB-9 pinout in google, and that oughta help

Step 8: Program the microcontroller

OK, now you want to flash the micro with some code to let it talk to your computer. If you have an AVR burner, burn cujo.hex onto the micro. The code is in cujo.c, if you're interested. If you want to use the makefile, just get rid of the .ale extension--instructables doesn't let up upload extensionless files

If you really want to make this, but you don't have an AVR burner, email me at enjrolas@mit.edu and I'll send you a burned micro if you send me like $5. I might also make a kit for this, with a printed circuit board and all the parts you need (including a cheap R/C car), if enough people are interested
cujo.hex848 bytes
cujo.c942 bytes

Step 9: Hook it up to your computer

Plug your computer's serial cable into the board you just made. Give the board 9V and ground, and run the program radio that's listed below (remove the .run extension--again, instructables with that no-extensionless-uploads thing)
It's compiled for a linux machine. This code will only work on linux machines, I think. The source is in radio.c, also listed below.
The code I wrote uses the numpad to control the car. Be sure that num lock is on. Also, ESC closes the program.

If you want to write your own code, either because you have a PC/mac or just feel sexy, the details are:
the chip talks 4800 baud 8N1 serial.
the program is very simple--it will just spit out whatever number you send it on portB. If you send it '1', it will turn on button 1. '2' will turn on button 2. '4' will turn on button 3, etc.
email me at enjrolas@mit.edu if you have questions

Step 10: Done! (at last)

cool. You're done. With any luck, you should be able to drive your car around with your computer. If you think this instructable is cool, but it seems like to much hacking, or you don't have all the parts, I could put together a kit. Email enjrolas@mit.edu if you're interested.

I hope you enjoy it.
By the way, you should be able to drive my car around(in my room) and watch it on a webcam soon. Check out http://www.artiswrong.com

see you later,
alex
1-40 of 81Next »
eile20511 year ago
Phidget
krisquinney3 years ago
this is the coolest ible.
andikovaci3 years ago
man you are a genius
emaan3 years ago
hi make this circuit but one problem occurred car is going automatically without pressing any key although i code it which is fine ...now any idea??????????????
rverma83 years ago
where do i find these chips
rverma83 years ago
is there any easy way to control rc car by pc
minijc4 years ago
why dont you just get one of those big track cars and make the control pannle wierless sory about my bad spelling
As I'm searching I'm finding that most of you are extremely smat and very good at what you do. I have a dilemma involving R/C as well. I'm trying to build a 48 channel fireworks ignitor. As it stands it's almost complete but it's not wireless. Right now I have to plug a cord into an RCA jck on the board and the other end is connected to an electric match. I got all that. What I need help with is making this an optional "wireless" unit so I can stand back withmy guests at my party and ignite my fireworks from a few feet away. The problem is that the biggest R/F transmitter / receiver I found was only 15 cannels, and it was expensive enough that it wouldn't be cost effective to buy 3 of them plus and additional 3 or 4 channel to build it. I'm extremely limited on experience with eectronics and have no experience with IC's but I'm willing to learn if someone can pont me in the right direction. Thanks.
Venemot4 years ago
Hey guys the best and easiest way to control something with your pc is by using a phidget.....just connect two wires to each button as written in this instructable but no need for checking power or ground .....connect the wires to the relays in the phidget and connect the phidget to your pc via the usb cable that is usually supplied with the phidget....i would have already made one but i couldnt find phidget....they are not available in my city....you can buy one at computer stores....the programming is easy although i dont know how to do it.... a friend of mine who is a computer genius(i wouldnt call him a geek....which most people will) told me it is easy and told me when you are done with the hadware work inform me and i will help you with the programming......really people once you use a phidget you will forget that something named serial port ever existed......you can find phidgets with minimum 4 and maximum (i think more than)10 relays.....
Venemot4 years ago
It is really good and i have been trying to do this but i cant find all the stuff, i dont understand the schematic pics and i am not very good at computer especially programming so i cant make it right.I will keep trying.And once again FANTASTIC
yusca4 years ago
ooops!its hard to get those resources in where i live. can i get the requirements in old electronics????? pliz help

yusca4 years ago
excuse me please give me instructions on this whole project
matstermind4 years ago
would a max222 chip work?
i have the same idea as this, so can write a software program to control the car wirelessly please reply
diyman6 years ago
Nice Work! have you tried it with this type of controller. i am very well looking forward to controlling a rc car with my pc Great work again.
rc-transmitter.jpgrc-transmitter-stick-movement.gif
 hello my name rob can you tell me how much it will be to do this 
lj1234565 years ago
can this project be done with a arduino
Chiranjeeb6 years ago
cool.. i like it dude....
pazvlad6 years ago
Fear and loathing in las vegas!!! I win
cool insructable!
Miffy206 years ago
I'm a beginner when it comes to things like this. I could use some more detailed help and making a kit for this would be great!
hhaha WO too much tech for my brain. but i can see how someone who really wanted to do this could..i was just skimming it. but nice
>(how much for the ape?) (anybody get that reference? somebody? please????) Are you referencing the cartoon with the ape that lived in a pet shop?
prank (author)  millingabout7 years ago
no! nyet! non! bu!
is it a brass monkey
its a brass monkey. right?
will this by any chance damage my motherboard or paraller port?
This is very cool! It would be even better if you applied this to a full-sized car!!!
cool
You could always use this software from herehere.If using windows download ksi8 winall.exe for windows.It is designed for a relay board which they sell but I use it for my LED grid.It uses the parallel port on a computer or laptop.
amithav6 years ago
Nice work...Can we control this using my joystick...How...?
adi121047 years ago
sir i have already read your tutorial and i very interested so i change your cujo program so it become like this
===================================
#include <avr/io.h>
#include <inttypes.h>
#include <avr/interrupt.h>
#include <avr/signal.h>

uint8_t buffer[256];
uint8_t head=0;
uint8_t tail=0;

unsigned char noids[16];
unsigned char noids_index;
unsigned char flop;

char a;
char sel;
char o1;

void usart_putc(unsigned char c) {
// wait until UDR ready
//while(!(UCSR0A & (1 << UDRE0)));
UDR = c; // send character
}

void delay(int del)
{
int del1, del2, count;
for(count=0;count<del;count++)
for(del1=0;del1<20;del1++)
for(del2=0;del2<1000;del2++)
;
}

void uart_init()
{
UCSRA = (1<<RXC);
UCSRB = (1<<RXEN) | (1<<TXEN) | (1<<RXCIE);
UCSRC = (3<<UCSZ0);
UBRRH = 0;
UBRRL = 12; //4800 8n1
}

SIGNAL(SIG_USART_RECV){
a=UDR;
PORTB=a;
usart_putc(a+1);
}

int
main (void)
{
uart_init();
sei();
DDRB=255;
DDRC=255;
DDRD=255;
while(1)
{

}

return (0);
}
==============================================
i just want to ask your opinion about this code will it run in atmega32 because in my country i only can find this and i cant buy from digikey because i dont have any credit card
thanks
please reply me as soon as possible

You have to watch yourself out here. This is bat country.
prank (author)  mightywombat7 years ago
yyyyyyyyessss!
Can't believe nobody got that...
twhaley7 years ago
Does anyone know how to access the address and data bus from vb6? i used to be a computer genius in the days of quickbasic and vb3, it was inp and outp but now vb6 and vb.net make it difficult. (fear and loathing btw). all i want is to read from and write to adresses from vb6 or vb.net without going back for my masters and re-inventing the wheel. Irecently move out of my mothers basement and I even kissed a girl once so don't think i'm a dork or anything.
What address and data bus? IF you mean the parallel port, then go to http://logix4u.net/, and download their "inpout" dll.
NapalmJoe9 years ago
Any chance you could do this with an Xmod?
xmods rock! i got the new evolution line and they are soo much better. ive spent like 400 bucks total on all of my 3 xmods!
prank (author)  NapalmJoe8 years ago
what's an xmod?
1-40 of 81Next »