profmason.com

December 12, 2007

RC Car interface

Filed under: Electronics, PicAXE, Robotics — profmason @ 6:04 pm

rccar.jpgI visited the local second hand store and purchased several RC vehicles. As usual most of them did not come with the associated remote control. However as luck had it, I was able to pick up a Tyco/RC car with controller for $3. This Tyco product was remarkably good quality inside and out(Compared to many other RC products I have taken apart.)

The car has a dc motor connected to a two speed switchable gear train that drives the rear wheels. There is basically a solenoid up front that shoves the front wheels hard right or hard left. There is no ratiometric control on this car. One final feature is the two curving metal pieces connecting the front of the chassis to the rear. These not only act as giant bumpers and strengthen the chassis, but one of them acts as the RX antenna.

The remote control operates at 27Mhz and appears to use an amplitude modulation scheme. I decided to interface the remote control to the PC.

After some false starts here is what works. There are a set of metallic contacts that the switches on the RC controller make and break. This controller is not ratiometric, so I just drilled a hole inrctransmitter.jpg the middle of each contact and wired into it. The middle is tied to ground on the microcontroller board and each of the outside contacts is tied to the output of a ULN2803 darlington array. The strategy is that the microprocessor will have the darlington array connect each of the contacts to ground. You need four microprocessor outputs to do this. (With clever logic you could do it with three outputs, but that would increase the part count.)

Now the microprocessor receives serial commands and interprets those to turn on the appropriate channels on the RC car. The RC transmitter provides its own power which is isolated from the microprocessor. (This means that you need to keep batteries in the transmitter.)

The transmitter seems to have a range of about 10 meters.

symbol forw = 2
symbol back = 3
symbol right = 4

symbol left = 5
setfreq m8

main:’Get a value from the terminal

serin 4,N1200,b0
’serout 0,N1200,(#b0)
if b0 = 56 then goforward
if b0 = 57 then goforwardright
if b0 = 55 then goforwardleft
if b0 = 51 then gobackwardright
if b0 = 50 then gobackward
if b0 = 49 then gobackwardleft
if b0 = 53 then gostop
low backrctransmitterinterface.JPG
low right
low left
low forw

goto main

gostop:

low back
low right
low left
low forw

goto main

goforward:

low back
low right
low left
high forw

goto main

gobackward:

high back
low right
low left
low forw

goto main

goforwardright:

low back
high right
low left
high forw

rcpcbfront.jpg

goto main

goforwardleft:

low back
low right

high left
high forw

goto main

gobackwardleft:

high back
low right

high left
low forw

goto main

gobackwardright:

high back
low right
high left

low forw

goto main

Next a simple Roborealm interface was written to take keyboard commands as input and output the appropriate serial commands. The car can now be driven from Roborealm. Here is a picture of the picaxe based interface board. The process of making this board deserves a page of its own.

1 Comment »

  1. [...] decided to try to make a PCB board for the RC transmitter interface board I made previously. I had spent the time to draw up the schematic for the circuit, so I [...]

    Pingback by profmason.com » Making a PCB board — December 13, 2007 @ 12:36 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress