How can I wire a 9-position switch so that each position turns on one more LED than the one before?
Using a regulated current source to light them, wire the LEDs in series and short out the segment which you want to be dark.
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:
- Remove the potentiometer and both large capacitors
- Connect one of the salvaged capacitors between +in and +out (positive to +in), and fit a 1uF ceramic capacitor where the output capacitor was.
- 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.
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.
simulate this circuit
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.
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.