LED switching circuit problem

Thread Starter

Brian Krupicka

Joined Nov 1, 2014
38
Thank you for your offer for assistance.

Attached are the schematic and control panel drawings for the model railroad switching system.

Each circuit works correctly.

You monetarily activate a switch on the control panel to the up position, the turnout changes to the diverse route and the bipolar LED (Red/Green) change state to Red.

You monetarily activate a switch on the control panel to the down position; the turnout reverts to normal route and the bipolar LED (Red/Green) change state to Green.

All thirteen circuits work the same and correctly.


The problem is other LED’s on the control panel will randomly change state when one of the switches on the control panel is activated up or down.

The turnouts are not affected and remain it the desired position.


I am utilizing a tower PC type power supply. This was changed to another power supply and the same problem persists.

I added .1mfd filter capacitors from the junction of R1 and R2 to +voltage and the problem persists.


The wiring from the control panel to the IC switching printed circuit board is less than three feet.

The wiring from the control panel to the “turnouts”, very up to six feet.


Any and all assistance would be helpful.


Brian
 

Attachments

Reloadron

Joined Jan 15, 2015
7,523
Not being a model RR type I am going to venture a guess. The CD4011 is old CMOS and very susceptible to noise, with your circuit the least amount of noise or a spike will cause it to change states. What is actually operating the turnouts? Small servo motor? Solenoid? Whatever it is would likely be the source of the noise causing the CD4011 to change states. Sometimes placing a .1 uF cap across small motors or solenoids will help suppress the noise. This is where a scope would be nice to maybe catch a glitch when the CD4011 changes state. I would be looking at whatever mechanically drives the turnouts and see what can be done across those terminals, be it motor, solenoid or whatever. This is pure speculation on my part.

Ron
 

Thread Starter

Brian Krupicka

Joined Nov 1, 2014
38
Thank you Ron for your suggestion. I will try to add a capacitor as you noted.

You also stated the CD4011 is susceptible to noise and is old CMOS technology.

Do you have a suggestion for a replacement to the CD4011?


Brian
 

ebeowulf17

Joined Aug 12, 2014
3,307
How close is your large power supply cap to your ICs? Are all the ICs on a single pcb or are they distributed on multiple pcbs?

Most of the ICs I've worked with so far recommend two caps, one larger cap (10uF seems common here) at the power input to each pcb, and then a smaller cap (0.1uF maybe) for each IC, as close as possible to the power pin of each IC. I might be remembering these values wrong, and they probably vary depending on the type of IC anyway, but you may need more decoupling capacitors and/or different values. Finally, I know in many such cases, tantalum caps are specified, so the type of cap could be an issue as well.

I did a couple Google searches to get application notes on this specific chip or the family of chips, but somehow came up empty handed. Hopefully someone here can elaborate on best practices for decoupling these particular ICs.
 

Thread Starter

Brian Krupicka

Joined Nov 1, 2014
38
All IC’s are on one large centrally located printed circuit board.
The printed circuit board has a 100mfd capacitor in the center from common to +V (C2 on the drawing).
Each IC has a .1uf capacitor from pin 7 to +V. with very little lead length.
I will try to add a 10uf capacitor from pin 7 to +V as well.
Thank you for your assistance.
Brian
 

Thread Starter

Brian Krupicka

Joined Nov 1, 2014
38
No
One power supply powers the IC board and Model railroad switch machines.
I did try a 5 Volt Power supply for the IC board and a 12 volt power supply for the model railroad switch machines.
I still had the same problem with LED's changing state.
Brian
 

ScottWang

Joined Aug 23, 2012
7,409
1. Change IC from CD4011 to CD4093.
2. R2 -- remove from V+ and connecting to GND.
3. R2 In parallel with a 0.1uf/mylar capacitor.
4. Input switch -- only two contacts that those are input of R1 and V+
5. I'm not sure what's the purpose of Kato Turnout and its datasheet?
 

Søren

Joined Sep 2, 2006
472
Hi,

