Maker Pro
Maker Pro

Arduino control of model train signalling (was: LED Power Supply for Control Panel)

Hi Everyone

I am seeking some knowledge and assistance for a new project i am starting, but first a little about me, which i hope will help you when posting a reply.

I am by no means a qualified electrician but dabble with some great results and for the most part am self taught. Most projects involve models in some shape or form. Often my ideas at first seem easily achievable but only when i go deeper into that project i hit a brick wall..

....I've hit one such brick wall :eek:

The Control Panel Project

The Control Panel in question is for a P4 scale exhibition Model Railway Layout of Eridge in Kent. The layout itself is DCC operated.

My Goal is to create a user friendly "dark" control panel, by which i mean something that a visitor or guest operator can easily use and by dark i mean only set routes will be lit.

My intention is to have a black perspex background with the track design mounted onto this by means of lining tape (undecided on colour). This will be drilled to accept 3mm LED's and the switches (MO Push Button) . An outer panel of smoke perspex will be laid over this sandwiching the track. The switches will then extend through this smoke perspex facia.

The idea is that the route will be set by tracking your finger over the route that you wish to set and pressing the buttons you pass on the way. These buttons will operate the turnouts on the layout and the route will be lit when the relevant signals are set to the correct sequence.

So here is the layout design.

attachment.php


The MO Push Button switches are shown above

And Here are the LED's ( Shown All Lit)

attachment.php


Now the Sequences (The switches are highlighted as green if pressed)

Sequence 1

attachment.php


Sequence 2

attachment.php


Sequence 3

attachment.php


Sequence 4

attachment.php


Sequence 5

attachment.php


Ok I'm sure you get the idea... I won't bore you with the down line or cross-overs !!!!

So the LED's are going to be mounted on pcb boards which i have designed and will be made up of 1,2 or 3 LED strings (dependant on location and operational requirement and wired in series with the relevant resistor[/COLOR ]. Each board can then be connected to the next if required so the boards will be wired in parallel....i think that's right lol

NOW MY STUMBLING BLOCK

Power Supply...This is where I'm unsure!!!

I designed the circuits to run off 12v mainly because the switches are wired to a LM555 timer circuit. This is needed as the solenoids that operate the turnouts are stall type and therefore require constant power to be supplied to the relevant side of the solenoid...however using MO push buttons will not allow this..... I feel i have to explain the reason for the choice of switches.....Simply put it saves you having to revisit each switch to turn it off before selecting another route.

The LM555 control circuit runs from 12v and it seemed correct to choose this for the LED circuits as there is a function to add LED's to this to indicate turnout position (admittedly red for stop green for go but that is irrelevant)

MY QUESTION IS

Would an LED Driver Circuit be better.???...am i on the right line or have i derailed myself somewhere??

Those of greater wisdom may save me from a massive waste of time and money

Any Advice Greatly Received :)
Any Information I will Endeavour To Deliver

Thank-You for Looking
 

Attachments

  • Eridge Control Panel Track.jpg
    Eridge Control Panel Track.jpg
    91.7 KB · Views: 6,896
  • Eridge Control Panel Track and All LEDs.jpg
    Eridge Control Panel Track and All LEDs.jpg
    97.7 KB · Views: 2,887
  • Eridge Control Panel Track Sequence 1.jpg
    Eridge Control Panel Track Sequence 1.jpg
    94.2 KB · Views: 2,692
  • Eridge Control Panel Track Sequence 2.jpg
    Eridge Control Panel Track Sequence 2.jpg
    95.7 KB · Views: 2,669
  • Eridge Control Panel Track Sequence 3.jpg
    Eridge Control Panel Track Sequence 3.jpg
    93.6 KB · Views: 2,714
  • Eridge Control Panel Track Sequence 4.jpg
    Eridge Control Panel Track Sequence 4.jpg
    98.8 KB · Views: 2,704
  • Eridge Control Panel Track Sequence 5.jpg
    Eridge Control Panel Track Sequence 5.jpg
    93.4 KB · Views: 2,726
For indicator LEDs the only "driver" needed to run them from 12V is resistor. It is somewhat wasteful, but at the low power that they draw, I don't see that as a problem. You can put your strips of 3 in series with one resistor and they will draw the same current as a single LED. It looks like maybe 100 LEDs in your project, with most of them in 3's, so maybe a total of 40 or so activated in parallel. This would require < 1A for standard 20ma LEDs.

