LED selection indicators controlled by multiple switches

Discussion in 'The Projects Forum' started by Paragon, Dec 8, 2009.

  1. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    I'm looking for an IC or circuit that will be like a selection board with indicator LEDs. Happened on this board while searching the internet (with no luck.. only found stuff on flip-flops using one switch)

    •4 momentary switches
    •4 LEDs as indicators of which switch was pressed
    •So the circuit needs 4 inputs for each switch and 4 outputs for the corresponding LEDs.
    •Not sure what the supply voltage is yet.

    •When one switch is pressed, that LED is lit and the one that is on goes out so the only LED on is the one for the last switch that was pushed.

    I was looking on Mouser to see what was available. Looked at quad switch ICs but those seem to be like independent switches where you can have more than one on at a time.

    Any help is appreciated.
     
  2. tkng211

    Well-Known Member

    Jan 4, 2008
    65
    2
    You can use RS flip flop or D flip flop to make a circuit for the requirement.
    Attached is the circuit for your reference. Please note I've never tested it, yet I think it will work. You can test it using a breadboard. If you find the switch bounce affects the circuit performance, you can add a capacitor of 100nF(0.1uF or 104) in parallel with the pull down resistor 10K in each trigger branch.
     
    Last edited: Dec 11, 2009
    djsfantasi likes this.
  3. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Thanks for your input! When it comes to this IC stuff, I have absulutely no experience in this stuff but I always like to learn.

    With a flip flop setup, if LED1 is on and you press SW1, will the LED remain on or change to off? I can seem to find specifics on that.

    I see how you are using the output of IC1A to reset the others and diodes to control signal flow. Just out of curiosity, would it be possible to do the same thing by running that reset signal from the SW1 instead of Q? Basically just have a short signal to trigger the reset instead of a continuous high signal as would be from the LED output.

    Thanks again for your help!
     
  4. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    A couple of other options for "radio buttons".

    Actually, the second one is pretty much the same as tkng221's. ;)

    Ken
     
  5. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Ah.. radio buttons! I always believed it was easier to search from something when you know the technical term. Thanks, Ken!

    That second schematic is kinda like what tkng posted with my inquiry of having the resets run off the switches instead of the output.

    I will have to look at these shematics some more later.

    Awesome forum here!
    Thanks.
     
  6. tkng211

    Well-Known Member

    Jan 4, 2008
    65
    2
    1.When LED1 is on and SW1 is pressed again, LED1 will turn off (like a toggle switch). All 4 LEDs will remain off.

    2. When LED1 is on and another switch (SW2, SW3 or SW4) is pressed, LED1 will turn off and the corresponding LED in the activited branch will be on.

    3. If you don't want that toggle switch function, just disconnect the 'D' pin from the 'barQ' pin. Then you will have one LED on whenever the circuit is energized.

    Sorry for my mistake. I double checked on the truth table of 4013. it shows that whenever the Reset pin is '1' and the Set pin is '0', 'Q' will be always '0'. The correct configuration is to connect the reset signal from the switch through the diodes (act as diode 'OR' circuit) similar to that of KMoffet's circuit. If you try to connect the reset signal without the diodes, you can try to draw the circuit and will know it won't work.
    The reason why I feed the signal from 'Q' is I wanna make sure the corresponding LED is on. Since it will keep the rest pin in '1' continuously, my previous circuit won't work. sorry to confuse you.

    If you want to increase the current through the LED, you will need to use an NPN transistor or a FET (as KMoffet's circuit) to amplify the current because the max. rated output from the IC is 10mA. The current flows through the red LED in my circuit is 7-8mA.

    Anyway, that's the way for you to learn something new. It's also my my purpose to be here- to learn from and to share with other friends here.

    Have fun!
     
    Last edited: Dec 11, 2009
  7. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Thanks for the update.
    I would prefer a non-toggle action. Always have one LED on.

    Don't worry about the mistake. I had no clue the other way wouldn't work. I'm still trying to get used to those truth tables. You guys are the experts here!

    So moving those diodes and disconnecting the D and barQ will make it pretty much the same as Ken's diagram if I'm not mistaken (aside from the output transistors). I might stick with the 4043 because it uses only one IC chip.

    Thaks again.. lots to think about.
     
  8. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Thanks for all your help so far
    (sorry for the long winded thesis below)

    Finally got more specifics on the circuit I'm modding. (it is a footswitch I'm adding LEDs to)
    Voltage supply is around 6V which goes through a 3.3V regulator. Since it is regulated and is what the rest of the components run off, I was going to use the 3.3V for VDD of the CD4043.
    •Do the 10K resistors need to be changed to a different value? (I know LED resistors need ot be changed depending on what current I want through the LEDs)

    The switches are different than I initially thought.
    I won't have a seperate OFF-(ON) switch without modification to the original board.
    Below is part of the circuit with the switches.

    Vin•---^vR1^v---•Vo--[--• (ON) •--^vRs^v--|iGround ]

    [--] are the 4 Switches with 4 different resistors that connect the •Vo signal line to ground when the switches are pushed. (creates a voltage divider to drop the voltage of the signal line to control the main unit)
    Vin=3.3V
    Vo=depends on another switches setting (bank switch)
    Vo drops from the normal (3.2V or 2.9V) to a lower level depending which bank is set and which switch is pushed. (I think around 2.5V to below 1V)

    Now with Ken's schematic
    •Is it possible to connect where the switches are for the sets/resets to the switch side of the Rs on the above drawing to trigger the CD4043?

    Vin•---^vR1^v---•Vo--[--• (ON) •--•Sx--^vRs^v--|iGround ]

    Where Sx between the switch and Rs is connected where SW are on Ken's diagram to Set of the CD4043 (replace switches with a connection at Sx above to monitor for the voltage)
    •What is the minimum voltage CD4043 needs to see on Set/reset to trigger with a 3.3V Vdd?

    •Would having the CD4043 monitor that Sx point change the voltage of the point when the switch is pushed possibly causing the original circuit to not function properly (due to even more dropped voltage of Vo)?

    Only other option that I can think of for triggering CD4043 Set/reset would be to cut traces on the PCB board that connect the switch poles together (they are DPDT ON-(ON) with the poles connected via PCB trace making redundant switches. ON part of the switch is not used but has Vo)
    I could split the poles having 2 isolated switches and connect per original idea.

    Hmm.. just a though. I remember seeing info in the CD4043 datasheet on the CD4044? inverted
    •How would a CD4044 work connected to the ON part of the switches (would see a voltage of 3.2V or 2.9V until button is pushed dropping voltae to 0 setting the latch?)
     
  9. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Looking at the logic table for the 4044, I don't think that is useable for my situation.

    Also, I think my main downfall is not fully understanding the inputs for the CD4043. What voltage level determines a 1 in the logic table (what is the required input for a given Vdd to trigger the set/reset)
     
    Last edited: Dec 15, 2009
  10. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Because of the steering-diode voltage drops it would be iffy. If I were going to try it I would use schottky diodes (BAT 58) instead of silicons (1n4841). And do some bench experiments with the voltage levels.
    It looks like that the 4043 at 3.3v would have input switching at about: Vi-lo<0.8V and Vi-hi> 2.0V
    I would think not. But do you have any ides of the values of the R1 and Rs resistors.

    This seems like a reliable solution...but without seeing the actual layout, and what liabilities you might incur modifing the board, I just can't say.

    That should work.

    Ken
     
  11. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Ah.. forgot about that. I think I will stay away from the signal voltage.

    Ah! I see how to get that from the datasheet now. Some datasheets I get.. others is like looking through dirt.

    I have pics (don't actually have the footswitch to work on - talk about a challenge) but having hard time telling colors apart (mainly browns and golds) and too much workign with vishay dale RNs with the numbers instead of the color bands.
    I will see if I can have some readings taken on them.

    It is just a guitar amp footswitch that I am designing a circuit for another forum so cutting traces is always an option

    I guess it would work. I had half the logic but forgot about the other switches. but back to diodes if it is going to mess with the main footswitch signal.

    Hmm. I'm thinking trace cutting. Need to ponder again.
     
  12. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Got a link to the schematic?

    Ken
     
  13. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    No official schematic. I'm working off pictures converting to a schematic but don't have any values.

    [​IMG]

    IC1 is the 3.3V and Q1 not really sure what it is since the numbers I have don't seem to bring up any possible datasheets.
     
    Last edited: Dec 17, 2009
  14. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    I see a small error from moving parts around. C6 goes from the IC out to ground. The switch should be connected directly to the IC1 out line and not ground. I will fix that tonight.
     
  15. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Once you correct that, can you go through exactly what the circuit is supposed to do?

    Ken
     
  16. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Photo is updated. R3 was moved to the right just to clear up some clutter.

    OK.. this is a footswitch for a guitar amplifier. The main use is for channel switching (I say main becuase when the amp is in manual mode, the buttons control other things but this mod is for channel indicators)
    It is connected via a TRS plug (basic 3-connductor stereo plug)

    S1 switch is for changing the bank (Red or Green LED) and the CH1-4 is for the different channels (the amp can store 4 channels per each of the two banks) Changes the voltage of the signal line S (3.2V or 2.9V) to tell the amp whcih bank. The channel switches then create a voltage divider to further drop that signal voltage

    R1=1.5K
    R5=5.6K
    R6=2.7K
    R7=1.1K
    R8=510


    From calculations, the signal range with the different channel buttons pushed would be 2.5V all the way down to 0.8V which is going to be at the cuttoff for the minimum voltage to trigger the 4043 even before it goes through the diodes. Even with schottky diodes, I guess the signal would have to be amplified? so it might be best to cut traces and isolate that the switch poles.. hmm.
     
  17. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    I agree.

    Ken
     
  18. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    I think I will have to stick with that option for now. Thanks a ton for everyone's help!! I will let you know how it turns out once I can get someone to test it.
     
  19. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    Hey there! Just wanted to update on this project. It is the least I can do for all the help.
    Got some parts in today to test and a new solderless breadboard (I have wanted to get one for years.. finally no more quick soldering or twisting things together to test) I used a PC power supply (3.3V rail was perfect for my needs)
    Circuit works perfectly! I'll do a little testing to measure current draw and should be ready for the perfboard.

    Many thanks to the both of you for your help!
     
  20. Paragon

    Thread Starter Member

    Dec 8, 2009
    45
    0
    One thing I did find is that with 3.35V supply Vdd, the output from the IC is at Vdd with nothing connected then drops to 2V with the LED/resistor connected.
    I had everything figured for Vo=Vdd so 220 resistor and a red LED (1.6V) aiming for an 8mA current not using a

    What is the reason the output voltage drops to 2V? I thought the IC could handle 10mA.
    http://www.onsemi.com/pub_link/Collateral/MC14043B-D.PDF

    Thanks.
     
Loading...