Model railway help

Thread Starter

RobertB72

Joined Feb 6, 2021
37
But if the lever generates a pulse, a latch circuit will be needed to remember the lever position (or turnout position) and keep the led lit.

or am I overlooking something?
The circuit that controls the motor is totally separate from the circuit that controls the leds
The switch that operates these just piggybacks on to the motor and gets operated by the motor
On the left is the on on switch to control leds
On the right is the motor that moves the turnout and the position of the switch

16C24EA7-0E82-4485-AEDC-7232AF26FE45.jpeg16C24EA7-0E82-4485-AEDC-7232AF26FE45.jpeg
 

djsfantasi

Joined Apr 11, 2010
9,156
But if the lever generates a pulse, a latch circuit will be needed to remember the lever position (or turnout position) and keep the led lit.

or am I overlooking something?
No. Once again, the solution is mechanical. The solution is in the accessory contacts supplied by the manufacturer.

Once a momentary switch activates a coil on the turnout motor, a pair of SPDT switches are toggled. Their position represents the turnout position.
 

eetech00

Joined Jun 8, 2013
3,856
The circuit that controls the motor is totally separate from the circuit that controls the leds
The switch that operates these just piggybacks on to the motor and gets operated by the motor
On the left is the on on switch to control leds
On the right is the motor that moves the turnout and the position of the switch

View attachment 230535View attachment 230535
OK...got it.

The switch on the left is mechanically operated by the one one the right, so the contacts of the one on the left reflects the position of the switch.

So we want to wire the leds to reflect the route set by the turnouts.
 

eetech00

Joined Jun 8, 2013
3,856
I imagine my panel looking like what I’ve attached but with switches drilled into the board with just the toggles showing

so assuming
Turnout switches 1 and 2 are set straight and 3 is set to left
That would mean that the signal at 3a is green and I would run this lead to point V under the mimic board
This woukd light up the led at
3a 2b and 1a and also the led before 1 at the far left of the diagram
Is this how the panel lights would look based on your description above?

1613455587104.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,856
Here is a circuit for operating the LEDs based on the display panel I've shown on post #44.
It will require 3 identical IC's, a few resistors and, of course, LEDs. The contacts shown on the circuit would be wired from the accessory contact attached to each switch machine. The LEDs will light based on the route selected over the turnout positions. Please note that one of the LEDs of each R/G pair will be lighted at all times. I wasn't sure about "Z"...It is always lit green. Each IC is about $1.00 USD but provides alot of design flexiblity.
Let me know what you think.

1613455704602.png
 
Last edited:

Thread Starter

RobertB72

Joined Feb 6, 2021
37
Here is a circuit for operating the LEDs based on the display panel I've shown on post #44.
It will require 3 identical IC's, a few resistors and, of course, LEDs. The contacts shown on the circuit would be wired from the accessory contact attached to each switch machine. The LEDs will light based on the route selected over the turnout positions. Please note that one of the LEDs of each R/G pair will be lighted at all times. I wasn't sure about "Z"...It is always lit green. Each IC is about $1.00 USD but provides alot of design flexiblity.
Let me know what you think.

View attachment 230557
Thank you I had very little understanding of electronics but reasonable understanding of electrics however over the last few days I’ve been reading a lot about chips
And or not etc and I think that’s few of these on my layout will be a lot easier to wire

mid I just wire the green leds for the signals from the accessory switch at each turnout
And take a spur off of each green lead into the chip
And leds that are not green will tell the chip to light up the red aspect

is that about the basics of it
 

eetech00

Joined Jun 8, 2013
3,856
Thank you I had very little understanding of electronics but reasonable understanding of electrics however over the last few days I’ve been reading a lot about chips
And or not etc and I think that’s few of these on my layout will be a lot easier to wire
Its worth a try.
The thing about logic chips (AND,OR,etc) is they have limits on operating voltage and how much output current they can provide before they burn up. The chip I've shown has special characteristics that allow a wide range of operating voltage and high output current. The chip can easily provide enough current to drive just about any miniature lamp you want to use. LEDs require a resistor to limit the amount of current that flows thru it, otherwise it will burn up.

mid I just wire the green leds for the signals from the accessory switch at each turnout
And take a spur off of each green lead into the chip
And leds that are not green will tell the chip to light up the red aspect

is that about the basics of it
Yes. That's about how the circuit works. The chip has 7 internal "inverters" that I've wired so that when the GRN LED is on, its corresponding RED LED is off, or visa versa. Below is a simplified version of the circuit to drive one pair of GRN/RED LEDs.

1613488039921.png
When contact 1 is open:
1. No voltage is connected to pin 1 of inverter A.
2. The output of inverter A (pin 16) is at 12+
3. The GRN LED is off because there is +12v on both sides of the LED.

