constructing electronics for semaphore signal?

This forum is dedicated to Riding Scale Railroading with propulsion using other than steam (Hydraulics, diesel engines, gas engines, electric motors, hybrid etc.)

Moderator: Harold_V

User avatar
PRR5406
Posts: 752
Joined: Wed Oct 07, 2009 7:12 pm
Location: Eastern Maine

constructing electronics for semaphore signal?

Post by PRR5406 » Tue Dec 28, 2021 3:55 pm

Here's the goal: We want to construct a semaphore signal using an Arduino and stepper motor. These will be 12 volt powered, contained in a waterproof plastic (PVC) box at ground level. The signal arm itself will be mounted directly above, with an actuating rod or wire traveling up a PVC tube. A column ahead of the signal will have an upright wire touch (brush your hand) switch to activate the Arduino, controlling the stepper motor. The stepper either lifts a rod/wire to move the semaphore blade or turns a lead screw to operate the semaphore blade.

Has anyone done this type of thing before, did it involve this kind of electronic mechanism, where can I get drawings to assist with the project?
The plan is to do this as a home workshop project. Any assistance with drawings, video, or detailed pictures is quite welcome.
"Always stopping my train, and risking my ankles, with American made, New Balance sneakers."

Mark Landgraf
Posts: 95
Joined: Sun Jun 09, 2013 9:42 pm
Location: Albany, NY

Re: constructing electronics for semaphore signal?

Post by Mark Landgraf » Wed Dec 29, 2021 3:49 pm

First off - optically isolate your Arduino - this is to protect it from any transient electrical current in the rails or other underground wiring - you know Mother Nature and her lightening. The rails seem to carry it a considerable distance.

Second - look around the internet for a 1905 Signal Cyclopedia or Signal Dictionary - it's old enough that Google may have scanned one - if you find one please post its location

Third - these were motor driven units - a motor, through a gear train, raised the rod that was connected to the blade - a relay psychically interfered with the gear train (think a quadrant with a couple notches in it) and this held the raised position of the signal rod - gravity was used to lower the blade. When the power was off (ie. the train just passed), the relay released and gravity lowered the blade.

forth - recommend you post the question on Railway-signaling@groups.io
There are some very knowledgeable people there. That may be a good source of plans too.

Mark Landgraf
Albany NY

Soot n' Cinders
Posts: 929
Joined: Wed Jun 27, 2012 5:24 pm
Location: Marietta, Georgia

Re: constructing electronics for semaphore signal?

Post by Soot n' Cinders » Wed Dec 29, 2021 5:35 pm

Ive had a similar idea but was going to use a servo and a balanced arm. I have several Arduinos in the field as a signal system right now using wireless communication, but they just use 3 color lights rather than semaphore.
If you go the stepper motor route, I would use the screw idea and have a limit switch on one end of the travel so you know where the 0 position is in case the power goes out or the blade drifts.

If this is just going to be one whisker switch, Arduino, and semaphore as a stand alone novelty I lightning won't be as big of a concern, but if you're running off some commercial AC to DC adapter I would have a TVS diode on the incoming line and a reverse polarity diode to help reduce the risk of surges coming in from the commercial grid. Near by strikes really only seem to impact longer runs of cable and a strike close enough to induce enough current in less than 10ft of wire usually is close enough that it will blow components up even if there is protection.
-Tristan

Projects
-2.5" scale Class A 20 Ton Shay

Steam Siphon: https://www.shapeways.com/shops/leavitt ... tive-works

User avatar
PRR5406
Posts: 752
Joined: Wed Oct 07, 2009 7:12 pm
Location: Eastern Maine

Re: constructing electronics for semaphore signal?

Post by PRR5406 » Wed Dec 29, 2021 5:52 pm

Thank you both for excellent advice and links. The electricity for these might be an automotive battery and solar panel. I do have several 12 volt power supplies which run off 120v wall power. No decision there, although solar seems like fun and very isolated. No juice in my rails, at least not yet.

I'd like to hear from other resource people, assuming they would care to chime in.
I'll post what I find, assuming I find anything useful!
"Always stopping my train, and risking my ankles, with American made, New Balance sneakers."

User avatar
PRR5406
Posts: 752
Joined: Wed Oct 07, 2009 7:12 pm
Location: Eastern Maine

Re: constructing electronics for semaphore signal?

Post by PRR5406 » Wed Dec 29, 2021 6:04 pm

Okay, this looks juicy, but it's not a free download. Written by an electrical engineer for modelers to use. It's from the British perspective, but I think that's no barrier.

https://www.google.com/books/edition/Op ... frontcover

Check it out
"Always stopping my train, and risking my ankles, with American made, New Balance sneakers."

Soot n' Cinders
Posts: 929
Joined: Wed Jun 27, 2012 5:24 pm
Location: Marietta, Georgia

Re: constructing electronics for semaphore signal?

Post by Soot n' Cinders » Thu Dec 30, 2021 11:45 am

12v battery and solar can work well if you get enough light. Our signals run off that setup and are usually good for about a month before the batteries need to be brought in to fully recharge. And it fully isolates from the grid and allows operation if the powers out.
-Tristan

Projects
-2.5" scale Class A 20 Ton Shay

Steam Siphon: https://www.shapeways.com/shops/leavitt ... tive-works

Berkman
Posts: 569
Joined: Wed Aug 16, 2017 7:55 pm

Re: constructing electronics for semaphore signal?

Post by Berkman » Thu Dec 30, 2021 12:29 pm

