Few Switches, Few Loads

Discussion in 'The Projects Forum' started by DoubleV, May 8, 2013.

  1. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    Hello there everyone,

    I'm working on some exhibit that I should hand in at the end of the month.
    In that model I have 8 Switches and 8 Loads (each load id a 12V led stripe).

    The problem is that it's not 1 load per switch but the design demand that some switches will power all of the loads.
    [SWi - RLi (for i=1,2,3,4,6),
    SWj - ALL (for j=5,7,8)]

    The circuit is connected in naive way with simple power source, leds and wires.
    The problem is of course that I short circuit all the connection so all the loads will power in response to every switch. I know why but nor sure how to solve it.

    I understood that I should either use diodes (not sure how and whether it needs more element like resistors or so) or a digital circuit.

    I would like to implement the "diode" solution in case that the voltage drop on the diode wont cause a voltage that would be too low on the led stripe.
    In case there is no other solution I'll just get another adapter.

    In addition, if it's not too much to ask, I'd love to see a smarter solution with digital circuits in order to learn.

    I did search the forum before but had some hard time finding posts with the same subject (or that would even be related) because i couldn't define my need well enough.

    Any explanation (link, scheme, guidance..) would be extremely helpful.

    Thanks in advanced!
     
  2. #12

    Expert

    Nov 30, 2010
    16,266
    6,778
    This might not be the drawing you need but it's a place to start. Describe what you want if this isn't it.
     
  3. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    Thanks for your reply.
    The circuit you designed isn't what I need for the exhibit. I guess I wasn't understood-able.

    The functionality I need is:
    SW1 -> Led1
    SW2 -> Led2
    SW3 -> Led3
    SW4 -> Led4
    SW5 -> Led1 & Led2 & Led3 & Led4 & Led5 & Led6 & Led7 & Led8
    SW6 -> Led6
    SW7 -> Led1 & Led2 & Led3 & Led4 & Led5 & Led6 & Led7 & Led8
    SW8 -> Led1 & Led2 & Led3 & Led4 & Led5 & Led6 & Led7 & Led8

    Hope it is clearer now.
    tnx again.
     
  4. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
  5. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Draw 8 vertical line's with a switch at the top of each, then draw 8 horizontal lies with a load at the right end on each of those lines.
    (looks like a grid of squares)
    Then start with switch 1 and run down the line inserting a diode to connect the loads that need to be activated by that switch.

    Continue with other switches..

    I know... can't draw right now. Can later if need be :)
     
  6. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    A drawing would help a lot actually.
    I must have not understand because a 2 Switch 2 Loads simulation I made did not run as expected.
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    You will need to do like this:
    1. SW1,SW5,SW7,SW8 need a OR gates → Resistor → LED1
    2. SW2,SW5,SW7,SW8 need a OR gates → Resistor → LED2
    3. SW3,SW5,SW7,SW8 need a OR gates → Resistor → LED3
    4. SW4,SW5,SW7,SW8 need a OR gates → Resistor → LED4
    5. SW5,SW7,SW8 need a OR gates → transistor → Resistor → LED5,LED7,LED8
    6. SW5,SW6,SW7,SW8 need a OR gates → Resistor → LED6

    M74HC4072,DUAL 4-INPUT OR GATE.
    http://www.datasheetcatalog.org/datasheet2/1/03o99ac7l3s20fy84cdhsrgdz2py.pdf
     
  8. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    Hi ScottWang,
    thanks for your answer.
    I read the specs of the OR gate you attached and it support a max Vcc of 7V only (was looking for a 12v one but only found dual 4input and gate for that voltage).
    In addition can you please explain why is the resistor needed and especially why do i need to use a transistor (can't i just short that last input to GND in that 4-input-or-gate?).
    tnx a lot.
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    The resistors is used to limited the current for the LEDs, using the transistor that because the OR gate is not enough current to driving three LEDs.

    If you want to using all the power is the same as +12V, then you can choosing CD4072, and adding ULN2803 to drive the LEDs.

    ULN2803 datasheet, the eight NPN Darlington connected transistors arrays.

    You can easily to find the application of uln2803 from google.

    You can also using CD4082 to do the job, but it's output hi when any one of the input if lo level.

    CD4082 datasheet, CMOS Dual 4-Input AND Gate

    A OR gate need to grounded the unused pins, and a AND gate need to connecting the unused pins to +12V.

    The input pins with SW1~SW8 of OR gates still need some resistors to connected to GND.
     
    Last edited: May 10, 2013
  10. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Here you go:

    8x8 diode switch matrix 050813.PNG
     
    Last edited: May 8, 2013
  11. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    Hi again tubeguy,

    I saw your design and it was very helpful..

    I followed your idea and designed the attached circuit in which every switch activated its main and sub led while switched 5,7,8 activates all the other sub LEDs in addition.
    Have I done it correctly?
    https://dl.dropboxusercontent.com/u/41159221/Circuit3.png

    [EDITED]
    Just realized I could save some diodes there.
    Here is the new design:
    https://dl.dropboxusercontent.com/u/41159221/Circuit4.png
    [/EDITED]

    Another issue that keeps my mind troubled is that I'm using a 12Vdc adapter with the 12V LEDs:
    1. What diodes should I use?
    2. Do you think the the ~0.7V that drops on the diode will somehow disturb the LEDs to shine properly?
     
    Last edited: May 10, 2013
  12. DoubleV

    Thread Starter New Member

    May 8, 2013
    8
    1
    Hi ScottWang,
    I want to thank you for you time.
    I liked your solution very much but had some hard time choosing resistors and dropped that solution for the diode version that 'tubeguy' suggested. Maybe you will have time to give it a pick and give your advice on that.
    Thanks again for your time and kindness.
     
  13. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    MainD1~MainD8 : 8 pcs 560Ω Resistors of limiting current .
    Assuming the LED is 5mm/3V/20mA and working current is 16mA.
    R=(12V-3V)/16mA=562.5Ω, choosing 560Ω.

    The sub LED SubD1~SubD8 need to in series with a resistor
    Assuming the LED is using 5mm/3V/20mA and working current is 16mA.
    R=(12V-3V-0.7V)/16mA=518.75Ω, choosing 510Ω.

    You can change the values of resistor, according to your LED type to calculating the values of resistor.
     
  14. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Looks good. Yes, If a particular LED is connected to only one switch the blocking diode can be eliminated.

    (We are assuming the LEDS contain a current limiting device to allow 12VDC operation.)
    The diode needs to handle whatever the forward current of the 12 volt LED is. If it's 10's to 100's of ma's, then a 1N4000 type diode would work.

    EDIT: You could certainly use a lower current diode as long as it handles about twice the current draw of the LED (for a safety margin).

    With a 12 volt supply, I don't think the ~ 0.7 volt drop should affect the brightness much. Also, if you use a standard unregulated 12VDC wall-wort, the voltage on those is usually higher when they are operated below their rated current,
     
    Last edited: May 11, 2013
Loading...