When contact 1 closes:
1. +12 is connected to pin 1 of inverter A.
2. The output of inverter A (Pin 16) internally connects to ground.
3. The GRN LED turns on because now the output of inverter A is connected to ground.

Inverter B works the same way, except it gets its input from inverter A, so the RED LED lights up in the opposite of the GRN LED.

The contact wiring I've shown accounts for all possible routes so the contacts would need to be wired as shown.

I suggest wiring the whole circuit on a perfboard, then run (3) wires from the perfboard to each of the contacts and (2) wires to each pair of LEDs.

Hope this makes sense...
 
Last edited:

Thread Starter

RobertB72

Joined Feb 6, 2021
37
Its worth a try.
The thing about logic chips (AND,OR,etc) is they have limits on operating voltage and how much output current they can provide before they burn up. The chip I've shown has special characteristics that allow a wide range of operating voltage and high output current. The chip can easily provide enough current to drive just about any miniature lamp you want to use. LEDs require a resistor to limit the amount of current that flows thru it, otherwise it will burn up.



Yes. That's about how the circuit works. The chip has 7 internal "inverters" that I've wired so that when the GRN LED is on, its corresponding RED LED is off, or visa versa. Below is a simplified version of the circuit to drive one pair of GRN/RED LEDs.

View attachment 230607
When contact 1 is open:
1. No voltage is connected to pin 1 of inverter A.
2. The output of inverter A (pin 16) is at 12+
3. The GRN LED is off because there is +12v on both sides of the LED.

When contact 1 closes:
1. +12 is connected to pin 1 of inverter A.
2. The output of inverter A (Pin 16) internally connects to ground.
3. The GRN LED turns on because now the output of inverter A is connected to ground.

Inverter B works the same way, except it gets its input from inverter A, so the RED LED lights up in the opposite of the GRN LED.

The contact wiring I've shown accounts for all possible routes so the contacts would need to be wired as shown.

Hope this makes sense...
It’s starting to make sense
Just a couple of things I need to understand

the ‘chip has its own power at vcc

and it’s own gnd
Can I wire the green led before the chip and run the other lead from the led into the chip or do I gnd this and just run a spur into the chip
And then when that led is on it doesn’t make the red light up and when there is no power at green the red will take its power through the chip from the vcc supply through the output pin and to gnd

so basically the chip is an automatic switch that if no power is at input 1 it will take power at vcc to make output 1 live
I’d probably need a few of these chips
I’m thinking if I can get 2 or 4 gate ones that will be enough for a pair of signals and cut down on wiring to more signals as il just buy a lot of these and mount them next to each pair of signals
Il do a little diagram later in simple terms as I don’t quite understand the symbols just yet

thank you so much for helping me through this I’m looking forward to putting this into practice now
Something that I thought was daunting at the start
 

eetech00

Joined Jun 8, 2013
3,856
It’s starting to make sense
Just a couple of things I need to understand

the ‘chip has its own power at vcc

and it’s own gnd
Yes. It has its own VCC and GND pins. But VCC is not used for your application.
You would need to connect the GND pin to your 12v supply ground terminal.

By the way, the circuit requires a 12v DC power supply of appropriate capacity.
And the capacity will depend on how much current the entire circuit requires.

Can I wire the green led before the chip and run the other lead from the led into the chip or do I gnd this and just run a spur into the chip
And then when that led is on it doesn’t make the red light up and when there is no power at green the red will take its power through the chip from the vcc supply through the output pin and to gnd
I suggest using a few of these Terminal Lug Strips:
1613492390659.png
You can mount them on the back or base of the control panel and use them as a junction point for connecting wires from the LED's and turnout contacts to the perfboard where the chips are mounted.

so basically the chip is an automatic switch that if no power is at input 1 it will take power at vcc to make output 1 live
I’d probably need a few of these chips
I’m thinking if I can get 2 or 4 gate ones that will be enough for a pair of signals and cut down on wiring to more signals as il just buy a lot of these and mount them next to each pair of signals
Il do a little diagram later in simple terms as I don’t quite understand the symbols just yet
A diagram would be a good start.

thank you so much for helping me through this I’m looking forward to putting this into practice now
Something that I thought was daunting at the start
Since this is your first attempt at using chips, I suggest you buy one or two chips and practice wiring them on a perfboard.
I don't want you to become discouraged if you make mistakes....it does take a little practice.
 

Thread Starter

RobertB72

Joined Feb 6, 2021
37
Yes. It has its own VCC and GND pins. But VCC is not used for your application.
You would need to connect the GND pin to your 12v supply ground terminal.

By the way, the circuit requires a 12v DC power supply of appropriate capacity.
And the capacity will depend on how much current the entire circuit requires.



