Page 1 of 1

Shift Register + Potentiometer

Posted: Fri Nov 23, 2018 2:44 am
by mda_dave
I am using Arduino UNO as my microcontroller and my goal is simply to control 7 individual LEDs and their brightness altogether. I intend to keep using Arduino UNO and not upgrade to Arduino MEGA or something. Arduino UNO only has 6 PWM pins, so I am short one PWM pin, that is why I am trying to use the shift register.
It seems to me that it can help me to control the LEDs, but I do not see how I can control the brightness combined with the shift register.

Is it just not possible? or
Any suggestions for other methods or components to try?

Thank you.

Re: Shift Register + Potentiometer

Posted: Fri Nov 23, 2018 11:31 am
by darrellg
The shift register is probably not going to work the way you want it to. You could use something like https://www.sparkfun.com/products/10615.

Re: Shift Register + Potentiometer

Posted: Sat Nov 24, 2018 1:13 pm
by n1ist
To do it in hardware, I would follow darrellg's advice.

If the Arduino isn't busy doing too many other things, I would do the PWM in software; have the timer generate an interrupt that bumps a counter; at each tick, have it check the 7 PWM values and set the output pin corresponding to each one based on whether the counter is below or above that channel's PWM value. You may have to use register access rather than digital.write to get the speed you want.
/mike