How can I wire a 9-position switch so that each position turns on one more LED than the one before?Request for guidance on sources to help me figure out how to do simple thingHelp wiring multiple different colored LED lightsHow to utilize a Bi-color LED switchHow to wire three 10W LED spotlights to one plug?Best way to power 30-90 LEDs on 3.5 OR 12vMaster switch to turn on and off independent lightsHow to replace a green LED with a red one in a simple transistor switch?How to dim my dc push button led switch that is too bright?Alternating 3 LED projectHow to add red led light to my white led lights

Is there a word for the censored part of a video?

How to pronounce 'c++' in Spanish

Philosophical question on logistic regression: why isn't the optimal threshold value trained?

How much cash can I safely carry into the USA and avoid civil forfeiture?

How bug prioritization works in agile projects vs non agile

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

Creating a chemical industry from a medieval tech level without petroleum

How to have a sharp product image?

How can I get rid of an unhelpful parallel branch when unpivoting a single row?

Is there really no use for MD5 anymore?

Older movie/show about humans on derelict alien warship which refuels by passing through a star

What is the best way to deal with NPC-NPC combat?

Critique of timeline aesthetic

Should the Product Owner dictate what info the UI needs to display?

A faster way to compute the largest prime factor

How to not starve gigantic beasts

Co-worker works way more than he should

Why is the underscore command _ useful?

Why must Chinese maps be obfuscated?

Will I lose my paid in full property

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

A ​Note ​on ​N!

Check if a string is entirely made of the same substring

What does "function" actually mean in music?



How can I wire a 9-position switch so that each position turns on one more LED than the one before?


Request for guidance on sources to help me figure out how to do simple thingHelp wiring multiple different colored LED lightsHow to utilize a Bi-color LED switchHow to wire three 10W LED spotlights to one plug?Best way to power 30-90 LEDs on 3.5 OR 12vMaster switch to turn on and off independent lightsHow to replace a green LED with a red one in a simple transistor switch?How to dim my dc push button led switch that is too bright?Alternating 3 LED projectHow to add red led light to my white led lights






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








24












$begingroup$


I have a 9-way switch like this guy:



9-way



And I'm trying to figure out how I can turn on one LED with position 1, 2 with position 2, all the way up to all 9 in position 9.



Obviously I can repeat all the wiring for the LEDs at each position, but that seems silly.



My idea is that with a layout like below, the switch would represent the circled red line (shown in position 3), which would elongate to the right in each successive position until it connects all the lights. How can I do this?



schematic










share|improve this question









$endgroup$







  • 4




    $begingroup$
    What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
    $endgroup$
    – Bruce Abbott
    Apr 23 at 0:52










  • $begingroup$
    Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
    $endgroup$
    – Sunnyskyguy EE75
    Apr 23 at 2:09










  • $begingroup$
    @BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
    $endgroup$
    – Isaac Lubow
    Apr 23 at 3:26






  • 1




    $begingroup$
    With ground above and below, your circuit looks like it's from beyond the grave :)
    $endgroup$
    – Dmitry Grigoryev
    2 days ago











  • $begingroup$
    @DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
    $endgroup$
    – Isaac Lubow
    2 days ago

















24












$begingroup$


I have a 9-way switch like this guy:



9-way



And I'm trying to figure out how I can turn on one LED with position 1, 2 with position 2, all the way up to all 9 in position 9.



Obviously I can repeat all the wiring for the LEDs at each position, but that seems silly.



My idea is that with a layout like below, the switch would represent the circled red line (shown in position 3), which would elongate to the right in each successive position until it connects all the lights. How can I do this?



schematic










share|improve this question









$endgroup$







  • 4




    $begingroup$
    What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
    $endgroup$
    – Bruce Abbott
    Apr 23 at 0:52










  • $begingroup$
    Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
    $endgroup$
    – Sunnyskyguy EE75
    Apr 23 at 2:09










  • $begingroup$
    @BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
    $endgroup$
    – Isaac Lubow
    Apr 23 at 3:26






  • 1




    $begingroup$
    With ground above and below, your circuit looks like it's from beyond the grave :)
    $endgroup$
    – Dmitry Grigoryev
    2 days ago











  • $begingroup$
    @DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
    $endgroup$
    – Isaac Lubow
    2 days ago













24












24








24


4



$begingroup$


I have a 9-way switch like this guy:



9-way



And I'm trying to figure out how I can turn on one LED with position 1, 2 with position 2, all the way up to all 9 in position 9.



Obviously I can repeat all the wiring for the LEDs at each position, but that seems silly.



My idea is that with a layout like below, the switch would represent the circled red line (shown in position 3), which would elongate to the right in each successive position until it connects all the lights. How can I do this?



schematic










share|improve this question









$endgroup$




I have a 9-way switch like this guy:



9-way



And I'm trying to figure out how I can turn on one LED with position 1, 2 with position 2, all the way up to all 9 in position 9.



Obviously I can repeat all the wiring for the LEDs at each position, but that seems silly.



My idea is that with a layout like below, the switch would represent the circled red line (shown in position 3), which would elongate to the right in each successive position until it connects all the lights. How can I do this?



schematic







led switches wiring






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 23 at 0:32









Isaac LubowIsaac Lubow

22627




22627







  • 4




    $begingroup$
    What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
    $endgroup$
    – Bruce Abbott
    Apr 23 at 0:52










  • $begingroup$
    Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
    $endgroup$
    – Sunnyskyguy EE75
    Apr 23 at 2:09










  • $begingroup$
    @BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
    $endgroup$
    – Isaac Lubow
    Apr 23 at 3:26






  • 1




    $begingroup$
    With ground above and below, your circuit looks like it's from beyond the grave :)
    $endgroup$
    – Dmitry Grigoryev
    2 days ago











  • $begingroup$
    @DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
    $endgroup$
    – Isaac Lubow
    2 days ago












  • 4




    $begingroup$
    What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
    $endgroup$
    – Bruce Abbott
    Apr 23 at 0:52










  • $begingroup$
    Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
    $endgroup$
    – Sunnyskyguy EE75
    Apr 23 at 2:09










  • $begingroup$
    @BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
    $endgroup$
    – Isaac Lubow
    Apr 23 at 3:26






  • 1




    $begingroup$
    With ground above and below, your circuit looks like it's from beyond the grave :)
    $endgroup$
    – Dmitry Grigoryev
    2 days ago











  • $begingroup$
    @DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
    $endgroup$
    – Isaac Lubow
    2 days ago







4




4




$begingroup$
What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
$endgroup$
– Bruce Abbott
Apr 23 at 0:52




$begingroup$
What operating voltage does each LED require, how much current does each LED draw, and what is the supply voltage?
$endgroup$
– Bruce Abbott
Apr 23 at 0:52












$begingroup$
Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
$endgroup$
– Sunnyskyguy EE75
Apr 23 at 2:09




$begingroup$
Your logic defines OR input logic for each LED but easier tinyurl.com/y38aomlp
$endgroup$
– Sunnyskyguy EE75
Apr 23 at 2:09












$begingroup$
@BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
$endgroup$
– Isaac Lubow
Apr 23 at 3:26




$begingroup$
@BruceAbbott the idea was to use a 9V battery, but if I have to, I can use a DC power supply that fits a 9V-type switching jack. The LEDs draw about 25-30mA but they do the trick at even half-brightness, so there's some wiggle room there.
$endgroup$
– Isaac Lubow
Apr 23 at 3:26




1




1




$begingroup$
With ground above and below, your circuit looks like it's from beyond the grave :)
$endgroup$
– Dmitry Grigoryev
2 days ago





$begingroup$
With ground above and below, your circuit looks like it's from beyond the grave :)
$endgroup$
– Dmitry Grigoryev
2 days ago













$begingroup$
@DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
$endgroup$
– Isaac Lubow
2 days ago




$begingroup$
@DmitryGrigoryev Is that weird? I'm used to seeing guitar pedal schematics where they just stick ground wherever it fits...
$endgroup$
– Isaac Lubow
2 days ago










11 Answers
11






active

oldest

votes


















60












$begingroup$

Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.





schematic





simulate this circuit – Schematic created using CircuitLab



You can possibly use a buck-boost converter to make the 30V if you don't already have a suitable voltage.



Here's a simple way to build one using a LM2596S module:



  1. Remove the potentiometer and both large capacitors

  2. Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.

  3. Connect a 100 ohm resistor from the -output to the centre potentiometer terminal.

Modified in this way, it will create a negative voltage on the -out terminals and act as a 12.5mA current sink at the centre potentiometer terminal (with source at +out) if power is applied between +in and +out.





schematic





