The goal of the project is to design and build an AVR ATtiny26L microcontroller-based model railroad car that helps locate and diagnose problems with your layout and track in order to improve the overall running performance of your model trains. The Diagnostic Track Inspection Car operates as it is pulled around the layout with a locomotive, just like any other rolling stock in your collection. The Track Inspection Car alerts the train operator of any potential trouble spots by sounding an audible beeper and simultaneously lighting color-coded LEDs. The different LEDs convey the nature of the problem encountered at that specific location of track.
Thomas Myers, the project designer, said that this unique and novel design automates the otherwise tedious task of visually inspecting every inch of railroad track for small physical misalignments, bumps, or gaps between track sections. The automated Track Inspection Car also limits the need for manual electrical meter troubleshooting to locate voltage dropouts or “dead spots” caused by dirt, corrosion, or bad rail joiner connections along your track rails.
A two-axis ±2g accelerometer is used to detect excessive side-to-side or up-and-down vibrations that may indicate a rough rail joint or other potential source of derailments. The sensitivity of each axis is adjustable via two trim potentiometers; this allows the user to adjust vibration alert thresholds for each axis independently. A simple voltage divider circuit is used to scale the railroad track voltage (typically ranging from 0 to 14 VDC) down to about 0 to 3 VDC for input to the AVR’s Analog/Digital Converter. The accelerometer and track voltage inputs are also processed through the ATtiny26L’s built-in 10-bit ADC.