Could always use some sort of 12v trickle charger on each of the batteries that way you don't have to bring them in to charge them, but still gives you the benefit of being able to run if the power is out. A larger solar charger could also help -but this is dependent on the location and how much sun each location gets. I think I'd want some sort of pretty good surge protector on them so if in a lightning prone area you don't wipe out the whole system of LEDs etc with 1 hit.

User avatar
Bill Shields
Posts: 7747
Joined: Fri Dec 21, 2007 4:57 am
Location: Somewhere in the World
Contact:

Re: constructing electronics for semaphore signal?

Post by Bill Shields » Thu Dec 30, 2021 3:43 pm

Or be prepared to have everything submerged if you are using them near water.

Having a way to reset to home using a screw drive is a very good idea..suggest some sort of nylon nut that will not sieze or require lube
Too many things going on to bother listing them.

rkcarguy
Posts: 1704
Joined: Tue Aug 22, 2017 10:33 am
Location: Wa State

Re: constructing electronics for semaphore signal?

Post by rkcarguy » Mon Jan 10, 2022 12:32 pm

I've done a lot of signal research and built some 3-color heads myself with a relay system to control them. As I'm modeling an area of SP that used semaphores, I considered building some. Ultimately I decided against them because my area is wet and cold and I was seeing endless potential problems with everything from them being frozen to corrosion and even moss/mold growing on them and causing issues with the moving parts. The delicate nature of the moving parts would not fare well either, with our weather, trees dropping leaves and branches, my kids, and of course occasionally I spook a deer in the dark and it goes crashing through everything on its way out.
If the signal will be a true part of the safety of the RR and not just a novelty, I'd suggest (stop) being the default setting (no power to signal), but it doesn't have to be. Up until very recently, some parts of real RR's still had clear/green as the default. Will these be a semaphore/lighted combo or just the moving arm only?
I believe the real thing used electro-magnetic coils to draw a balanced arm into the correct position, didn't it? I.E, a wire was ran from an adjacent block to energize the coil (through a relay) to draw the arm into the stop/red position, and another from the block beyond that one to draw the arm into the approach/yellow position.

User avatar
PRR5406
Posts: 752
Joined: Wed Oct 07, 2009 7:12 pm
Location: Eastern Maine

Re: constructing electronics for semaphore signal?

Post by PRR5406 » Tue Jan 11, 2022 9:02 am

We are still working on the project and are going to attempt a screw drive with a stepper motor. A manual switch will activate the down arm when a train passes. On my little layout*, the Arduino will raise to amber/caution, then green/advance, in about 40 seconds, giving ample time to clear the next 300 feet of track ahead.
This is a single prototype, not a major installation. If it works well, we may go for others.

*Mine is an elongated single track loop with a few curves for interest and landscaping. No multiple track (yet).
"Always stopping my train, and risking my ankles, with American made, New Balance sneakers."

rkcarguy
Posts: 1704
Joined: Tue Aug 22, 2017 10:33 am
Location: Wa State

Re: constructing electronics for semaphore signal?

Post by rkcarguy » Mon Feb 21, 2022 6:28 pm

Sounds good. Echoing the first response to this thread, make sure you isolate your Arduino. I've read of many problems for signal systems being affected by everything from nearby radio towers and power lines to lightning of course. My property is on a hill and I have at least one tree which was struck by lightning so I'm trying to avoid using any sensitive electronics.
It is actually not difficult to get something like this to function without a chipped control board. A series of relays with the trigger wire ran to 3 isolated sections of track will function prototypically, coupled with some amazon micro-electromagnets and you'd be set.
You'll wire the relays through each other to provide the desired default, if that makes sense. If you go with a red default, you'll need to employ a diode to have it work correctly. If interested, I'll see if I can dig up my sketch of the diagram. I've assembled and tested this using 3 sections of HO scale track with isolated joiners and it does work.

rkcarguy
Posts: 1704
Joined: Tue Aug 22, 2017 10:33 am
Location: Wa State

Re: constructing electronics for semaphore signal?

Post by rkcarguy » Mon Feb 21, 2022 8:01 pm

Ah here it is from my older post:

"I am using two SPDT relays, so there is two + positive outputs which are switched between by relay position. The at rest relay output powers the green light indicating the next block is clear. When the first relay is energized, indicating a train in the next block, the relay drops the green and the "energized output" feeds + power INTO the 2nd relay, which it's output at rest is wired to the red light. The 2nd relay is necessary to allow us to also switch the yellow light, and when the 2nd relay is energized, it drops the red for the yellow. But there was a couple problems. A train in the 3rd block away would not set the signal yellow, because the 2nd relay is not energized when there is no red light(no train in the 2nd block) so it just clicks and stays green, so there would be no warning until the train entered the adjacent block and set the light from green straight to red.
The solution turned out to be simple. I added a diode such that switched wire to relay #2(which would be activated by presence of a train in block 3), and would show yellow on the signal, also powers up the relay so it has power to switch. If the train was coming towards the other one, it would cross into block 2 and as soon as the end of it cleared block 3 and is totally on block 2 it sets the signal red for the train in block 1. I've bench tested it and it works:)

The only caveat here is that because the yellow will not drop until the entire train clears block 3, you have to account for train length and position your rail isolator so that the train isn't actually fouling the next block(should be red) while showing yellow. For isolators, you only need to isolate one rail if you just have a loop. You would replace the lights with micro-electromagnets in the case of a semaphore.

Post Reply