simulate this circuit



or a XL6009 buck-boost module can be modified. this time just remove the potentiometer and add a 100 ohm resistor, connec 3-30V to the nirmal input terminals and connect the LED string to the output and resistor.





schematic





simulate this circuit






share|improve this answer











$endgroup$








  • 7




    $begingroup$
    Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
    $endgroup$
    – TooTea
    2 days ago










  • $begingroup$
    Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
    $endgroup$
    – Isaac Lubow
    2 days ago







  • 1




    $begingroup$
    @IsaacLubow, yes, that is suitable.
    $endgroup$
    – Jasen
    2 days ago










  • $begingroup$
    Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
    $endgroup$
    – Isaac Lubow
    yesterday










  • $begingroup$
    @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
    $endgroup$
    – pipe
    18 hours ago


















14












$begingroup$

If you’re not wedded to the specific switch you have, get a “progressive shorting rotary switch” to replace it. That works just like your drawing.






share|improve this answer









$endgroup$












  • $begingroup$
    That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
    $endgroup$
    – Isaac Lubow
    11 hours ago


















14












$begingroup$

One way to achieve your progressive LED lightup as you turn the rotary switch is to use a current sink on the common of the switch and then wire the LEDs across the selector switch terminals as shown below. The constant current sink shown is a low cost way to get a 20mA sink for the LEDs so that there is no brightness variation as the number of lit LEDs changes. This scheme does require a high enough supply voltage that overcomes the forward voltage drop of the series string of up to nine LEDs.



enter image description here






share|improve this answer









$endgroup$












  • $begingroup$
    Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
    $endgroup$
    – Isaac Lubow
    2 days ago










  • $begingroup$
    @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
    $endgroup$
    – Michael Karas
    2 days ago










  • $begingroup$
    Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
    $endgroup$
    – Michael Karas
    2 days ago










  • $begingroup$
    Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
    $endgroup$
    – Isaac Lubow
    yesterday






  • 1




    $begingroup$
    A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
    $endgroup$
    – Alex Cannon
    15 hours ago


















12












$begingroup$

Oldfart and Mattman944 give very similar answers involving complex diode networks. If brightness variation is acceptable a simple diode ladder is sufficient. Red LED's typically have 2V voltage drop and diodes typically have 0.6V voltage drop, so the combined effect of the diode voltage drops in a ladder is can be significant.



With a 9V battery and the switch in position 9, the current limiting resistor for LED 9 will see 9-2=7V and the current limiting resistor for LED 1 will see 9-2-(0.6*8)=2.2V, which will lead to a more than threefold difference in current through the LEDs if the current limiting resistors are of the same value.
enter image description here



If you insist on equal brightness it would be necessary to include all the diodes recommended by Oldfart and Mattman944, but with only a few extra diodes you can mitigate the variation in brightness to hopefully imperceptible levels. By adding three more diodes at the left as in the drawing above, we ensure that with the switch in position 9, LED 5 sees the same voltage as LED 8. The actual voltages across the current limiting resistors are as below. Note that an additional diode between LED's 5 and 2 (not considered in the table below) would improve the circuit further.



LED Voltage across current limiting resistor
9 7
8 7-0.6 =6.4
7 7-0.6*2 =5.8
6 7-0.6*3 =5.2
5 7-0.6 =6.4
4 7-0.6*2 =5.8
3 7-0.6*3 =5.2
2 7-0.6*4 =4.6
1 7-0.6*5 =4


Another way of balancing the brightnesses is to install diodes in the lines to some LED's to deliberately increase the voltage drop. In the drawing above an additional diode is inserted into the line from switch contact 1 to LED 1, so that LED 1 sees the same voltage regardless of whether the switch is in position 1 or 2. The current limiting resistor for LED 1 can then be a smaller value than the others in order to balance the brightness of this LED with the others.



These are just ideas - for this type of project the best balance of even brightness versus complexity may be best found by experimentation.






share|improve this answer









$endgroup$












  • $begingroup$
    This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
    $endgroup$
    – Isaac Lubow
    yesterday






  • 1




    $begingroup$
    @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
    $endgroup$
    – Level River St
    yesterday







  • 1




    $begingroup$
    Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
    $endgroup$
    – Harper
    11 hours ago










  • $begingroup$
    @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
    $endgroup$
    – Level River St
    10 hours ago











  • $begingroup$
    You can use the same value diodes for everything, if you're not a huge fan of math...
    $endgroup$
    – Isaac Lubow
    10 hours ago


















7












$begingroup$

Here is a low tech solution that requires a lot of parts. Only 4 positions shown, you need 45 diodes for 9 positions.



Sunyskyguy has a clever solution if you have a high voltage available.



enter image description here






share|improve this answer









$endgroup$












  • $begingroup$
    Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
    $endgroup$
    – Bob Jacobsen
    Apr 23 at 3:22










  • $begingroup$
    You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
    $endgroup$
    – Mattman944
    2 days ago










  • $begingroup$
    Only answer that actually answers the question so far.
    $endgroup$
    – abligh
    2 days ago


















5












$begingroup$

You can use a buffer per LED like this.



diagram



In this diagram, R1 through R3 are pullup resistors. Closing any of the
switches will cause the buffer directly connected to it to go to 0,
which turns low all the buffers below it. 4050 has 6 buffers. You will
need 2 of them for 9 LEDs.



This solution does only needs a voltage to power the 4050 (3V to 20V for
CD4050B). You can chain up as many 4050s as you like.






share|improve this answer








New contributor




kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




















    4












    $begingroup$

    If you can afford another 0.5V drop you can use a massive array of diodes. Here is an example with three LEDS which requires 6 diodes.

    (Sorry for the SW, SW2.., circuit lab does not have a rotatory switch symbol)





    schematic





    simulate this circuit – Schematic created using CircuitLab






    share|improve this answer









    $endgroup$




















      4












      $begingroup$

      It might seem like overkill but it would be fewer parts, and possibly less expensive, than some other solutions to use a micro-controller. Many Ardunio boards have over 9 digital output pins - you could drive one LED with each of nine pins. By having the switch pick different points of a voltage divider and feeding it to one analog pin, you could determine the switch position and light up what ever you have decided should be lit up.






      share|improve this answer









      $endgroup$












      • $begingroup$
        I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
        $endgroup$
        – Isaac Lubow
        2 days ago






      • 1




        $begingroup$
        Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
        $endgroup$
        – Solomon Slow
        2 days ago






      • 1




        $begingroup$
        The switch is what inspired the project, so, not this time!
        $endgroup$
        – Isaac Lubow
        2 days ago










      • $begingroup$
        or use an LM3918 and a resistor chain on the switch
        $endgroup$
        – Jasen
        2 days ago










      • $begingroup$
        An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
        $endgroup$
        – Diego C Nascimento
        yesterday


















      2












      $begingroup$

      I wouldn't suggest this unless you're eager to climb the learning curve for FPGAs (including buying a programming pod and dealing with a SMT part with lots of pins), but you could use a Lattice LCMXO2 series with internal flash and oscillator. Circuit would look like this (plus some power supply connections, a programming connector and bypass caps):





      schematic





      simulate this circuit – Schematic created using CircuitLab



      The programming software (Lattice Diamond) supports VHDL and Verilog.



      If you're feeling lucky you could set the outputs to minimum current drive and omit the resistors.






      share|improve this answer









      $endgroup$




















        1












        $begingroup$

        An alternative approach is to use a LM3914 to drive the LEDs, with an external 10-resistor ladder powered from the reference voltage. Then the rotary switch simply selects a voltage from the ladder which will light the required number of LEDs.



        This is just an outline; for example, the topmost resistor of the ladder would be selected to set the step voltages within the tolerance (which in my experience is pretty tight) of the LM3914 comparators.



        In addition, the whole thing will run off 3.3V supply






        share|improve this answer











        $endgroup$




















          1












          $begingroup$

          Similar to the micro controller method, another way is to use a OP amp ICs. The positive inputs are all connected together and they connect to a potentiometer that produces varying voltage, instead of a switch. The negative connections connect to a series of resistors to give each one a different Voltage. As the knob is turned, the lights turn on one by one.



          This type of circuit is used in power inverters that have those 10 segment LED strips to tell you how many Amps the inverter is putting out. I believe they have all the OP amps in one IC.



          I know it's not an exact answer to the question since it doesn't use a switch, but it likely accomplishes what you want.



          Edit 2: It's still possible to use a normal switch that connects only one contact at a time. Connect all the negative OP amp inputs to a low Voltage like 1V. Then connect each switch output to each op amp Positive input. Put a large resistor like 100k on the switch input and connect that to the positive power supply. It needs to be a big resistor to not let enough current through to make the LED above turn on noticeably, since the positive inputs will be connected to an LED anode from another OP amp. Now when you turn the switch, one LED will come on at a time. To make all the LEDs next to it come on too, just connect the output of each OP amp to the positive input of the one under it. The forward voltage drop of the LEDs will much too high compared to the 1V reference Voltage to take enough Voltage away from the positive input of the OP amp under it, so the LED won't prevent the OP amp from turning on, but other non LED loads might. This assumes that the OP amps are the current source only type. Current source and sink op Amps can't be used since it will prevent the positive input of the other op amp from going high. Many OP amps are current sink only, so in that case the LEDs would have to be arranged with the cathodes connecting to the OP amp inputs, and the rest of the circuit switched around. Don't forget to use pull up or pull down resistors for the OP amp inputs that are connected to the switch. The same resistor value that was used to connect the switch to the positive Voltage supply should be fine. I hope that's not too confusing.



          Edit 3: It looks like someone else posted a similar but simpler solution using buffer ICs instead of OP amps.






          share|improve this answer











          $endgroup$











            protected by W5VO 15 hours ago



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?














            11 Answers
            11






            active

            oldest

            votes








            11 Answers
            11






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            60












            $begingroup$

            Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.





            schematic





            simulate this circuit – Schematic created using CircuitLab



            You can possibly use a buck-boost converter to make the 30V if you don't already have a suitable voltage.



            Here's a simple way to build one using a LM2596S module:



            1. Remove the potentiometer and both large capacitors

            2. Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.

            3. Connect a 100 ohm resistor from the -output to the centre potentiometer terminal.

            Modified in this way, it will create a negative voltage on the -out terminals and act as a 12.5mA current sink at the centre potentiometer terminal (with source at +out) if power is applied between +in and +out.





            schematic





            simulate this circuit



            or a XL6009 buck-boost module can be modified. this time just remove the potentiometer and add a 100 ohm resistor, connec 3-30V to the nirmal input terminals and connect the LED string to the output and resistor.





            schematic





            simulate this circuit






            share|improve this answer











            $endgroup$








            • 7




              $begingroup$
              Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
              $endgroup$
              – TooTea
              2 days ago










            • $begingroup$
              Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
              $endgroup$
              – Isaac Lubow
              2 days ago







            • 1




              $begingroup$
              @IsaacLubow, yes, that is suitable.
              $endgroup$
              – Jasen
              2 days ago










            • $begingroup$
              Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
              $endgroup$
              – Isaac Lubow
              yesterday










            • $begingroup$
              @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
              $endgroup$
              – pipe
              18 hours ago















            60












            $begingroup$

            Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.





            schematic





            simulate this circuit – Schematic created using CircuitLab



            You can possibly use a buck-boost converter to make the 30V if you don't already have a suitable voltage.



            Here's a simple way to build one using a LM2596S module:



            1. Remove the potentiometer and both large capacitors

            2. Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.

            3. Connect a 100 ohm resistor from the -output to the centre potentiometer terminal.

            Modified in this way, it will create a negative voltage on the -out terminals and act as a 12.5mA current sink at the centre potentiometer terminal (with source at +out) if power is applied between +in and +out.





            schematic





            simulate this circuit



            or a XL6009 buck-boost module can be modified. this time just remove the potentiometer and add a 100 ohm resistor, connec 3-30V to the nirmal input terminals and connect the LED string to the output and resistor.





            schematic





            simulate this circuit






            share|improve this answer











            $endgroup$








            • 7




              $begingroup$
              Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
              $endgroup$
              – TooTea
              2 days ago










            • $begingroup$
              Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
              $endgroup$
              – Isaac Lubow
              2 days ago







            • 1




              $begingroup$
              @IsaacLubow, yes, that is suitable.
              $endgroup$
              – Jasen
              2 days ago










            • $begingroup$
              Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
              $endgroup$
              – Isaac Lubow
              yesterday










            • $begingroup$
              @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
              $endgroup$
              – pipe
              18 hours ago













            60












            60








            60





            $begingroup$

            Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.





            schematic





            simulate this circuit – Schematic created using CircuitLab



            You can possibly use a buck-boost converter to make the 30V if you don't already have a suitable voltage.



            Here's a simple way to build one using a LM2596S module:



            1. Remove the potentiometer and both large capacitors

            2. Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.

            3. Connect a 100 ohm resistor from the -output to the centre potentiometer terminal.

            Modified in this way, it will create a negative voltage on the -out terminals and act as a 12.5mA current sink at the centre potentiometer terminal (with source at +out) if power is applied between +in and +out.





            schematic





            simulate this circuit



            or a XL6009 buck-boost module can be modified. this time just remove the potentiometer and add a 100 ohm resistor, connec 3-30V to the nirmal input terminals and connect the LED string to the output and resistor.





            schematic





            simulate this circuit






            share|improve this answer











            $endgroup$



            Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.





            schematic





            simulate this circuit – Schematic created using CircuitLab



            You can possibly use a buck-boost converter to make the 30V if you don't already have a suitable voltage.



            Here's a simple way to build one using a LM2596S module:



            1. Remove the potentiometer and both large capacitors

            2. Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.

            3. Connect a 100 ohm resistor from the -output to the centre potentiometer terminal.

            Modified in this way, it will create a negative voltage on the -out terminals and act as a 12.5mA current sink at the centre potentiometer terminal (with source at +out) if power is applied between +in and +out.





            schematic





            simulate this circuit



            or a XL6009 buck-boost module can be modified. this time just remove the potentiometer and add a 100 ohm resistor, connec 3-30V to the nirmal input terminals and connect the LED string to the output and resistor.





            schematic





            simulate this circuit







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 8 hours ago

























            answered Apr 23 at 2:41









            JasenJasen

            12.4k11733




            12.4k11733







            • 7




              $begingroup$
              Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
              $endgroup$
              – TooTea
              2 days ago










            • $begingroup$
              Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
              $endgroup$
              – Isaac Lubow
              2 days ago







            • 1




              $begingroup$
              @IsaacLubow, yes, that is suitable.
              $endgroup$
              – Jasen
              2 days ago










            • $begingroup$
              Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
              $endgroup$
              – Isaac Lubow
              yesterday










            • $begingroup$
              @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
              $endgroup$
              – pipe
              18 hours ago












            • 7




              $begingroup$
              Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
              $endgroup$
              – TooTea
              2 days ago










            • $begingroup$
              Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
              $endgroup$
              – Isaac Lubow
              2 days ago







            • 1




              $begingroup$
              @IsaacLubow, yes, that is suitable.
              $endgroup$
              – Jasen
              2 days ago










            • $begingroup$
              Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
              $endgroup$
              – Isaac Lubow
              yesterday










            • $begingroup$
              @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
              $endgroup$
              – pipe
              18 hours ago







            7




            7




            $begingroup$
            Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
            $endgroup$
            – TooTea
            2 days ago




            $begingroup$
            Or alternatively, connect the switch between the anodes and the current source instead of the ground. That way there will be no power draw when no LEDs are lit, and it will be easier to route if you want the LED bar to grow clockwise/to the right when the switch is turned clockwise.
            $endgroup$
            – TooTea
            2 days ago












            $begingroup$
            Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
            $endgroup$
            – Isaac Lubow
            2 days ago





            $begingroup$
            Can I do this with an LM317 like this one mouser.com/ProductDetail/ON-Semiconductor/…?
            $endgroup$
            – Isaac Lubow
            2 days ago





            1




            1




            $begingroup$
            @IsaacLubow, yes, that is suitable.
            $endgroup$
            – Jasen
            2 days ago




            $begingroup$
            @IsaacLubow, yes, that is suitable.
            $endgroup$
            – Jasen
            2 days ago












            $begingroup$
            Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
            $endgroup$
            – Isaac Lubow
            yesterday




            $begingroup$
            Can you point me to a schematic where an LM317 turns 9VDC into the constant current needed for this setup?
            $endgroup$
            – Isaac Lubow
            yesterday












            $begingroup$
            @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
            $endgroup$
            – pipe
            18 hours ago




            $begingroup$
            @IsaacLubow It can't - it can only make the voltage lower. You need at least 20 volts to light up the LEDs, but likely more (so can't even use two 9V batteries in series). Look at the LM2596S option, it works well with 9V input too.
            $endgroup$
            – pipe
            18 hours ago













            14












            $begingroup$

            If you’re not wedded to the specific switch you have, get a “progressive shorting rotary switch” to replace it. That works just like your drawing.






            share|improve this answer









            $endgroup$












            • $begingroup$
              That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
              $endgroup$
              – Isaac Lubow
              11 hours ago















            14












            $begingroup$

            If you’re not wedded to the specific switch you have, get a “progressive shorting rotary switch” to replace it. That works just like your drawing.






            share|improve this answer









            $endgroup$












            • $begingroup$
              That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
              $endgroup$
              – Isaac Lubow
              11 hours ago













            14












            14








            14





            $begingroup$

            If you’re not wedded to the specific switch you have, get a “progressive shorting rotary switch” to replace it. That works just like your drawing.






            share|improve this answer









            $endgroup$



            If you’re not wedded to the specific switch you have, get a “progressive shorting rotary switch” to replace it. That works just like your drawing.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 23 at 3:21









            Bob JacobsenBob Jacobsen

            1,27759




            1,27759











            • $begingroup$
              That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
              $endgroup$
              – Isaac Lubow
              11 hours ago
















            • $begingroup$
              That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
              $endgroup$
              – Isaac Lubow
              11 hours ago















            $begingroup$
            That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
            $endgroup$
            – Isaac Lubow
            11 hours ago




            $begingroup$
            That solves the much smaller of my two problems, yes - it turns out that powering them is the other hurdle.
            $endgroup$
            – Isaac Lubow
            11 hours ago











            14












            $begingroup$

            One way to achieve your progressive LED lightup as you turn the rotary switch is to use a current sink on the common of the switch and then wire the LEDs across the selector switch terminals as shown below. The constant current sink shown is a low cost way to get a 20mA sink for the LEDs so that there is no brightness variation as the number of lit LEDs changes. This scheme does require a high enough supply voltage that overcomes the forward voltage drop of the series string of up to nine LEDs.



            enter image description here






            share|improve this answer









            $endgroup$












            • $begingroup$
              Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
              $endgroup$
              – Isaac Lubow
              2 days ago










            • $begingroup$
              @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
              $endgroup$
              – Alex Cannon
              15 hours ago















            14












            $begingroup$

            One way to achieve your progressive LED lightup as you turn the rotary switch is to use a current sink on the common of the switch and then wire the LEDs across the selector switch terminals as shown below. The constant current sink shown is a low cost way to get a 20mA sink for the LEDs so that there is no brightness variation as the number of lit LEDs changes. This scheme does require a high enough supply voltage that overcomes the forward voltage drop of the series string of up to nine LEDs.



            enter image description here






            share|improve this answer









            $endgroup$












            • $begingroup$
              Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
              $endgroup$
              – Isaac Lubow
              2 days ago










            • $begingroup$
              @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
              $endgroup$
              – Alex Cannon
              15 hours ago













            14












            14








            14





            $begingroup$

            One way to achieve your progressive LED lightup as you turn the rotary switch is to use a current sink on the common of the switch and then wire the LEDs across the selector switch terminals as shown below. The constant current sink shown is a low cost way to get a 20mA sink for the LEDs so that there is no brightness variation as the number of lit LEDs changes. This scheme does require a high enough supply voltage that overcomes the forward voltage drop of the series string of up to nine LEDs.



            enter image description here






            share|improve this answer









            $endgroup$



            One way to achieve your progressive LED lightup as you turn the rotary switch is to use a current sink on the common of the switch and then wire the LEDs across the selector switch terminals as shown below. The constant current sink shown is a low cost way to get a 20mA sink for the LEDs so that there is no brightness variation as the number of lit LEDs changes. This scheme does require a high enough supply voltage that overcomes the forward voltage drop of the series string of up to nine LEDs.



            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 2 days ago









            Michael KarasMichael Karas

            45.4k348106




            45.4k348106











            • $begingroup$
              Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
              $endgroup$
              – Isaac Lubow
              2 days ago










            • $begingroup$
              @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
              $endgroup$
              – Alex Cannon
              15 hours ago
















            • $begingroup$
              Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
              $endgroup$
              – Isaac Lubow
              2 days ago










            • $begingroup$
              @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
              $endgroup$
              – Michael Karas
              2 days ago










            • $begingroup$
              Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
              $endgroup$
              – Alex Cannon
              15 hours ago















            $begingroup$
            Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
            $endgroup$
            – Isaac Lubow
            2 days ago




            $begingroup$
            Can this be done with 9VDC? I'm not familiar with the LM358 or the transistor in your diagram... any documentation would be appreciated!
            $endgroup$
            – Isaac Lubow
            2 days ago












            $begingroup$
            @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
            $endgroup$
            – Michael Karas
            2 days ago




            $begingroup$
            @IsaacLobow - No it cannot be done with 9V for nine LEDs. If each LED has a 2V forward voltage drop then nine in a string has a totan
            $endgroup$
            – Michael Karas
            2 days ago












            $begingroup$
            Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
            $endgroup$
            – Michael Karas
            2 days ago




            $begingroup$
            Drop of 18V. The bottom current sink itself requires a few volts as well. 9V may work for three red LEDs
            $endgroup$
            – Michael Karas
            2 days ago












            $begingroup$
            Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
            $endgroup$
            – Isaac Lubow
            yesterday




            $begingroup$
            Is there a converter module I can get that will turn 9VDC into the constant current I'd need at the voltage I'd need?
            $endgroup$
            – Isaac Lubow
            yesterday




            1




            1




            $begingroup$
            A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
            $endgroup$
            – Alex Cannon
            15 hours ago




            $begingroup$
            A constant current boost or buck supply could be used to keep the circuit operating efficiently regardless of how many LEDs are turned on.
            $endgroup$
            – Alex Cannon
            15 hours ago











            12












            $begingroup$

            Oldfart and Mattman944 give very similar answers involving complex diode networks. If brightness variation is acceptable a simple diode ladder is sufficient. Red LED's typically have 2V voltage drop and diodes typically have 0.6V voltage drop, so the combined effect of the diode voltage drops in a ladder is can be significant.



            With a 9V battery and the switch in position 9, the current limiting resistor for LED 9 will see 9-2=7V and the current limiting resistor for LED 1 will see 9-2-(0.6*8)=2.2V, which will lead to a more than threefold difference in current through the LEDs if the current limiting resistors are of the same value.
            enter image description here



            If you insist on equal brightness it would be necessary to include all the diodes recommended by Oldfart and Mattman944, but with only a few extra diodes you can mitigate the variation in brightness to hopefully imperceptible levels. By adding three more diodes at the left as in the drawing above, we ensure that with the switch in position 9, LED 5 sees the same voltage as LED 8. The actual voltages across the current limiting resistors are as below. Note that an additional diode between LED's 5 and 2 (not considered in the table below) would improve the circuit further.



            LED Voltage across current limiting resistor
            9 7
            8 7-0.6 =6.4
            7 7-0.6*2 =5.8
            6 7-0.6*3 =5.2
            5 7-0.6 =6.4
            4 7-0.6*2 =5.8
            3 7-0.6*3 =5.2
            2 7-0.6*4 =4.6
            1 7-0.6*5 =4


            Another way of balancing the brightnesses is to install diodes in the lines to some LED's to deliberately increase the voltage drop. In the drawing above an additional diode is inserted into the line from switch contact 1 to LED 1, so that LED 1 sees the same voltage regardless of whether the switch is in position 1 or 2. The current limiting resistor for LED 1 can then be a smaller value than the others in order to balance the brightness of this LED with the others.



            These are just ideas - for this type of project the best balance of even brightness versus complexity may be best found by experimentation.






            share|improve this answer









            $endgroup$












            • $begingroup$
              This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
              $endgroup$
              – Level River St
              yesterday







            • 1




              $begingroup$
              Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
              $endgroup$
              – Harper
              11 hours ago










            • $begingroup$
              @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
              $endgroup$
              – Level River St
              10 hours ago











            • $begingroup$
              You can use the same value diodes for everything, if you're not a huge fan of math...
              $endgroup$
              – Isaac Lubow
              10 hours ago















            12












            $begingroup$

            Oldfart and Mattman944 give very similar answers involving complex diode networks. If brightness variation is acceptable a simple diode ladder is sufficient. Red LED's typically have 2V voltage drop and diodes typically have 0.6V voltage drop, so the combined effect of the diode voltage drops in a ladder is can be significant.



            With a 9V battery and the switch in position 9, the current limiting resistor for LED 9 will see 9-2=7V and the current limiting resistor for LED 1 will see 9-2-(0.6*8)=2.2V, which will lead to a more than threefold difference in current through the LEDs if the current limiting resistors are of the same value.
            enter image description here



            If you insist on equal brightness it would be necessary to include all the diodes recommended by Oldfart and Mattman944, but with only a few extra diodes you can mitigate the variation in brightness to hopefully imperceptible levels. By adding three more diodes at the left as in the drawing above, we ensure that with the switch in position 9, LED 5 sees the same voltage as LED 8. The actual voltages across the current limiting resistors are as below. Note that an additional diode between LED's 5 and 2 (not considered in the table below) would improve the circuit further.



            LED Voltage across current limiting resistor
            9 7
            8 7-0.6 =6.4
            7 7-0.6*2 =5.8
            6 7-0.6*3 =5.2
            5 7-0.6 =6.4
            4 7-0.6*2 =5.8
            3 7-0.6*3 =5.2
            2 7-0.6*4 =4.6
            1 7-0.6*5 =4


            Another way of balancing the brightnesses is to install diodes in the lines to some LED's to deliberately increase the voltage drop. In the drawing above an additional diode is inserted into the line from switch contact 1 to LED 1, so that LED 1 sees the same voltage regardless of whether the switch is in position 1 or 2. The current limiting resistor for LED 1 can then be a smaller value than the others in order to balance the brightness of this LED with the others.



            These are just ideas - for this type of project the best balance of even brightness versus complexity may be best found by experimentation.






            share|improve this answer









            $endgroup$












            • $begingroup$
              This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
              $endgroup$
              – Level River St
              yesterday







            • 1




              $begingroup$
              Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
              $endgroup$
              – Harper
              11 hours ago










            • $begingroup$
              @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
              $endgroup$
              – Level River St
              10 hours ago











            • $begingroup$
              You can use the same value diodes for everything, if you're not a huge fan of math...
              $endgroup$
              – Isaac Lubow
              10 hours ago













            12












            12








            12





            $begingroup$

            Oldfart and Mattman944 give very similar answers involving complex diode networks. If brightness variation is acceptable a simple diode ladder is sufficient. Red LED's typically have 2V voltage drop and diodes typically have 0.6V voltage drop, so the combined effect of the diode voltage drops in a ladder is can be significant.



            With a 9V battery and the switch in position 9, the current limiting resistor for LED 9 will see 9-2=7V and the current limiting resistor for LED 1 will see 9-2-(0.6*8)=2.2V, which will lead to a more than threefold difference in current through the LEDs if the current limiting resistors are of the same value.
            enter image description here



            If you insist on equal brightness it would be necessary to include all the diodes recommended by Oldfart and Mattman944, but with only a few extra diodes you can mitigate the variation in brightness to hopefully imperceptible levels. By adding three more diodes at the left as in the drawing above, we ensure that with the switch in position 9, LED 5 sees the same voltage as LED 8. The actual voltages across the current limiting resistors are as below. Note that an additional diode between LED's 5 and 2 (not considered in the table below) would improve the circuit further.



            LED Voltage across current limiting resistor
            9 7
            8 7-0.6 =6.4
            7 7-0.6*2 =5.8
            6 7-0.6*3 =5.2
            5 7-0.6 =6.4
            4 7-0.6*2 =5.8
            3 7-0.6*3 =5.2
            2 7-0.6*4 =4.6
            1 7-0.6*5 =4


            Another way of balancing the brightnesses is to install diodes in the lines to some LED's to deliberately increase the voltage drop. In the drawing above an additional diode is inserted into the line from switch contact 1 to LED 1, so that LED 1 sees the same voltage regardless of whether the switch is in position 1 or 2. The current limiting resistor for LED 1 can then be a smaller value than the others in order to balance the brightness of this LED with the others.



            These are just ideas - for this type of project the best balance of even brightness versus complexity may be best found by experimentation.






            share|improve this answer









            $endgroup$



            Oldfart and Mattman944 give very similar answers involving complex diode networks. If brightness variation is acceptable a simple diode ladder is sufficient. Red LED's typically have 2V voltage drop and diodes typically have 0.6V voltage drop, so the combined effect of the diode voltage drops in a ladder is can be significant.



            With a 9V battery and the switch in position 9, the current limiting resistor for LED 9 will see 9-2=7V and the current limiting resistor for LED 1 will see 9-2-(0.6*8)=2.2V, which will lead to a more than threefold difference in current through the LEDs if the current limiting resistors are of the same value.
            enter image description here



            If you insist on equal brightness it would be necessary to include all the diodes recommended by Oldfart and Mattman944, but with only a few extra diodes you can mitigate the variation in brightness to hopefully imperceptible levels. By adding three more diodes at the left as in the drawing above, we ensure that with the switch in position 9, LED 5 sees the same voltage as LED 8. The actual voltages across the current limiting resistors are as below. Note that an additional diode between LED's 5 and 2 (not considered in the table below) would improve the circuit further.



            LED Voltage across current limiting resistor
            9 7
            8 7-0.6 =6.4
            7 7-0.6*2 =5.8
            6 7-0.6*3 =5.2
            5 7-0.6 =6.4
            4 7-0.6*2 =5.8
            3 7-0.6*3 =5.2
            2 7-0.6*4 =4.6
            1 7-0.6*5 =4


            Another way of balancing the brightnesses is to install diodes in the lines to some LED's to deliberately increase the voltage drop. In the drawing above an additional diode is inserted into the line from switch contact 1 to LED 1, so that LED 1 sees the same voltage regardless of whether the switch is in position 1 or 2. The current limiting resistor for LED 1 can then be a smaller value than the others in order to balance the brightness of this LED with the others.



            These are just ideas - for this type of project the best balance of even brightness versus complexity may be best found by experimentation.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 2 days ago









            Level River StLevel River St

            608310




            608310











            • $begingroup$
              This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
              $endgroup$
              – Level River St
              yesterday







            • 1




              $begingroup$
              Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
              $endgroup$
              – Harper
              11 hours ago










            • $begingroup$
              @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
              $endgroup$
              – Level River St
              10 hours ago











            • $begingroup$
              You can use the same value diodes for everything, if you're not a huge fan of math...
              $endgroup$
              – Isaac Lubow
              10 hours ago
















            • $begingroup$
              This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
              $endgroup$
              – Isaac Lubow
              yesterday






            • 1




              $begingroup$
              @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
              $endgroup$
              – Level River St
              yesterday







            • 1




              $begingroup$
              Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
              $endgroup$
              – Harper
              11 hours ago










            • $begingroup$
              @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
              $endgroup$
              – Level River St
              10 hours ago











            • $begingroup$
              You can use the same value diodes for everything, if you're not a huge fan of math...
              $endgroup$
              – Isaac Lubow
              10 hours ago















            $begingroup$
            This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
            $endgroup$
            – Isaac Lubow
            yesterday




            $begingroup$
            This is brilliant, thanks! I don't mind a slight variation in brightness between switch positions, and I don't mind running the LEDs at maybe half-power either - they're VERY bright.
            $endgroup$
            – Isaac Lubow
            yesterday




            1




            1




            $begingroup$
            @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
            $endgroup$
            – Level River St
            yesterday





            $begingroup$
            @IsaacLubow no problem! A couple more tips: get schottky diodes if you can get them at a reasonable price, they have lower voltage drop. And don't get the smallest diodes you can find. uk.rs-online.com/web/p/rectifier-diodes-schottky-diodes/6527359 is an example. Yes, this is a 1 Amp diode! Note that it has a typical voltage drop a little over 0.3V at 0.1A but about 0.5V at its rated current of 1A. Max voltage drop at 0.1A is 0.55V. Voltage drop for a non schottky diode of the same current rating could be double these values. Always read the datasheet.
            $endgroup$
            – Level River St
            yesterday





            1




            1




            $begingroup$
            Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
            $endgroup$
            – Harper
            11 hours ago




            $begingroup$
            Why use extra diodes to mitigate the brightness variation? Why not do it in the resistors?
            $endgroup$
            – Harper
            11 hours ago












            $begingroup$
            @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
            $endgroup$
            – Level River St
            10 hours ago





            $begingroup$
            @Harper The price of a diode is a couple of cents more than a resistor so there would be a very small amount of money to be saved if resistors were used instead. It may be possible to do with resistors, but it would require a detailed balancing calculation over the 9 possible switch positions, plus obtaining resistors of different values, rather than grabbing a bunch of identical resistors that are to hand and about the right value. The time and effort would cost more than the savings in parts on a one off project like this.
            $endgroup$
            – Level River St
            10 hours ago













            $begingroup$
            You can use the same value diodes for everything, if you're not a huge fan of math...
            $endgroup$
            – Isaac Lubow
            10 hours ago




            $begingroup$
            You can use the same value diodes for everything, if you're not a huge fan of math...
            $endgroup$
            – Isaac Lubow
            10 hours ago











            7












            $begingroup$

            Here is a low tech solution that requires a lot of parts. Only 4 positions shown, you need 45 diodes for 9 positions.



            Sunyskyguy has a clever solution if you have a high voltage available.



            enter image description here






            share|improve this answer









            $endgroup$












            • $begingroup$
              Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
              $endgroup$
              – Bob Jacobsen
              Apr 23 at 3:22










            • $begingroup$
              You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
              $endgroup$
              – Mattman944
              2 days ago










            • $begingroup$
              Only answer that actually answers the question so far.
              $endgroup$
              – abligh
              2 days ago















            7












            $begingroup$

            Here is a low tech solution that requires a lot of parts. Only 4 positions shown, you need 45 diodes for 9 positions.



            Sunyskyguy has a clever solution if you have a high voltage available.



            enter image description here






            share|improve this answer









            $endgroup$












            • $begingroup$
              Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
              $endgroup$
              – Bob Jacobsen
              Apr 23 at 3:22










            • $begingroup$
              You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
              $endgroup$
              – Mattman944
              2 days ago










            • $begingroup$
              Only answer that actually answers the question so far.
              $endgroup$
              – abligh
              2 days ago













            7












            7








            7





            $begingroup$

            Here is a low tech solution that requires a lot of parts. Only 4 positions shown, you need 45 diodes for 9 positions.



            Sunyskyguy has a clever solution if you have a high voltage available.



            enter image description here






            share|improve this answer









            $endgroup$



            Here is a low tech solution that requires a lot of parts. Only 4 positions shown, you need 45 diodes for 9 positions.



            Sunyskyguy has a clever solution if you have a high voltage available.



            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 23 at 2:24









            Mattman944Mattman944

            3116




            3116











            • $begingroup$
              Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
              $endgroup$
              – Bob Jacobsen
              Apr 23 at 3:22










            • $begingroup$
              You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
              $endgroup$
              – Mattman944
              2 days ago










            • $begingroup$
              Only answer that actually answers the question so far.
              $endgroup$
              – abligh
              2 days ago
















            • $begingroup$
              Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
              $endgroup$
              – Bob Jacobsen
              Apr 23 at 3:22










            • $begingroup$
              You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
              $endgroup$
              – Mattman944
              2 days ago










            • $begingroup$
              Only answer that actually answers the question so far.
              $endgroup$
              – abligh
              2 days ago















            $begingroup$
            Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
            $endgroup$
            – Bob Jacobsen
            Apr 23 at 3:22




            $begingroup$
            Can you do that with fewer diodes if you bring each one in before (to left of$ the one above it?
            $endgroup$
            – Bob Jacobsen
            Apr 23 at 3:22












            $begingroup$
            You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
            $endgroup$
            – Mattman944
            2 days ago




            $begingroup$
            You can remove the horizontal diodes if a slight change in brightness it tolerable. At a high battery voltage (9V), it probably won't be noticeable.
            $endgroup$
            – Mattman944
            2 days ago












            $begingroup$
            Only answer that actually answers the question so far.
            $endgroup$
            – abligh
            2 days ago




            $begingroup$
            Only answer that actually answers the question so far.
            $endgroup$
            – abligh
            2 days ago











            5












            $begingroup$

            You can use a buffer per LED like this.



            diagram



            In this diagram, R1 through R3 are pullup resistors. Closing any of the
            switches will cause the buffer directly connected to it to go to 0,
            which turns low all the buffers below it. 4050 has 6 buffers. You will
            need 2 of them for 9 LEDs.



            This solution does only needs a voltage to power the 4050 (3V to 20V for
            CD4050B). You can chain up as many 4050s as you like.






            share|improve this answer








            New contributor




            kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






            $endgroup$

















              5












              $begingroup$

              You can use a buffer per LED like this.



              diagram



              In this diagram, R1 through R3 are pullup resistors. Closing any of the
              switches will cause the buffer directly connected to it to go to 0,
              which turns low all the buffers below it. 4050 has 6 buffers. You will
              need 2 of them for 9 LEDs.



              This solution does only needs a voltage to power the 4050 (3V to 20V for
              CD4050B). You can chain up as many 4050s as you like.






              share|improve this answer








              New contributor




              kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






              $endgroup$















                5












                5








                5





                $begingroup$

                You can use a buffer per LED like this.



                diagram



                In this diagram, R1 through R3 are pullup resistors. Closing any of the
                switches will cause the buffer directly connected to it to go to 0,
                which turns low all the buffers below it. 4050 has 6 buffers. You will
                need 2 of them for 9 LEDs.



                This solution does only needs a voltage to power the 4050 (3V to 20V for
                CD4050B). You can chain up as many 4050s as you like.






                share|improve this answer








                New contributor




                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                $endgroup$



                You can use a buffer per LED like this.



                diagram



                In this diagram, R1 through R3 are pullup resistors. Closing any of the
                switches will cause the buffer directly connected to it to go to 0,
                which turns low all the buffers below it. 4050 has 6 buffers. You will
                need 2 of them for 9 LEDs.



                This solution does only needs a voltage to power the 4050 (3V to 20V for
                CD4050B). You can chain up as many 4050s as you like.







                share|improve this answer








                New contributor




                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 19 hours ago









                kbrgrty3kbrgrty3

                511




                511




                New contributor




                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                kbrgrty3 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





















                    4












                    $begingroup$

                    If you can afford another 0.5V drop you can use a massive array of diodes. Here is an example with three LEDS which requires 6 diodes.

                    (Sorry for the SW, SW2.., circuit lab does not have a rotatory switch symbol)





                    schematic





                    simulate this circuit – Schematic created using CircuitLab






                    share|improve this answer









                    $endgroup$

















                      4












                      $begingroup$

                      If you can afford another 0.5V drop you can use a massive array of diodes. Here is an example with three LEDS which requires 6 diodes.

                      (Sorry for the SW, SW2.., circuit lab does not have a rotatory switch symbol)





                      schematic





                      simulate this circuit – Schematic created using CircuitLab






                      share|improve this answer









                      $endgroup$















                        4












                        4








                        4





                        $begingroup$

                        If you can afford another 0.5V drop you can use a massive array of diodes. Here is an example with three LEDS which requires 6 diodes.

                        (Sorry for the SW, SW2.., circuit lab does not have a rotatory switch symbol)





                        schematic





                        simulate this circuit – Schematic created using CircuitLab






                        share|improve this answer









                        $endgroup$



                        If you can afford another 0.5V drop you can use a massive array of diodes. Here is an example with three LEDS which requires 6 diodes.

                        (Sorry for the SW, SW2.., circuit lab does not have a rotatory switch symbol)





                        schematic





                        simulate this circuit – Schematic created using CircuitLab







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Apr 23 at 2:25









                        OldfartOldfart

                        8,9662927




                        8,9662927





















                            4












                            $begingroup$

                            It might seem like overkill but it would be fewer parts, and possibly less expensive, than some other solutions to use a micro-controller. Many Ardunio boards have over 9 digital output pins - you could drive one LED with each of nine pins. By having the switch pick different points of a voltage divider and feeding it to one analog pin, you could determine the switch position and light up what ever you have decided should be lit up.






                            share|improve this answer









                            $endgroup$












                            • $begingroup$
                              I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                              $endgroup$
                              – Isaac Lubow
                              2 days ago






                            • 1




                              $begingroup$
                              Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                              $endgroup$
                              – Solomon Slow
                              2 days ago






                            • 1




                              $begingroup$
                              The switch is what inspired the project, so, not this time!
                              $endgroup$
                              – Isaac Lubow
                              2 days ago










                            • $begingroup$
                              or use an LM3918 and a resistor chain on the switch
                              $endgroup$
                              – Jasen
                              2 days ago










                            • $begingroup$
                              An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                              $endgroup$
                              – Diego C Nascimento
                              yesterday















                            4












                            $begingroup$

                            It might seem like overkill but it would be fewer parts, and possibly less expensive, than some other solutions to use a micro-controller. Many Ardunio boards have over 9 digital output pins - you could drive one LED with each of nine pins. By having the switch pick different points of a voltage divider and feeding it to one analog pin, you could determine the switch position and light up what ever you have decided should be lit up.






                            share|improve this answer









                            $endgroup$












                            • $begingroup$
                              I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                              $endgroup$
                              – Isaac Lubow
                              2 days ago






                            • 1




                              $begingroup$
                              Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                              $endgroup$
                              – Solomon Slow
                              2 days ago






                            • 1




                              $begingroup$
                              The switch is what inspired the project, so, not this time!
                              $endgroup$
                              – Isaac Lubow
                              2 days ago










                            • $begingroup$
                              or use an LM3918 and a resistor chain on the switch
                              $endgroup$
                              – Jasen
                              2 days ago










                            • $begingroup$
                              An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                              $endgroup$
                              – Diego C Nascimento
                              yesterday













                            4












                            4








                            4





                            $begingroup$

                            It might seem like overkill but it would be fewer parts, and possibly less expensive, than some other solutions to use a micro-controller. Many Ardunio boards have over 9 digital output pins - you could drive one LED with each of nine pins. By having the switch pick different points of a voltage divider and feeding it to one analog pin, you could determine the switch position and light up what ever you have decided should be lit up.






                            share|improve this answer









                            $endgroup$



                            It might seem like overkill but it would be fewer parts, and possibly less expensive, than some other solutions to use a micro-controller. Many Ardunio boards have over 9 digital output pins - you could drive one LED with each of nine pins. By having the switch pick different points of a voltage divider and feeding it to one analog pin, you could determine the switch position and light up what ever you have decided should be lit up.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Apr 23 at 4:55









                            George WhiteGeorge White

                            39527




                            39527











                            • $begingroup$
                              I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                              $endgroup$
                              – Isaac Lubow
                              2 days ago






                            • 1




                              $begingroup$
                              Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                              $endgroup$
                              – Solomon Slow
                              2 days ago






                            • 1




                              $begingroup$
                              The switch is what inspired the project, so, not this time!
                              $endgroup$
                              – Isaac Lubow
                              2 days ago










                            • $begingroup$
                              or use an LM3918 and a resistor chain on the switch
                              $endgroup$
                              – Jasen
                              2 days ago










                            • $begingroup$
                              An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                              $endgroup$
                              – Diego C Nascimento
                              yesterday
















                            • $begingroup$
                              I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                              $endgroup$
                              – Isaac Lubow
                              2 days ago






                            • 1




                              $begingroup$
                              Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                              $endgroup$
                              – Solomon Slow
                              2 days ago






                            • 1




                              $begingroup$
                              The switch is what inspired the project, so, not this time!
                              $endgroup$
                              – Isaac Lubow
                              2 days ago










                            • $begingroup$
                              or use an LM3918 and a resistor chain on the switch
                              $endgroup$
                              – Jasen
                              2 days ago










                            • $begingroup$
                              An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                              $endgroup$
                              – Diego C Nascimento
                              yesterday















                            $begingroup$
                            I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                            $endgroup$
                            – Isaac Lubow
                            2 days ago




                            $begingroup$
                            I was thinking of using a voltage regulator like they explain here - allaboutcircuits.com/technical-articles/… and then wiring the lights in series - seems like a good compromise.
                            $endgroup$
                            – Isaac Lubow
                            2 days ago




                            1




                            1




                            $begingroup$
                            Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                            $endgroup$
                            – Solomon Slow
                            2 days ago




                            $begingroup$
                            Follow-through: Dump the 9-position switch, and use a rotary encoder instead.
                            $endgroup$
                            – Solomon Slow
                            2 days ago




                            1




                            1




                            $begingroup$
                            The switch is what inspired the project, so, not this time!
                            $endgroup$
                            – Isaac Lubow
                            2 days ago




                            $begingroup$
                            The switch is what inspired the project, so, not this time!
                            $endgroup$
                            – Isaac Lubow
                            2 days ago












                            $begingroup$
                            or use an LM3918 and a resistor chain on the switch
                            $endgroup$
                            – Jasen
                            2 days ago




                            $begingroup$
                            or use an LM3918 and a resistor chain on the switch
                            $endgroup$
                            – Jasen
                            2 days ago












                            $begingroup$
                            An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                            $endgroup$
                            – Diego C Nascimento
                            yesterday




                            $begingroup$
                            An ATMega to this? And still using the switch? Overkill is a joke. There's simple IC to that.
                            $endgroup$
                            – Diego C Nascimento
                            yesterday











                            2












                            $begingroup$

                            I wouldn't suggest this unless you're eager to climb the learning curve for FPGAs (including buying a programming pod and dealing with a SMT part with lots of pins), but you could use a Lattice LCMXO2 series with internal flash and oscillator. Circuit would look like this (plus some power supply connections, a programming connector and bypass caps):





                            schematic





                            simulate this circuit – Schematic created using CircuitLab



                            The programming software (Lattice Diamond) supports VHDL and Verilog.



                            If you're feeling lucky you could set the outputs to minimum current drive and omit the resistors.






                            share|improve this answer









                            $endgroup$

















                              2












                              $begingroup$

                              I wouldn't suggest this unless you're eager to climb the learning curve for FPGAs (including buying a programming pod and dealing with a SMT part with lots of pins), but you could use a Lattice LCMXO2 series with internal flash and oscillator. Circuit would look like this (plus some power supply connections, a programming connector and bypass caps):





                              schematic





                              simulate this circuit – Schematic created using CircuitLab



                              The programming software (Lattice Diamond) supports VHDL and Verilog.



                              If you're feeling lucky you could set the outputs to minimum current drive and omit the resistors.






                              share|improve this answer









                              $endgroup$















                                2












                                2








                                2





                                $begingroup$

                                I wouldn't suggest this unless you're eager to climb the learning curve for FPGAs (including buying a programming pod and dealing with a SMT part with lots of pins), but you could use a Lattice LCMXO2 series with internal flash and oscillator. Circuit would look like this (plus some power supply connections, a programming connector and bypass caps):





                                schematic





                                simulate this circuit – Schematic created using CircuitLab



                                The programming software (Lattice Diamond) supports VHDL and Verilog.



                                If you're feeling lucky you could set the outputs to minimum current drive and omit the resistors.






                                share|improve this answer









                                $endgroup$



                                I wouldn't suggest this unless you're eager to climb the learning curve for FPGAs (including buying a programming pod and dealing with a SMT part with lots of pins), but you could use a Lattice LCMXO2 series with internal flash and oscillator. Circuit would look like this (plus some power supply connections, a programming connector and bypass caps):





                                schematic





                                simulate this circuit – Schematic created using CircuitLab



                                The programming software (Lattice Diamond) supports VHDL and Verilog.



                                If you're feeling lucky you could set the outputs to minimum current drive and omit the resistors.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered yesterday









                                Spehro PefhanySpehro Pefhany

                                215k5164439




                                215k5164439





















                                    1












                                    $begingroup$

                                    An alternative approach is to use a LM3914 to drive the LEDs, with an external 10-resistor ladder powered from the reference voltage. Then the rotary switch simply selects a voltage from the ladder which will light the required number of LEDs.



                                    This is just an outline; for example, the topmost resistor of the ladder would be selected to set the step voltages within the tolerance (which in my experience is pretty tight) of the LM3914 comparators.



                                    In addition, the whole thing will run off 3.3V supply






                                    share|improve this answer











                                    $endgroup$

















                                      1












                                      $begingroup$

                                      An alternative approach is to use a LM3914 to drive the LEDs, with an external 10-resistor ladder powered from the reference voltage. Then the rotary switch simply selects a voltage from the ladder which will light the required number of LEDs.



                                      This is just an outline; for example, the topmost resistor of the ladder would be selected to set the step voltages within the tolerance (which in my experience is pretty tight) of the LM3914 comparators.



                                      In addition, the whole thing will run off 3.3V supply






                                      share|improve this answer











                                      $endgroup$















                                        1












                                        1








                                        1





                                        $begingroup$

                                        An alternative approach is to use a LM3914 to drive the LEDs, with an external 10-resistor ladder powered from the reference voltage. Then the rotary switch simply selects a voltage from the ladder which will light the required number of LEDs.



                                        This is just an outline; for example, the topmost resistor of the ladder would be selected to set the step voltages within the tolerance (which in my experience is pretty tight) of the LM3914 comparators.



                                        In addition, the whole thing will run off 3.3V supply






                                        share|improve this answer











                                        $endgroup$



                                        An alternative approach is to use a LM3914 to drive the LEDs, with an external 10-resistor ladder powered from the reference voltage. Then the rotary switch simply selects a voltage from the ladder which will light the required number of LEDs.



                                        This is just an outline; for example, the topmost resistor of the ladder would be selected to set the step voltages within the tolerance (which in my experience is pretty tight) of the LM3914 comparators.



                                        In addition, the whole thing will run off 3.3V supply







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited 17 hours ago

























                                        answered 20 hours ago









                                        henroshenros

                                        53535




                                        53535





















                                            1












                                            $begingroup$

                                            Similar to the micro controller method, another way is to use a OP amp ICs. The positive inputs are all connected together and they connect to a potentiometer that produces varying voltage, instead of a switch. The negative connections connect to a series of resistors to give each one a different Voltage. As the knob is turned, the lights turn on one by one.



                                            This type of circuit is used in power inverters that have those 10 segment LED strips to tell you how many Amps the inverter is putting out. I believe they have all the OP amps in one IC.



                                            I know it's not an exact answer to the question since it doesn't use a switch, but it likely accomplishes what you want.



                                            Edit 2: It's still possible to use a normal switch that connects only one contact at a time. Connect all the negative OP amp inputs to a low Voltage like 1V. Then connect each switch output to each op amp Positive input. Put a large resistor like 100k on the switch input and connect that to the positive power supply. It needs to be a big resistor to not let enough current through to make the LED above turn on noticeably, since the positive inputs will be connected to an LED anode from another OP amp. Now when you turn the switch, one LED will come on at a time. To make all the LEDs next to it come on too, just connect the output of each OP amp to the positive input of the one under it. The forward voltage drop of the LEDs will much too high compared to the 1V reference Voltage to take enough Voltage away from the positive input of the OP amp under it, so the LED won't prevent the OP amp from turning on, but other non LED loads might. This assumes that the OP amps are the current source only type. Current source and sink op Amps can't be used since it will prevent the positive input of the other op amp from going high. Many OP amps are current sink only, so in that case the LEDs would have to be arranged with the cathodes connecting to the OP amp inputs, and the rest of the circuit switched around. Don't forget to use pull up or pull down resistors for the OP amp inputs that are connected to the switch. The same resistor value that was used to connect the switch to the positive Voltage supply should be fine. I hope that's not too confusing.



                                            Edit 3: It looks like someone else posted a similar but simpler solution using buffer ICs instead of OP amps.






                                            share|improve this answer











                                            $endgroup$

















                                              1












                                              $begingroup$

                                              Similar to the micro controller method, another way is to use a OP amp ICs. The positive inputs are all connected together and they connect to a potentiometer that produces varying voltage, instead of a switch. The negative connections connect to a series of resistors to give each one a different Voltage. As the knob is turned, the lights turn on one by one.



                                              This type of circuit is used in power inverters that have those 10 segment LED strips to tell you how many Amps the inverter is putting out. I believe they have all the OP amps in one IC.



                                              I know it's not an exact answer to the question since it doesn't use a switch, but it likely accomplishes what you want.



                                              Edit 2: It's still possible to use a normal switch that connects only one contact at a time. Connect all the negative OP amp inputs to a low Voltage like 1V. Then connect each switch output to each op amp Positive input. Put a large resistor like 100k on the switch input and connect that to the positive power supply. It needs to be a big resistor to not let enough current through to make the LED above turn on noticeably, since the positive inputs will be connected to an LED anode from another OP amp. Now when you turn the switch, one LED will come on at a time. To make all the LEDs next to it come on too, just connect the output of each OP amp to the positive input of the one under it. The forward voltage drop of the LEDs will much too high compared to the 1V reference Voltage to take enough Voltage away from the positive input of the OP amp under it, so the LED won't prevent the OP amp from turning on, but other non LED loads might. This assumes that the OP amps are the current source only type. Current source and sink op Amps can't be used since it will prevent the positive input of the other op amp from going high. Many OP amps are current sink only, so in that case the LEDs would have to be arranged with the cathodes connecting to the OP amp inputs, and the rest of the circuit switched around. Don't forget to use pull up or pull down resistors for the OP amp inputs that are connected to the switch. The same resistor value that was used to connect the switch to the positive Voltage supply should be fine. I hope that's not too confusing.



                                              Edit 3: It looks like someone else posted a similar but simpler solution using buffer ICs instead of OP amps.






                                              share|improve this answer











                                              $endgroup$















                                                1












                                                1








                                                1





                                                $begingroup$

                                                Similar to the micro controller method, another way is to use a OP amp ICs. The positive inputs are all connected together and they connect to a potentiometer that produces varying voltage, instead of a switch. The negative connections connect to a series of resistors to give each one a different Voltage. As the knob is turned, the lights turn on one by one.



                                                This type of circuit is used in power inverters that have those 10 segment LED strips to tell you how many Amps the inverter is putting out. I believe they have all the OP amps in one IC.



                                                I know it's not an exact answer to the question since it doesn't use a switch, but it likely accomplishes what you want.



                                                Edit 2: It's still possible to use a normal switch that connects only one contact at a time. Connect all the negative OP amp inputs to a low Voltage like 1V. Then connect each switch output to each op amp Positive input. Put a large resistor like 100k on the switch input and connect that to the positive power supply. It needs to be a big resistor to not let enough current through to make the LED above turn on noticeably, since the positive inputs will be connected to an LED anode from another OP amp. Now when you turn the switch, one LED will come on at a time. To make all the LEDs next to it come on too, just connect the output of each OP amp to the positive input of the one under it. The forward voltage drop of the LEDs will much too high compared to the 1V reference Voltage to take enough Voltage away from the positive input of the OP amp under it, so the LED won't prevent the OP amp from turning on, but other non LED loads might. This assumes that the OP amps are the current source only type. Current source and sink op Amps can't be used since it will prevent the positive input of the other op amp from going high. Many OP amps are current sink only, so in that case the LEDs would have to be arranged with the cathodes connecting to the OP amp inputs, and the rest of the circuit switched around. Don't forget to use pull up or pull down resistors for the OP amp inputs that are connected to the switch. The same resistor value that was used to connect the switch to the positive Voltage supply should be fine. I hope that's not too confusing.



                                                Edit 3: It looks like someone else posted a similar but simpler solution using buffer ICs instead of OP amps.






                                                share|improve this answer











                                                $endgroup$



                                                Similar to the micro controller method, another way is to use a OP amp ICs. The positive inputs are all connected together and they connect to a potentiometer that produces varying voltage, instead of a switch. The negative connections connect to a series of resistors to give each one a different Voltage. As the knob is turned, the lights turn on one by one.



                                                This type of circuit is used in power inverters that have those 10 segment LED strips to tell you how many Amps the inverter is putting out. I believe they have all the OP amps in one IC.



                                                I know it's not an exact answer to the question since it doesn't use a switch, but it likely accomplishes what you want.



                                                Edit 2: It's still possible to use a normal switch that connects only one contact at a time. Connect all the negative OP amp inputs to a low Voltage like 1V. Then connect each switch output to each op amp Positive input. Put a large resistor like 100k on the switch input and connect that to the positive power supply. It needs to be a big resistor to not let enough current through to make the LED above turn on noticeably, since the positive inputs will be connected to an LED anode from another OP amp. Now when you turn the switch, one LED will come on at a time. To make all the LEDs next to it come on too, just connect the output of each OP amp to the positive input of the one under it. The forward voltage drop of the LEDs will much too high compared to the 1V reference Voltage to take enough Voltage away from the positive input of the OP amp under it, so the LED won't prevent the OP amp from turning on, but other non LED loads might. This assumes that the OP amps are the current source only type. Current source and sink op Amps can't be used since it will prevent the positive input of the other op amp from going high. Many OP amps are current sink only, so in that case the LEDs would have to be arranged with the cathodes connecting to the OP amp inputs, and the rest of the circuit switched around. Don't forget to use pull up or pull down resistors for the OP amp inputs that are connected to the switch. The same resistor value that was used to connect the switch to the positive Voltage supply should be fine. I hope that's not too confusing.



                                                Edit 3: It looks like someone else posted a similar but simpler solution using buffer ICs instead of OP amps.







                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited 15 hours ago

























                                                answered yesterday









                                                Alex CannonAlex Cannon

                                                1313




                                                1313















                                                    protected by W5VO 15 hours ago



                                                    Thank you for your interest in this question.
                                                    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                    Would you like to answer one of these unanswered questions instead?



                                                    Popular posts from this blog

                                                    How does Billy Russo acquire his 'Jigsaw' mask? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why does Bane wear the mask?Why does Kylo Ren wear a mask?Why did Captain America remove his mask while fighting Batroc the Leaper?How did the OA acquire her wisdom?Is Billy Breckenridge gay?How does Adrian Toomes hide his earnings from the IRS?What is the state of affairs on Nootka Sound by the end of season 1?How did Tia Dalma acquire Captain Barbossa's body?How is one “Deemed Worthy”, to acquire the Greatsword “Dawn”?How did Karen acquire the handgun?

                                                    Личност Атрибути на личността | Литература и източници | НавигацияРаждането на личносттаредактиратередактирате

                                                    A sequel to Domino's tragic life Why Christmas is for Friends Cold comfort at Charles' padSad farewell for Lady JanePS Most watched News videos