Model Railway Level Crossing Working Gates With Warning Lights N-gauge UK 3D Printer Model

Author: @
License: CC BY-NC-SA
File formats: stl,FCStd
Download type: zip
Size:2.9MB

The file 'Model Railway Level Crossing Working Gates With Warning Lights N-gauge UK 3D Printer Model' is (stl,FCStd) file type, size is 2.9MB.

Summary

Model-Railway-Automatic-Level-Crossing-and-signals
Arduino based Automatic Level Crossing Gate Controller for double track line on a Model Railway (UK original style gates) with CMRI reporting to JMRI

This project runs on an Arduino Nano with eight LDR-based sensors distributed along a double-track railway with the old style Level Crossing gates and a station at the centre.

This "thing" includes FreeCad and .stl files to make the working level crossing.

The project consists of a 3D printed base and top to hold 4 SG90 servos underneath the baseboard, and 4 gates on top of a standard double track level crossing - eg. Peco. There are also warning lights which take 2 red and 1 orange prewired chip LED lights each - these probably need a resin printer to get resolution and the 6 wires down the stem. The gates are connected to the servos with the servo tops, and gates are a friction fit into these servo tops to minimise damage if hit by a moving train. You also need 6 track sensors - LDR type 5549 and these are connected with a 1Mohm pullup resistor to an Arduino Nano analogue input.

The sensors detect a train entering the section from either side with at least 1 metre of track (n-gauge - more needed for OO or O gauge) to the level crossing gates - this allows time for the gates to close in sequence (exit gates last) to road traffic and open to Train traffic. The sensor for leaving the section is also >1metre away so that long trains will be clear of the gates before opening to road traffic. Trains entering simultaneously on each track will not trigger the gates to open for road traffic until both have exited the section. Additionally, there is a two-aspect signal at the exit to the station which changes to green when the gates are open for train traffic and changes to red again immediately after being triggered by the train leaving the platform. All the sensor data can also be sent to a computer running JMRI using a CMRI USB connection - the serial.print lines are commented out when CMRI is running - and are active only when debugging the hardware.

Traffic is only permitted in one direction for each line so that the software is only triggered in the correct sequence—this reduces the chance of spurious triggering and "switch bounce." 3 Arduino Pins are now used for warning signals to road traffic — this is operating now after I designed some warning lights for 3D printing using a Resin printer, as at the time no commercially available lights had been advertised in the UK. The led's used come as tiny surface mount chips prewired with 0.15mm diameter wires and it is possible to pass 6 wires down the slightly oversized pole.

Ironically, having spent time designing prototypical hoods for the traffic warning lights, I have had to remove the hoods to make it obvious that the lights are working because they were only viewable at the same height as the road, and most viewers are taller and don't see the lights flashing - i.e. the hoods worked too well! The design uploaded here has reduced hoods.

The Arduino code is all on GitHub under the user name StephenWR/Model-Railway-Automatic-Level-Crossing-and-signals
The version uploaded 4th October 2024 is used on the Leicester Model Railway Group "Maun Valley Junction" layout where the station stopping sensors are not used, and the layout is slightly different to that described above - hence only 6 sensors are used.

LC_Servo_top_21x0235intgear_short5mm-Body001Box.stl 99.7KB
LC_Servo_top_21x0235intgear_short5mm.FCStd 419.3KB
Level_crossing_base5_n_gauge.FCStd 201.2KB
Level_crossing_base5_n_gauge.stl 706.6KB
Level_crossing_gates_v2_n_gauge.FCStd 881.4KB
Level_crossing_gates_v2_n_gauge.stl 147.0KB
Level_crossing_top6_n_gauge-BodyChamfer001.stl 940.9KB
Level_crossing_top6_n_gauge.FCStd 605.7KB
Level_crossing_warning_lights_5-Body001Box012.stl 1.4KB
Level_crossing_warning_lights_6-BodyFillet001.stl 103.7KB
Level_crossing_warning_lights_6.FCStd 390.7KB