Adjusting different LEDS brightness using DIP switch and a 1 potentiometer

Thread Starter

jordansmith456

Joined Aug 7, 2018
2
Hi All.

Wondering if someone might be able to help me. i would like to adjust 4 different LED'S brightness with one potentiometer. Each LED will be connected to a leg of a 4 pin DIP switch with the other legs of the switch connected to the pot. Now if was to turn all switches off apart from one and set the brightness then turn it off and adjust another one, the original light wont be at the same brightness as how i left it. Is there a way in which i could set the brightness on the first one then turn the switch off, turn another switch on and set the brightness on that one and then go back to the first one and the brightness is still at the same level in which i set it?

Also would it be possible to have all the LED's still on and just use the DIP switches to select which LED i am turning the brightness down on.

I apologize if this doesn't make to much sense this is the first time i have used this site.

Jordan
 

panic mode

Joined Oct 10, 2011
2,750
no potentiometer is only part of the circuit when it is switched on.
when your turn switch off, potentiometer is no longer part of the circuit and LED will go off.
to do this you would need separate potentiometer for each LED.
and if you do want to use just one pot to control brightness of each LED individually, additional circuitry is needed.
 

Thread Starter

jordansmith456

Joined Aug 7, 2018
2
no potentiometer is only part of the circuit when it is switched on.
when your turn switch off, potentiometer is no longer part of the circuit and LED will go off.
to do this you would need separate potentiometer for each LED.
and if you do want to use just one pot to control brightness of each LED individually, additional circuitry is needed.
Thankyou for your response what additional circuitry would be needed?
 

panic mode

Joined Oct 10, 2011
2,750
it would need some sort of memory and circuit cannot be broken when you switch to another LED.

you could use microcontroller for example and control brightness of each LED individually using PWM.
dipswitches and potentiometer would need to be wired to same mincrocontroller as well but as inputs.

DigiSpark comes to mind...
 

danadak

Joined Mar 10, 2018
4,057
One approach.

SAR digitizes POT and code converts that to duty cycle setting for PWM.

Switch, first press selects next LED, second press writes duty cycle value
from SAR into PWM to change its brightness.

upload_2018-8-7_15-52-18.png

This is single chip solution, could be done with this $4 board (and a small
amount of code) -



Could be done with even simpler solution in the PSOC using a single counter, the
SAR and some code, with a loop that keeps comparing LED brightness setting to
specific LED and alters pin state when its count reached. Another form of PWM. I
just got lazy. This approach could possibly be done with ATTINY85 and some simple
code. Possibly using BASCOM Basic Interpreter, have to benchmark it.

https://www.mcselec.com/

Regards, Dana.
 
Last edited:
Top