Here is basic solution using Nano
The code looks lengthy buts is mostly two duplicate routines, to inc a number used to set PWM duty
cycle to ramp up, the other routine to decrement it for ramp down.
A/D is used to sense power supply, and a bulk cap would keep processor running long enough to do the ramp
down before it stops running.
Zip file is board video running a loop ramping up and then down. It has a nice clean linear ramp. Note
human eye is actually log to brightness, so maybe with some effort the discrete version you are working
on will work out. Core of that is a bulk cap that has to supply LED current, and I would think since your
drive is a RC exponential that you would want to build a V controlled current source for the LEDs. That
way the LED driver will be feed an exponential, and the linear current source transforms that exponential
V to an exponential current maintaining the exponential behavior. By using a current source you could also
series the 6 LEDs, but need a higher V to do the design for a supply. 9V batter may not be enough.
Regards, Dana.