Hacking an RC car

I began hacking remote controlled toys and electronics. I open their controllers and use jumper wires to connect their logic boards to my Arduino Uno. I can control their motions using code I upload to the Arduino.

I bought a cheap RC car which had push buttons for motion, which meant that it would be easier to hack. I opened its controller and found that the respective button would pull the other end to a HIGH voltage, so I attached wires to those parts and connected them to the Arduino. 

I was able to use a set of pre-specified commands to control the car without any extra input necessary. I moved on to program a real time command system using Python and the serial library to send commands to the car from the Python terminal. I also experimented with an obstacle avoidance system by attaching the controller to the top of the car and using an HC-SR04 ultrasonic sensor for distance detection.

I own a Nintendo Wii console, and some of its bundled accessories and controllers. With the help of several other hobbyists on the internet, and various blogs and websites, I was able to find the pinout diagram for the Wii Nunchuck accessory. It runs using the standard I2C interface and I was able to use the Arduino 5V power line directly without an issue.

Below I have a pinout of the Nunchuck:

Nunchuck schematic

I was able to use the Nunchuck’s inbuilt three-axis accelerometer to sense my hand movements and a useful Arduino library I found online to convert these movements into quantitative data. I was able to effectively use the Nunchuck as a tilt sensor after modifying the code to detect swinging to the left/right and front/back uniquely. The sensor is quite robust, but does erroneously detect an occasional sudden movement as an input. To remedy this, I am planning to introduce an averaging over a few movements to reduce random error.

I was able to use these movements of the Wii Nunchuck as inputs to the RC car, thus effectively creating a remote-gesture controlled car. The three-axis accelerometer was not used to its full extent in this project though, since only two degrees of freedom exist for a car, that is, two axes of motion along which to travel. I would also not classify this as true gesture recognition, this is only tilt sensing applied to a physical object. I intend to work on a computer vision based gesture recognizer in the near future.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s