I am looking at contrlling some 100mA 5v LEDs via pwm. Its pretty simple to do so through a transistor circuit and external power source.
My question is what would be the best way to get up to 34 individually contrlled pwm outputs. Also is it possible for the arduino to remember the light level and automatically output the same pwm signal after an over night powerdown?
Its for display cabinet lighting really dont want to have to reset the light levels every morning as lights are off at night.
My first thought was an lcd to display light level and led number. A button to cycle through leds and another to increase brightness. I may also put constant power on to it and incorporate an RTC and use a timer on/off bit of code instead of power down at night.
Might be easier to use two (or more) addressable (white or RGB) LEDs per cabinet/section.
A small Arduino, e.g. a Nano, could drive that.
The off button could be a "write to EEPROM before powering down" button.
Or just start up with default brightness levels.
Replace the Nano for a Wemos or NodeMCU, and you can have it all automated and/or WiFi controlled.
Leo..
You could use a light sensor to read the light falling on the leds and adjust brightnesses accordingly,
even use a led as the sensor for short periods and lit the rest of the time.
What was wrong with what Wawa gave you about saving settings to EEPROM in reply #1?
Arduino Uno, Nano, and Minis all have 1024 bytes of EEPROM good for at least 100,000 writes.
How many times a day on average will your project save settings?
GoForSmoke:
What was wrong with what Wawa gave you about saving settings to EEPROM in reply #1?
Arduino Uno, Nano, and Minis all have 1024 bytes of EEPROM good for at least 100,000 writes.
How many times a day on average will your project save settings?
I agree, have a "SAVE" button and you won't need to program a power shut down sequence.
Sorry did not see the reference to 34 LEDs
Tom...