DC Automation

Marklincs

Registered
Country flag
So looking at using an Arduino and the Ultrasonic Sensor HC-SR04 and I envisage 1 main loop and then say 3 / 4 stops with points automated - 2 or 3 trains will then move randomly to a FREE station they will however be going the same way be it a right handed circuit for example. The main track circuit will have a set speed using a 5amp LGB controller then the siding stops will have track breaks and a 1 amp lgb power supply set to a lower speed will have the trains pull in be detected and then stop the train and then repeat etc - points will be automated and use a switch to detect which way the point is set is my thinking.... Anyone tried anything similar ?
 
similar - but only in the sense, that i automated the traffic.

but no IT-stuff, just simple (mostly LGB - epl, or selfmade copies)
magnets, reed-switches, switchmotors.

my last layouts both were basicly a circle, with the same number of locos/trains as there were "stations" with a passing siding.
there were two different modes of operation in analog DC.
1) a pair number of passing sidings, half of the locos wired "backwords". all locos are either simultainously(*) in, or on the way to, either a pair, or an impair station.
(*)simultainously - just in the sense, that all 8 trains reached the next station, before the first was started again. it was somewhat staggered in that sense, that each train, that ran, hit a reed somewhere, to trigger the next train.
2) any number of stations of two or more. a reversing (by reeds and switchmotor with addition) of the current in the track. so, that the "last" clockwise train switches current and starts the "first" counterclockwise train. and the other way round.

optical, the number two has the advantage, that there is always at least one train at each station.

tecnical the reeds are the weak point of the system. if i weren't too lazy to solder many reeds, i would put two paralell reeds for every function.
(but now and then it is interesting to have an Addams family layout for a change)

for my next layout, i think i'll go with the number 1 option. (that should be easier to integrate, what i experimented with. slow-down and acceleration by interrupting the rail - around the stops - at every feet with diodes)

my next project: trying out anti-burglary reeds. they are cheaper, than LGB reeds - and quicker, than me soldering.
 
I am going down a similar path with my points (not automatic), I am using a raspberry pi to detect a switch state on a control panel then send a WiFi signal to an ESP8266/ESP01S relay module to reflect the switch state at a point motor controller.
If the Arduino is controlling the points then their position could be read by the program instead of having a switch out in the garden, unless you are after confirmation that the point physically moved.
Have a look at this site it has given me some inspiration over the years couple good articles on automation and detection methods..
 
I am going down a similar path with my points (not automatic), I am using a raspberry pi to detect a switch state on a control panel then send a WiFi signal to an ESP8266/ESP01S relay module to reflect the switch state at a point motor controller.
If the Arduino is controlling the points then their position could be read by the program instead of having a switch out in the garden, unless you are after confirmation that the point physically moved.
Have a look at this site it has given me some inspiration over the years couple good articles on automation and detection methods..
I was thinking maybe a reed switch or similar with a magnet to confirm the point is one way or another it is not detected - however that does mean the switch is smooth and works every time triggered...

but in my head it should all work.
 
probably going with the LGB ones - I did get some 3d printed servo ones but actually may only need the LGB ones I will be testing the 4 I actually have 1st
Don't forget that the LGB motors take add on supplementary switch ref 12070, this effectively has 2x SPDT switches. These are very useful with EPL automation and the point motors if used not on a point can in effectively be used as a latching relay.
 
Many years ago, I set up an oval around the Christmas tree with LGB EPL components and magnets under the locos to alternate stopping in a station. It worked great inside the house. The key is the magnet on the bottom of the loco. I was recently intrigued by Marklin’s analog use of a magnet on the trailing car as well to signify when a “train” has cleared a section (block) of track. In LGB guides they always advised to add additional blocks as a safety.

I also found this older article which was very interesting and might help you:

 
Trying something generally similar with 3 concentric loops with cross overs for HO (adaptable to G scale of course). Target is power/speed control, switch/points control, and location tracking. Similar idea, using LCD control display plus web page display - both offering control.

Using ESP32S3, but currently stumped getting interrupts from detector multiplexor PCF8574's as it involves 3 interrupt handlers.

The more you include, the more complex the software and electronics become. But, a fun learning project nonetheless.
 
Have you looked into the DCC-EX software? It has incredibly simple automation programming with exrail, including sensor reading of all types, interrupts, etc. You don't have to have dcc locos It can run multiple DC sectors by functionally addressing each as if it were a dcc loco with an individual address and change speed via automation/programing. You can use a mobile device as a throttle and launch different automation scripts from the engine drive app. All you need is an arduino (or similar) with a motor driver and wifi shield if you want it.

The only thing I'm not sure about would be throwing switches without dcc. There might be info available on their website or their very active discord. It couldn't hurt to throw up a question there about what you want to do and see if it would be suitable. The flexibility of what you can do is tremendous.
 
Lots of folks have encouraged me to go that direction, but there is a small group of DIYers who look at it as a personal learning experience and another kind of fun.

As an old school software guy, it is fun to integrate hardware with my own code. And not all problems are software. This blocking interrupt thing turned out to be board wiring, so I am moving ahead.

Thanks for the suggestion.
 
Back
Top