Pwm lighting project possible?

Hi all,

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.

Any thoughts would be appreciated.

Cheers

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.

https://playground.arduino.cc/Learning/LEDSensor

I want to be able to select the brightness then return to the same level after power off

Hi If you use a potentiometer to set your brightness, it will not change from one day to the next. Use a locking shaft pot.

https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dindustrial&field-keywords=locking+shaft+potentiometer&rh=n%3A16310091%2Ck%3Alocking+shaft+potentiometer

Tom... :)

30 potentiometers is ridiculous. Forget it I will work it out

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... :)

I posted a possible alternative. The easiest most direct solution had already been presented.

Work it out hopefully includes working out what EEPROM is.