Tuesday 2 April 2013

Lap Timer

SAM_7979

I built this circuit to test the time taken for a line following buggy to complete one lap in a track that I created. Myself and my friend used this circuit to measure the best time taken.
The circuit consists of
  • 2 push buttons to select which user is racing next
  • LCD display to show the best time and the current time while the timer is running
  • A power supply consisting of a 9V battery connected to two voltage dividers that step down the voltage to 5V and 3.3V.
  • A sensor circuit fabricated by my friend which outputs a logic high when the sensor detects any object in front of it at a limited range.

SAM_7968

SAM_7971

To get started, I built the circuit with an Arduino Uno R3. After successfully making basic connections to the arduino and debugging my code I decided the make the circuit with a MSP430 to make it smaller and more portable.
The MSP430 operates at 3.3V but the LCD display needs more than that to record a logic high. To overcome this problem AND gates were used to increase the output to the LCD display connections increase to 4.5V.

SAM_7978

If you want to create a similar circuit with an arduino all you have to do is the following.
  • Read and be familiarised with the “Liquid Crystal” library that comes with the Arduino software.
  • Make connections to the LCD display as shown in the library.
  • Fix two switches and wire it to the arduino.
  • Get a basic IR emitter and a receiver (It is easier to get a TCRT5000). Then wire the receiver same as the switches. Instead of connecting it straight to the arduino, connect it to a comparator and use a voltage regulator to control the output signal.
  • If necessary use a Voltage regulator to drop the voltage from your source to 5V.

You can write your own program. but here is a copy of my program.
 

 Here is a demonstration

No comments:

Post a Comment