Skip to content

Arduino-based speed measuring device for model trains.

Notifications You must be signed in to change notification settings

twrackers/TrainSpeedometer

Repository files navigation

TrainSpeedometer

The TrainSpeedometer sketch runs on an Arduino-class microcontroller, using a pair of sensors (usually optical) to measure the scale speed of a passing model train.

This version uses a pair of Adafruit VL6180X time-of-flight ranging sensors. The sensors measure the time which pulses of laser light need to travel to the object being sensed, and then reflect back to the sensor. From this the distance to the object is calculated and returned in millimeters. These distance measures are not used to calculate the speed, but allow the code to determine if the object (the train) is present in front of the sensor or not, and is within a preset range of accepted distances. Using the range does allow the code to ignore trains passing within the sensor's field of view (FOV) but which are not within a preset range of distances, such as trains on tracks other than the one being monitored. It can also be used to ignore fixed objects behind the track.

Dependencies

About

Arduino-based speed measuring device for model trains.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published