I suggest using a few of these Terminal Lug Strips:
View attachment 230616
You can mount them on the back or base of the control panel and use them as a junction point for connecting wires from the LED's and turnout contacts to the perfboard where the chips are mounted.



A diagram would be a good start.



Since this is your first attempt at using chips, I suggest you buy one or two chips and practice wiring them on a perfboard.
I don't want you to become discouraged if you make mistakes....it does take a little practice.
Thank you and what is the model of these chips
Do I buy the bases for these chips to sit in as I’ve read not to solder the actual chips
 

eetech00

Joined Jun 8, 2013
3,856
Thank you and what is the model of these chips
Do I buy the bases for these chips to sit in as I’ve read not to solder the actual chips
The chip number is TBD62003A.
Yes. You should buy a 16 pin IC socket and solder the wires to the socket. Then plug the chip into the socket.
Also look at perfboards for wiring up the circuit.
 

djsfantasi

Joined Apr 11, 2010
9,156
The chip number is TBD62003A.
Yes. You should buy a 16 pin IC socket and solder the wires to the socket. Then plug the chip into the socket.
Also look at perfboards for wiring up the circuit.
Just remember you have to insert the chips in the correct direction. They usually have a mark at one end.

Ask me how I know...
 

Thread Starter

RobertB72

Joined Feb 6, 2021
37
The chip number is TBD62003A.
Yes. You should buy a 16 pin IC socket and solder the wires to the socket. Then plug the chip into the socket.
Also look at perfboards for wiring up the circuit.
So if I did this arrangement with an on / on switch
And 4 leds
At position a
Red 2 is live and green 3
And at position b
Green 1 is live and red 4 is live

F66189B6-E5EC-4F48-8007-F83914EA2AA9.jpeg
 

eetech00

Joined Jun 8, 2013
3,856
So if I did this arrangement with an on / on switch
And 4 leds
At position a
Red 2 is live and green 3
And at position b
Green 1 is live and red 4 is live
First.....any LED shown on your diagram that is supposed to be "ON" will burn up because there is no "limit" resistor in series with the LED. So remember, unless you have confirmed that the LED has an internal current limiting resistor (there are some that do), always use a limit resistor.

Now, to answer your question using your diagram.
Assumming +V is connected at "power in".

If the contact is closed at position A, open at position B:
GRN1 = on, RED2=off, GRN3=off, RED4=on

If the contact is closed at position B, open at position A:
GRN1 = off, RED2=on, GRN3=on, RED4=off
 

djsfantasi

Joined Apr 11, 2010
9,156
First.....any LED shown on your diagram that is supposed to be "ON" will burn up because there is no "limit" resistor in series with the LED. So remember, unless you have confirmed that the LED has an internal current limiting resistor (there are some that do), always use a limit resistor.

Now, to answer your question using your diagram.
Assumming +V is connected at "power in".

If the contact is closed at position A, open at position B:
GRN1 = on, RED2=off, GRN3=off, RED4=on

If the contact is closed at position B, open at position A:
GRN1 = off, RED2=on, GRN3=on, RED4=off
And always use 1 resistor per LED. Specifically in this design (there may be exceptions, but not this time).
 

Thread Starter

RobertB72

Joined Feb 6, 2021
37
First.....any LED shown on your diagram that is supposed to be "ON" will burn up because there is no "limit" resistor in series with the LED. So remember, unless you have confirmed that the LED has an internal current limiting resistor (there are some that do), always use a limit resistor.

Now, to answer your question using your diagram.
Assumming +V is connected at "power in".

If the contact is closed at position A, open at position B:
GRN1 = on, RED2=off, GRN3=off, RED4=on

If the contact is closed at position B, open at position A:
GRN1 = off, RED2=on, GRN3=on, RED4=off
so the zig zag line r1 / r2 510 are the resistors ?
I’ve got the resistors already along with leds and some diodes
So I would use one chip for each turnout taking each subsequent turnout feed from either side
Ie any turnouts that followed on from the A side would get the switch power from that side and any turnouts from b side would have their feed from that side
This so if no power makes it past the turnout both signals would be red
 

Thread Starter

RobertB72

Joined Feb 6, 2021
37
so the zig zag line r1 / r2 510 are the resistors ?
I’ve got the resistors already along with leds and some diodes
So I would use one chip for each turnout taking each subsequent turnout feed from either side
Ie any turnouts that followed on from the A side would get the switch power from that side and any turnouts from b side would have their feed from that side
This so if no power makes it past the turnout both signals would be red
one more thing
If the power source at the left hand side of the diagram had a break in the lead feeding the on on switch
Then all both red leds would be lit assuming their power source never had a break in it
 
Top