The setup used for the speed display used in the rail vehicle that will be used to compete in Delsbo Electric 2016 in Delsbo, Sweden.

Setup instructions:

  1. Connect everything according to the circuit schematic. (Replace the Sparkfun reflective object sensor with an optical sensor (see link in sidebar).
  2. Download the code files, place them in the same directory and edit the variables so that they fit your setup.
  3. Upload the code to your Arduino.

Now you can trigger the optical sensor by placing any solid metal object (like a coin) between the sensor's fork tips. Each time it's triggered, the time between triggers is calculated and the various speed variables calculated.

The loop function checks these values and, if they've changed, prints them on the LCD.

 

When you get close to your next "speed mark" (at which you should change your engine speed), the new potentiometer angle is shown on the display, along with the time until you're at the mark.

 

To learn more about the project, visit our Facebook page!