# Automating the process of decoupling



## Shdwdrgn (Dec 23, 2014)

One of the 'gotchas' in my grand scheme of making fully automated switching operations has been the unreliable nature of magnetic decoupling. Sure we human with our eyeballs can easily see when decoupling fails and try again, but how does a computer see this failure?

My best idea to date has been in finding some form of miniaturized strain gauge that I could embed into the coupler on the loco, then I could get a general reading of how much load the current train puts on the coupler, and any difference would indicate a successful decoupling. But I'm working in HO, where are I going to find usable strain gauges THAT small???

I posted my ideas and a plea for help on reddit this morning. Not exactly a popular thread, I've have one person throwing out a couple ideas to try and help, and while their ideas were not fruitful, they did make me think along alternative lines and I think I may have already had the solution built in...

In order to position the train for decoupling, I plan on having an IR LED pair centered over the magnets. As the train backs up into the spur, I can count the gaps between cars until I reach the right position, then perform the action to uncouple. Well it occurred to me -- what happens when I pull forward? The LED should remain 'on' because there should not be any cars blocking its path. If the LED trips, it means I'm still dragging cars, and need to back up and try again. No need for any sensitive devices built into couplers (although this could still be useful to detect if I drop cars while running the mainline).

If it's such a simple idea, why did it take me two years to think of it??? :dunno: :goofball:


----------



## RT_Coker (Dec 6, 2012)

The number of things (hardware & software) involved in the uncoupling process will be a major factor in determining the reliability of the uncoupling process. The reliability of the individual components will also be important as well as the availability and timeliness of shared components. Do a simple drawing that represents everything (component and action) involved in the process. The non-complexity of the drawing (assuming non-redundancy) will be a good representation of its reliability.

My experience with (and testing of) magnetic uncoupling, led me to conclude that the most important factor in reliable uncoupling was precision control of the position and speed of the locomotive (assuming that the couplers were already in good working order).
Bob


----------



## Shdwdrgn (Dec 23, 2014)

Well IR LEDs are pretty much bullet-proof, they work reliably for years. The watchdog computer that monitors the signal should also be pretty reliable, its only job will be counting the cars. I think what it really comes down to is filtering out the noise... small objects in between cars, stray light from other sensors, etc. It will be somewhat similar to debouncing a switch, but on a slower timeframe. I can probably develop a pretty good working average time between cars, and adjust that for each train that comes through. The length of each car might not be known, but the gap between cars should be pretty standard. And of course there's the issue of different car heights, so I might need to instal a couple IR receivers at different heights to get an average. I mean, I have an HOn3 flatcar that could slide right underneath an HO tanker. The trick is to angle the LED instead of going straight across the track.

Ah well, I'll get it figured out eventually. I have the pieces, but I still haven't had a chance to actually hook up any of the IR pieces and see what kind of signal I get from them. Same goes for the hall effect sensors and the RFID equipment... I've got a box full of parts that I think I can make use of, I even have a nice DAC and just received a couple different types of speakers today to try and get some sound, I just have too many other things piles up and waiting...


----------