Bob
 
Thank-You Bob for your answer ;)

That's great news I'm on the right track

This leads me to another question, I am concerned about the brightness of these LED's and purchased the following

3mm Warm LED's and have a forward voltage of 3.2-3.6v at 20-30mA. (7000-8000 mcd)

Until the control panel is assembled i will not know if the brightness is an issue...however i am doing a trial panel A4 sheet size and it appears they may be too intense

Am i correct in saying that adding further resistors (of unknown capacity) in the +ve supply will dim these even if it is a waste of power or would i be better investing in some kind of variable resistor circuit? If so a diagram or website link may be handy

A point to note here is that i am making the pcb boards up myself and so would like to have this unknown factored into the boards "Just In Case"

Thank You Again :)

Mark
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Am i correct in saying that adding further resistors (of unknown capacity) in the +ve supply will dim these even if it is a waste of power or would i be better investing in some kind of variable resistor circuit? If so a diagram or website link may be handy

You may have chosen a resistor that allows these LEDs to run at 20mA. If this is too bright, you use a larger resistor so that the LED operates at a liwer current.

However, the other issue is that these high brightness LEDs achieve that high brightness by having a very narrow beam. This may result is a narrow field of view for your panel, with the LEDs looking much dimmer as you move off-axis.

One simple solution is to roughen up the top of the LED to diffuse the light if you don't want to purchase LEDs with a wider beam.
 
Thank you Steve for your advice

So increasing the value of the resistor will dull the LED down as i assumed. Is there any way of calculating this or is it a case of trial and error ?

With regards to the viewing angle, this i feel will not be an issue. The layout is over 50 ft long and the control panel will be operated off the layout by one "signal man". Indeed the idea is to drill 3mm holes at the LED positions on the 5mm thick black perspex to allow the bulb to sit flush with the LED top (thus 90% will be either below or in the board).


Thanks for the tip on roughing up the top of LED's ;)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
You can calculate the current, and from that you can calculate the approximate intensity, but practically, you may be better off calculating the minimum value resistor, then trying values greater than or equal to this until you find something that looks "right".

If the LEDs all have a similar forward voltage, you can use a variable voltage regulator to dim all of them. In that case, you chose the resistor value based on the maximum voltage and by turning down the voltage you can vary the current to suit the environmental lighting.