1. Change IC from CD4011 to CD4093.
2. R2 -- remove from V+ and connecting to GND.
3. R2 In parallel with a 0.1uf/mylar capacitor.
4. Input switch -- only two contacts that those are input of R1 and V+
5. I'm not sure what's the purpose of Kato Turnout and its datasheet?
2: Then it won't work at all. The symbols used resembles OR gates, but they're NANDs and the flip-flop needs pull-ups to work.
3: If at all, I'd use a ceramic cap here (lower ESR).
4: No, they have to pull low.
5: Looks like a common turnout for model trains.

R1 should be superfluous - remove that.
The problem is likely the turnouts (or rather their solenoids)
Put a ceramic cap over the turnout - 100n would be a starting point.
If still getting "crosstalk", reduce R2 to say 1k with a 100nF ceramic in parallel.
Last resort, isolate the turnout via a diode bridge and throw a snubber over its terminals.
Very last resort, put a 15V bidirectional TransZorb over the turnout terminals - a BZW04-11B if the voltage is actually 12.0V or BZW04-13B for up to 14V nominal voltage.
Some or all of the above will cure the problem.
 

Alec_t

Joined Sep 17, 2013
14,329
I wouldn't remove R1. It limits current through the IC input protection diodes if there are voltage spikes. I'd even try increasing R1 to make, in conjunction with a cap across R2 (or from R2 to ground) a more effective spike-suppression RC filter.
 

ScottWang

Joined Aug 23, 2012
7,409
Hi,

2: Then it won't work at all. The symbols used resembles OR gates, but they're NANDs and the flip-flop needs pull-ups to work.
3: If at all, I'd use a ceramic cap here (lower ESR).
4: No, they have to pull low.
5: Looks like a common turnout for model trains.

R1 should be superfluous - remove that.
The problem is likely the turnouts (or rather their solenoids)
Put a ceramic cap over the turnout - 100n would be a starting point.
If still getting "crosstalk", reduce R2 to say 1k with a 100nF ceramic in parallel.
Last resort, isolate the turnout via a diode bridge and throw a snubber over its terminals.
Very last resort, put a 15V bidirectional TransZorb over the turnout terminals - a BZW04-11B if the voltage is actually 12.0V or BZW04-13B for up to 14V nominal voltage.
Some or all of the above will cure the problem.
Thanks.
When I just wake up and saw that, it's really shocked me, I was over 24 hrs with no sleep, and my fuzzy brain can't find any errors, maybe I thought that was right.

The R1, R2 just keep the place they should be, and adding the o.1uf cross on the R2, R1 can be reduce, but you can't remove it, that's for protection.
 

Søren

Joined Sep 2, 2006
472
I wouldn't remove R1. It limits current through the IC input protection diodes if there are voltage spikes. I'd even try increasing R1 to make, in conjunction with a cap across R2 (or from R2 to ground) a more effective spike-suppression RC filter.
Well, transients/spikes should be dealt with at source, not handled by the input protection diodes (that's plain old bad design - these diodes are for ESD protection and not made to dump transients from other places in a circuit). When done right, the gate won't see any "dangerous" spikes, so there's nothing to protect them from.

Components behave better when used correctly and within their limits ;)
 

djsfantasi

Joined Apr 11, 2010
9,163
FYI: A Kato Switch machine is a solenoid coil, that is activated by a polarity sensitive control signal. For purposes of this discussion, it is a solenoid.
 

eetech00

Joined Jun 8, 2013
3,957
Hi

1. Add a contact bounce supressor at each of the FF inputs (pin 1 and 6 of gates)
2. Add transient suppressor across each switch machine solenoid.
3. Check that bypass cap installed at each IC supply.

eT
 

Søren

Joined Sep 2, 2006
472
1. Add a contact bounce supressor at each of the FF inputs (pin 1 and 6 of gates)
You can't make a better debounce circuit than the SR-latch, which the two leftmost gates are configured as.
No need to suppress anything here - imagine if pin 1 is pulled low for the first time, pin 3 will go high. Any further instances of pin 1 going low will do nothing, as pin 3 is already latched high and that won't change until pin 6 is pulled low, flipping the circuit over (or the power is removed).
 

djsfantasi

Joined Apr 11, 2010
9,163
What do you mean by a transient suppressor across the solenoid?
This question was asked because the input to the solenoid must be insensitive to polarity. Polarity in one direction moves the solenoid one way; reverse the polarity and the solenoid moves in the other direction.
 
Top