While working on an other project that I need to think about, I would like to solve an issue I have been thinking about for a long time.
I know how to blink / dim a led
I know how to measure voltage
I know how to use a 595.
I know how to control/dim 3 leds according to voltage.
I know how to map values to %
Where I am absolutely stuck at is controlling (example) 10 Led's burning/fading according to a voltage or analog value without using 10 pins.
Maybe I should do this the "old" electronic way but because the values are sent by 433, I cant.
Situation: 1 arduino with a battery, 1 arduino with leds that need to show the condition of that battery with about 10 leds.
The same could be used for Db levels or something.
So:
100% battery, 10 Leds
95% battery, 9 full leds 1 at 50%
90% battery 9 full leds 1 o%
and so on.
What do I need, apart from code, to get this done. Again, without having to use 10 pins?
Options:
1)
Maybe an addressable led strip (WS2812B)? They exist as a strip with 8, else cut a longer strip to size.
2)
Alternatively you might be able to use multiplexing but I'm not sure about the dimming.
3)
And there are I2C breakout boards with 12 (or was it 16?) PWM channels.
100% battery, 10 Leds
95% battery, 9 full leds 1 at 50%
90% battery 9 full leds 1 o%
and so on.
...
Sareno:
The 595 is a shift register but I cant find a way to dim with it, unless I dim all the leds at once.
Is there another shift register that can pull it off?
assuming your 100% and 50% are your ONLY 2 dimming levels and you are still using shift registers, you could used 2 register ouputs per LED.
Each output goes through a resistor so that if both outputs to the ON the LED with be at 100% and if only one is ON, then the LED will be at 50%.