If the current drain is significant, you can use a dimmer which uses PWM to do the same thing in a more efficient manner (at the expense of some slightly higher complexity.

The easiest solution is a commercial LED dimmer that comes out of China for prices better than you could build one. Here is an example. Wire up your LEDs to work from 12V at (say) 20mA per LED. Wire this in between the 12V and the LEDs and you get PWM dimming.
 
For indicator LEDs the only "driver" needed to run them from 12V is resistor. It is somewhat wasteful, but at the low power that they draw, I don't see that as a problem. You can put your strips of 3 in series with one resistor and they will draw the same current as a single LED. It looks like maybe 100 LEDs in your project, with most of them in 3's, so maybe a total of 40 or so activated in parallel. This would require < 1A for standard 20ma LEDs.

Bob


Thanks again for All the Help so far :D

I have now completed a "test" control panel of part of the full version. This has proved a useful exercise as the photos show.

Test Panel 1.jpg

Here the lining tape was removed from 2 leds and clearly it dazzles the operator

Test Panel 2.jpg

And Here because its being powered by 9v it won't lit up the bank of 3 leds in the middle..upping the voltage to 12 however does illuminate them :)

Overall i'm happy to move onto the full version though a variation in colour on the lining tape may be necessary.

Now i need to purchase the power supply. I think that when fully operational the project will have 80-90 leds activated in certain track configurations.

A 12v 1A power supply was recommended in the above post....will it matter if i bump this up to say 5A as i intend to add other features ( such as miniature working lit semaphore signals indicators , as the switches for the full size will also be incorporated onto this panel, l if i can get them to work) lmao.

It may not be eco-friendly but id rather not have to re-wire with a larger power supply at a later date. :rolleyes:

I intend also to include the dimmer control that Steve mentioned in post dated 01-05-2013 03:20 PM.

Mark
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
If you are running them at 20mA, then you can have 50 strings of LEDs per amp of power supply capability.

1A may be sufficient if you have no more than 50 strings (that could be 150 LEDs if there are 3 in a string), but increasing the capacity of the power supply gives you plenty of margin. The difference in efficiency is probably not very much at all.
 
Another Conundrum

The layout itself will be operated by a minimum 3 people, designated Up Fiddle Operator, Main Operator and Down Fiddle Yard Operator.

Each area will have set tasks but it is essential that they are co-ordinated so i want to add a "sequence" part to the above control panel. Bearing in mind that the distance between the up and down fiddle yard operators will be in excess of 40 foot and i don't think loudhailers would be appreciated :D This will mean a seperate control panel for each fiddle yard.

Up Fiddle Control Panel consisting of:-

Switch "Down Train Ready Departure"
Amber Led " Down Train Ready Departure"
Green Led " Down Train Accepted"

Switch "Up Train Accepted"
Amber Led "Up Train Awaiting Acceptance"
Green Led "Up Train Ready for Departure"
Switch " Up Fiddle Yard Road Clear"


Main Control Panel consisting of :-

This will have 2 distinctly seperate areas.. each at the extremity of the panel, designed to indicate which fiddle yard the switches and led' s relate too.

For the purpose of this narrative i have labelled them "Main Control Panel (up fiddle yard end) and (down fiddle yard end)

Main Control Panel (Up Fiddle Yard End)

Switch "Down Train Accepted"
Amber Led "Down Train Awaiting Acceptance"
Green Led " Down Train Ready Departure"

Switch "Up Train Ready for Departure"
Amber Led "Up Train Ready for Departure"
Green Led "Up Train Accepted"
Green Led "Up Fiddle Yard Road Clear"

Main Control Panel (Down Fiddle Yard End)

Switch "Down Ready for Departure"
Amber Led "Down Train Ready for Departure"
Green Led " Down Train Accepted"
Green Led "Down Fiddle Yard Road Clear"

Switch "Up Train Accepted"
Amber Led "Up Train Awaiting Acceptance"
Green Led "Up Train Ready for Departure"


Down Fiddle Control Panel consisting of:-

Switch "Down Train Accepted"
Amber Led " Down Train Awaiting Acceptance"
Green Led " Down Train Ready for Departure"
Switch " Down Fiddle Road Clear"

Switch "Up Train Ready for Departure"
Amber Led "Up Train Ready for Departure"
Green Led "Up Train Accepted"

SO:

Control Panel Call 1.png


The above shows a rough sequence

OPERATION SEQUENCE (Down train only, opposite sequence for up)

Up Fiddle Yard Operator: Loads Train onto Up Fiddle Yard Down Line
Selects "Down Train Ready Departure" Switch
(Result)
Amber Led Illuminates on Up Fiddle Yard Panel " Down Train Ready Departure"
Amber Led Illuminates on Main Control Panel " Down Train Awaiting Acceptance"

Main Operator:Selects "Accept Down Train" Switch
(Result)
Amber Led on Up Fiddle Yard Control Panel "Down Train Ready Departure" Extinguishes
Green Led on Up Fiddle Yard Control Panel "Down Train Accepted" Illuminates
Amber Led on Main Control Panel " Down Train Awaiting Acceptance" Extinguishes
Green Led on main Control Panel " Ready for Departure" Illuminates
Main Operator Controls train to Station

Main Operator: Selects Down Train Ready for Departure" (down fiddle yard end of main control panel)
(Result)
Amber Led Illuminates on Main control Panel "Down Train Ready for Departure"
Amber Led illuminates on Down Fiddle Yard Control Panel "Down Train Awaiting Acceptance"
All Led' s on Up Fiddle Yard Extinguish (reloads new cassette)
All Led' s on Main Control Panel (up fiddle yard end) extinguish.

Down Fiddle Yard Operator: Selects " Down Train Accepted" switch
(Result)
Amber Led on Down Fiddle Yard Control Panel "Down Train Awaiting Acceptance" Extinguishes
Green Led on Down Fiddle Yard Control Panel "Ready for Departure" Illuminates
Amber Led on Main Control Panel " Down Train Awaiting Acceptance" Extinguishes
Green Led on Main Control Panel " Down train Accepted" Illuminates

Down Fiddle Operator: Controls Train to Fiddle Yard: Removes Cassette
Down Fiddle Operator: Selects" Down Fiddle Yard Road Clear" switch
(Result)
All Led' s on Main Control Panel (Down Fiddle Yard End) extinguish
All Led' s on Down Fiddle Yard Panel extinguish.


Sequence Ends

Hopefully you've followed me to here...though even i got a little puzzled writing this

My Question is HOW DO I ACHIEVE THIS....what kind of switches will i need that will cancel one another out, circuitary and any other special devices.

Thank You in Advance

PS I will try to work a circuit diagram out , even if incorrect when i have a electronic circuit drawing package
 
OK as promised a circuit diagram...

Sequence.4.jpg

Sequence.3.jpg

I know its not correct... What i'm trying to ask is how do i cancel the previous switch and LED input out by pressing another switch i guess :confused:
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Are the lights ever all off? or do you always have one set lit or the other?
 
Good Question Steve

I intend for the "Down Fiddle Yard" Control Panel "Road Clear" to Extinguish ALL other LED's on the this drawing apart from the Green LED "Road Clear"

main control-down fiddle1.jpg

With reference to the drawing below of the Up Fiddle Yard/ Main Control Panel

up fiddle-main control1.jpg

Its not so simple.. as trains on the Down Line start here, so it is more than likely that one train will start here and stop at the station (controlled by Mainline Operatorl) and then another emerge from the Up Fiddle Yard and "overtake" the stationary train in the station.

To that end all trains emerging from the up fiddle yard on the down line will be under the control of the mainline operator....so i guess an additional switch will be needed to the Main Control Panel to let the up fiddle yard know he is ready to accept another train from that direction..(This switch will cancel all LED's on this drawing)

I have temporarily added this in the drawing below

Up Fiddle-Main Control Revised2.jpg

Mark
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
That arrangement can be done with a single pole double throw switch (or a pair of them)

If you want it done with buttons, a push on/push off switch would be easiest.

If you get a DPDT switch, you can control both sets of lights from one set of switches.

I'll draw up a circuit for you (maybe later if I don't have the time now).

attachment.php


Excuse the crap drawing.

In the switch position shown, the top LED is on. Switching either switch turns the other LED on.

And switching either switch again, changes the LED again.

You can have more than 1 LED. This point can power several strings of LEDs if you want. So the top one could be red at one end and green at the other, the bottom set would be the reverse reverse.
 

Attachments

  • fiddle.gif
    fiddle.gif
    3.9 KB · Views: 2,097
Last edited:
Thanks for the reply Steve,

Very interesting solution and one i would never have come up with in a million years as it is simpler than what i've been trialing.

I'm sure that with a few tweaks this could work..

I want to use the same type of push button switch to keep the panel the same (aesthetics only) so at the moment I'm using MO push buttons for the track layout lights but am confident they will do other arrangements.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Yes, the push-on/push-off buttons typically are depressed when on, but not all are.

Maybe you can find some that are aesthetically "correct" :)
 
OK Think I'm nearly there....... I've come up with this

attachment.php


So when Switch 1 (Push to make) is pressed the relay is energized and the Amber LED's (D1 & D2) are illuminated :)
 

Attachments

  • Syncro Control Panel1.jpg
    Syncro Control Panel1.jpg
    24.8 KB · Views: 2,190
When Switch 2 is pressed (Push to Break) then the relay de-energizes and the Amber LED's extinguish and the Green LED's (D3 & D4) illuminate.

attachment.php


Sorry no way to make relay contacts move in the above diagram :(

Question is how to do the above with 2x Momentary SPST Push button switches OFF (ON)??????

Oh and does this work or is there a better way ???
 

Attachments

  • Syncro Control Panel2.jpg
    Syncro Control Panel2.jpg
    25 KB · Views: 2,174

Harald Kapp

Moderator
Moderator
Lacking a push-to-break button, you could use a oush-to-make button plus an additional relay (auxiliary relay). The relay would be off as long as the button is not pressed. In the off-state a normally closed contact replaces the position of switch 2 in your diagram.
When the pushbutton is pressed, the auxiliary relay is activated, opening the contact.
 
Top