How to detect train derailment?

Mobi

Registered
Country flag
If track is not powered (but brass track) is there any way to detect that a train has derailed? A battery loco may continue to to travel even after derailment and unless someone is "baby sitting" trains it can cause damage.

This is especially useful when track is not a loop but contains reverse loops at ends where train will itself points to desired directions (which may sometimes fail).

Is there any way to detect train derailment and send an alert (like sound/message etc.)?
 
I asked my good friend ChatGPT and this is what it came up with.

SENTINEL CAR AND LOCO DERAILMENT DETECTION (NON-ELECTRONICS FRIENDLY)

You do NOT need detectors in every wagon or car. One “sentinel” car plus one detector in the locomotive will catch most derailments.

What it is:
One special car in the train that triggers an alarm if it tilts or gets dragged. You only need ONE per train.
What it detects:
  • Car leaning due to derailment
  • Being pulled sideways by a derailed car ahead
  • Severe vibration from dragging wheels
Best location:
  • Last car in the train (most sensitive)
    OR
  • First car behind the locomotive
Parts needed:
No resistors or programming required if using a buzzer.

How it works:
  • Car stays upright → nothing happens
  • Car tilts slightly → tilt switch closes
  • Buzzer sounds or LED lights → derailment detected
How to build:
  1. Remove the car body
  2. Glue the tilt switch inside the body sideways (detects roll, not hills)
  3. Wire: battery → tilt switch → buzzer or LED → back to battery
  4. Reassemble the car
That’s it.
Notes:
  • The alarm stays on until the train is lifted or power is switched off
  • Two tilt switches mounted at 90 degrees improves sensitivity (optional)
Purpose:
Detects locomotive derailment and drag or vibration caused by a derailed car behind it.

Option A: Vibration switch (no programming)
Parts needed:
  • Vibration (shake) switch
  • Battery (CR2032 or AAA)
  • LED or small buzzer
  • Optional on/off switch
How it works:
  • Normal running → no trigger
  • Derailment or dragging car → sustained vibration → alarm
How to build:
  1. Remove locomotive shell
  2. Glue vibration switch firmly to the frame
  3. Wire: battery → vibration switch → LED/buzzer → back to battery
  4. Reassemble
Tips to reduce false alarms:
  • Mount the vibration switch firmly
  • Cushion the battery, NOT the sensor
  • Use a medium-sensitivity vibration switch
Use both:
  • One tilt switch (mounted sideways)
  • One vibration switch
Wire the two switches in parallel so either one can trigger the alarm.

No programming required.
  • CR2032 coin cell: small, easy, replace every few months
  • AAA battery: longer life, needs more space
  • Works on unpowered track
  • Requires minimal electronics skill
  • Detects most derailments quickly
  • Prevents damage during unattended running
  • Does not identify which exact car derailed
  • Does not catch every silent, very slow derailment (rare)
  • One sentinel car with tilt switch + buzzer or LED
  • One locomotive detector with tilt and/or vibration switch
  • Optional trackside detector in hidden areas
This setup provides high reliability with minimal complexity.

If you want to take it further you can use ChatGPT Free and put this in and continue asking questions, they won't always be right but if asked again you can get an idea of what is correct if it does make a mistake.
It is a handy tool but not the be all and end all of knowledge.
 
Is there any way to detect train derailment and send an alert (like sound/message etc.)?

The only way to really tell if a G scale train has derailed is to observe it. If you want to automate the detection process, setting up video observation of tpretty much the whole track would be required with some video -tocess9ngbsoftwate to tell you that the train does not look they way it should look.

A simpler, though much less exacting approach would be to set up a timer with a duration long enough for the train to return to a specific point on the route.... program the timer to reset when the train passes (easy to do with a optical detector), so if the train doesn't arrive within the allotted time, an alarm is raised.... this is a slightly automated version of what most of us manually do when train goes in and out of site during a journey around a garden layout.
 
The only way to really tell if a G scale train has derailed is to observe it.
Yes, that is true AI solution. A camera can send video feed to Python code which can detect whether train is running sensibly or not.
I was thinking keeping a mobile phone in train but its accelerometer is not sensitive enough to detect derailment.
 
Yes, that is true AI solution. A camera can send video feed to Python code which can detect whether train is running sensibly or not.
I was thinking keeping a mobile phone in train but its accelerometer is not sensitive enough to detect derailment.
Perhaps an Apple watch?
:D

Though you might get the emergency services turning up en-masse?

"The train this Apple watch is on, appears to have had an accident, and is nor responding.."
:eek:

PhilP.
 
What about a battery powered 'ring' circuit via pickups on all four wheels (assuming a 4-wheeled wagon) and both rails which would be broken, prompting an alarm, during a (serious) derailment??
 
It's not just derailments with battery powered locos. I have a 'steaming' spur used for setting large locos with tenders on the track, and it has no buffers so that I can drive these locos out of their cradles.

On one occasion, I forgot to correctly set the point, and a battery loco went down the spur and carried on quite happily across the patio heading for the back gate :oops::oops:
 
i am not sure / i doubt, that the following is really helpful.

my personal experience (on analogue DC layouts) says, that speed is an important factor.
on my last two layouts i had the main feeder (220V AC) for the layout laid in a way, that i had a breaker /switch every four yards/metres for emergency shut down of the whole layout.

that means, the time factor is, if i can reach the next switch quicker, before the first signs of a derailment turn into free fall.

what first signs have i noticed?
1) a train does not appear, where it is expected.
2) somewhere i hear a loud: "rat-tat-tat-tat..." (best sound-volumen comes from newqida cars)
3) seeing a "dummy-loco" limping before a powered tender.
4) seeing a car (usually the last) hitting deco beside the track.
5) (once) hearing a loud crash of Big Hauler on concrete. (4½ foot below a trestle)

in short, if the operator is present, he is the quickest possibility to notice and react. the slower the trains run, the more time for reaction.

for layouts, that are running without supervision there is one principle mandatory: K.I.S.S.
flat as a pancake, short trains, no turnouts, and an automatic breaker/fuse in controller and transformer.
(that goes for DC. the other options, as far as i know, need an operator present anyhow)
 
A camera can send video feed to Python code which can detect whether train is running sensibly or not.
Evidently this is doable.
I put this into AI out of curiosity "Is there a way to have a camera can send video feed to Python code which can detect whether a model train is running correctly or not ie not derailed" result was interesting.

I have an organic train derailment detection system it has to features the Mk1 eyeball and a bi directional audio detector system Mind you the intelligence running it is highly questionable. :D:D:D
Sometimes I also deploy the mobile detection system ie Great grand kids who are super fast and accurate and highly mobile but do come with a built noise generators.
But joking aside there is a method using cameras and programs if one is prepared to go down that path.
 
Back
Top Bottom