# LED switching help, animated pic ->

Discussion in 'General Electronics Chat' started by elRey, Feb 26, 2009.

1. ### elRey Thread Starter Well-Known Member

Feb 23, 2009
65
0
Hello,

Below is an incomplete circuit that shows 2 columns of LEDs being lit buy OpAmp comparators. Now I can handle the first column, but how do I get the LEDs to light up like the 2nd column? I've tried linking NOR gates together but no luck.

I need to know what to do with the siignals from the comparators to get the affect of 2nd column of LEDs.

I hope this is enough information.

2. ### thatoneguy Expert

Feb 19, 2009
6,349
732
I had an analog idea involving driving transistors progressively to bypass other LEDs, then realized it would need a bunch of intricate biasing. Then came the thought of non-standard value Zener diodes, or a capacitor stack driving transistors for holdoffs. After that came a thought about discrete logic gates, but looked at a 1 of 4 multiplexer IC schematic (CMOS 4555), and didn't want to convert 'linear' to binary. Then a simple microcontroller solution to replace everything in the circuit - ADC sample then output. At that point, I figured if you could do a uC, a simple programmable logic array would the absolute most simple and speed independent answer.

Rather than draw out the truth table, I'm am posting this mostly useless and inapplicable information because I'm too tired. However, I thought I'd let you know somebody thought about it.

Sorry, but it's an interesting question.

ETA: Solution using 5 ICs (Or a small 16 pin PLA), 1 hex inverter and 4 quad input NAND Gates, truth table:
LEDs labeled A-D top to bottom on both sides left side in table = right side LED.

A = A & !B & !C & !D
B= !A & B & !C & !D
C= !A & !B & C & !D
D= !A & !B & !C & D

Last edited: Feb 26, 2009
3. ### Wendy Moderator

Mar 24, 2008
21,839
3,051
Think exclusive or gates, on the output of the comparitors.

4. ### elRey Thread Starter Well-Known Member

Feb 23, 2009
65
0

And I appreciate the time ! I take comfort in that is wasn't a really simple task that stumpped me.

Looking at XOR gates per the suggestion above now. Thank you both.

5. ### elRey Thread Starter Well-Known Member

Feb 23, 2009
65
0

Like this? (Do I have this right?)

6. ### russ_hensel AAC Fanatic!

Jan 11, 2009
825
57
When it gets this complicated consider using a low end microcontroller.
Nice to know how to use them, may be too big a change for you now.

7. ### elRey Thread Starter Well-Known Member

Feb 23, 2009
65
0
I guess I don't need that bottom XOR.
I also noticed I illustrated XNOR gates instead of XOR.

Last edited: Feb 26, 2009
8. ### thatoneguy Expert

Feb 19, 2009
6,349
732
Quick question for elRey: What software did you create the diagrams in?

I use NI Multisim Pro, which is nifty, but adds extra info and isn't as straightforward in simulation. For the price, I'd wish it had a "show me" mode.