WiDrive
Home
About
Movies
Downloads
Team

 

Wi-Drive: Putting the Remote in Remote Control

Remote Control (RC) Cars provide an excellent platform for working with robotics. We have developed a system that will allow control of an RC car over a wireless network. This project spans the full range of embedded system development from building windows applications to pulsing DC motors.


This project was built around the eBox-II thin client appliance. The eBox communicates with a PIC 16f676 microcontroller via its parallel port. This microcontroller handles all the outputs to the motors on the car. The eBox receives its wireless capabilities through a Linksys Wireless Gaming Adapter connected to the Ethernet port. The eBox is using the Windows CE operating system and is running a server application. The server app receives commands from a client app also written in CE. For demo purposes we used a Windows XP laptop running a CE emulator.

 

Hardware


We used a Radio Shack RC Truck for our chassis. The large size gave us plenty of room for adding different components, while the high ground clearance and shock systems ensured that weight would not be an issue. The car is powered by a 7.2V ni-cd battery rated for 2000 mAh. Hacking the car’s controls was the first major hurdle. We were able to probe the circuit and find the controls for forward and reverse, however the steering was another issue. The steering mechanism was connected to the main board via a 6 wire bus. This was obviously not a standard servo as servos have only 3 wires. We entertained the possibility that the steering was controlled by a stepper motor, as these generally have 6 control wires, but our analysis again led to a dead end. Ultimately we discovered that the steering mechanism was simply a DC motor connected to a potentiometer for encoding. Once we had the basics for controlling the car we were able to program our microcontroller to control the functions of the car.


The eBox, wireless adapter, and microcontroller circuit were mounted to the car using zip ties. The parallel port of the eBox was then wired to the appropriate pins of the microcontroller along with the motor control lines to the car circuitry. Two TC4429 power MOSFETs were used to provide enough current to power the steering.


The design necessitated a totally wireless setup on the car so we had to develop a power system to run the onboard electronics. Our first thought was to use the cars battery to power everything, however the 7.2V 2000mAh battery had neither the power nor the voltage to drive both the car motors and the various other systems. We therefore had to add an additional battery that would power the electronics. Combining an 8.4V, 3000mAh battery with a 5V, 3A voltage regulator gave us the 5V we needed to run the electronics and provided enough current to run the eBox, wireless adapter, and microcontroller simultaneously.

Software


When the user starts the client app it establishes a connection with the server via the windows winsock protocol. The client then waits for user input via the directional keys. Once a key is pressed the input is encoded into a single byte that contains all the information about direction and speed as well as trim information and transmits it to the server. The server runs multiple threads, the receive thread constantly listens for packets and updates the status byte when data is received. It then calls the main thread to write the new value out to the parallel port on the eBox. The parallel port is connected to the inputs of the microcontroller. The microcontroller process the input setting the appropriate flags telling the car to go forwards, backwards, left, or right.


Both the client and server apps are simple windows CE applications. There is very little to the GUI and all the networking is transparent to the user. Because Windows CE is not protected, the server app is allowed to write directly to the parallel port using assembly embedded in the C++ code. This allows easy access to the parallel port.