Beginners car project


A wheeled robot that moves around and uses a flex (bend) sensor to detect collision. Videos: low(0.5 MB) and high (4MB)

Things needed
Total excluding LEDs, resistors, Voltmeter and USB cable is about $110.

How to build
  1. Building the magician chassis. See the instructions that come with the chassis.
  2. Download arduino software and play with some examples before you start writing code for h-bridge and flex sensor. Link to Examples.
  3. Interfacing the h-bridges. See tutorial by Prof Winkler (link and cached file). You can extend this to power two motors. This will take 3 digital pins per motor on your arduino. 2 for direction control and 1 for speed control.
  4. Interfacing the flex sensor. The flex sensor is a variable resistor (like a pot). The resistance increases as the sensor is bent. Use a voltage divider circuit to interface the flex sensor. The flex sensor I used had a range of 5 - 30 kilo ohm. I used a 20 kilo-ohm external resistor in series with the sensor. This sensor takes 1 analog port on the arduino.

my_car_project.ino (.ino is arduino file extension. This can also be opened with text editor)

A tip:
Understand, interface and write code each component separately before putting it all together.

Ideas that failed
I was looking for various sensing options. Some failed ideas
  1. Infra Red (IR) sensor QRE1113 (analog). The idea here was to use a the IR sensor to do line detection. Here is the circuit I used to hook up the sensor (link and cached). My goal was to attach it to the chassis like this (link and cached file).  I gave up on this idea because I did not have a suitable track to test it.
  2. Optical detector QRD1114. The idea was to use this sensor detect obstacles. Here is the circuit I used (see end of page and cached). But the range was so small that the car collided with the obstacles all the time. The other more expensive proximity sensors on this webpage might have worked better.
  3. Electret Microphone. The idea was to use some sound (like a clap) to turn. The output of this is very low (~mV). This needs an op-amp to amplify the signal. I could not get the amplification to a significant value to be useful. On hind sight I would buy the breakout board for the mike (amplification done on the board and hence no need for op-amps).

Updated: 15 Nov 2012.