- Sun Aug 06, 2017 4:47 pm
#195764
I have been given, by the president of a charity operating a railroad history museum, the task of creating an automated system to operate what is referred to as a "home signal" for a miniature train ride at the museum. The facing, or "head", of the signal has these lamps, all of which are the same color:
The center lamp must illuminate as soon as power is delivered to the entire signal, and must also remain illuminated until power is disconnected. When illuminated with the center lamp, those on the extreme-left and extreme-right form the "stop" indication, lamps on the extreme-top and extreme-bottom indicate "clear", and lamps on the diagonal are for "slow".
The equal colors of a highway traffic signal are red ("stop"), green ("clear"), and yellow/amber ("slow"). All lamps on the railroad signal will be yellow/amber LED.
The control system needs these components:
The code that will be uploaded to the RedBoard must maintain the "clear" signal indication until the moving train has twice broken the ultrasonic signal beam, then change the signal to "slow" after the train completes the first loop around the track, and finally change the signal to "stop" when the train completes the second loop of the track. The museum volunteer who serves as engineer on the train crew needs to rely on a combination of the electronic signal indication ahead of them and a whistle indication given by the volunteer conductor at the back of the train in order to determine when the train should proceed or stop.
My current parts list includes these SparkFun items:
- Extreme top, extreme-left side, dead-center, extreme-right side, and extreme bottom
- 45-degree arc between the left-side and bottom lamps
- 45-degree arc between the top and right-side lamps
The center lamp must illuminate as soon as power is delivered to the entire signal, and must also remain illuminated until power is disconnected. When illuminated with the center lamp, those on the extreme-left and extreme-right form the "stop" indication, lamps on the extreme-top and extreme-bottom indicate "clear", and lamps on the diagonal are for "slow".
The equal colors of a highway traffic signal are red ("stop"), green ("clear"), and yellow/amber ("slow"). All lamps on the railroad signal will be yellow/amber LED.
The control system needs these components:
- a momentary push button to change the signal from "stop" to "clear"
- SparkFun #SEN-13959 ultrasonic sensor to detect the moving train, which travels three times around its track loop per cycle of the signal (the signal must not change from "clear" to "slow" until the train has completed its first loop)
- SparkFun Redboard with attached, assembled ProtoShield kit (this is where the ultrasonic sensor, cycle-start button, and other electronics will attach)
- A machined sheet-metal plate, preferably in a dark-color paint, to reflect the signal bream from the ultrasonic sensor's transmitter back at its receiver (the metal plate will be constructed by one of the museum's volunteers and mounted to a fence that sits approximately eight feet from the signal pole)
The code that will be uploaded to the RedBoard must maintain the "clear" signal indication until the moving train has twice broken the ultrasonic signal beam, then change the signal to "slow" after the train completes the first loop around the track, and finally change the signal to "stop" when the train completes the second loop of the track. The museum volunteer who serves as engineer on the train crew needs to rely on a combination of the electronic signal indication ahead of them and a whistle indication given by the volunteer conductor at the back of the train in order to determine when the train should proceed or stop.
My current parts list includes these SparkFun items:
- #COM-11996 (panel-mount momentary push button) x1
- #TOL-12889 (5VDC 2A wall-adapter power supply with barrel jack) x1
- #SEN-13959 (ultrasonic sensor HC-SR04) x1
- #DEV-13975 (SparkFun RedBoard) x1
- #DEV-07914 (SparkFun ProtoShield kit) x1