I have a light box (wooden box with semi transparent image on glass and white led bank in background plus 1 blue led bulb in foreground.) I want to use a PIR sensor to activate a microcontroller with a program wich controls the leds
the blue led is just a single LED which turns on at about 2.5v and gets as bright as i want at 5v and about 15ma.
The background LEDS which are white (they are concealed in the box and I do not have any information about how they are arranged or what configuration they are in or even how many there are exactly. I only know that they come on at about 7v and around 12v they are about as bright as they get or I want. they draw about 1.5A fully on.
I have an arduino mega2560 which I would like to use to test the circuit and code but eventually want to put the code onto an ATTINY85 chip.
I want the program to work as follows
program boots up and waits for input from PIR sensor (HCSR501) then background lights fade on over a 3 second period, then remain fully on.
next the blue led fades on and off or possibly flickers, this LED is representing a glow bug or firefly. The light could just pulsate with 2 or 3 different patterns that repeat maybe.
after a total of 15 seconds the background lights fade out while the blue light continues to pulsate
5 seconds later the blue led fades out and the program waits for another trigger from the PIR sensor
obviously the microcontroller of the arduino or even the attiny85 cannot handle this on its own.
I found a BUZ91A N-channel mosfet that I think could be used to drive the background LEDs from a GPIO on the controller. I'm not sure if I was using a PWM signal from the controller through the mosfet if this could allow the fading that I'm looking for or not.
I believe that I can drive the single blue LED directly from the controller with some fancy programming to accomplish the pulsing effect I am looking for.
Also the PIR sensor I have seems to work best when it is powered by a 9vdc source rather than 5v so it would have to use a different power supply.
I am actually thinking that maybe I can put 2 9v batteries in parallel with each other as a main voltage source then use some regulators to drop the voltage needed to supply the controller. using the 9 volts to also power the background leds through the mosfet.
I know from reading around on the net that I need to use a flywheel diode across the mosfet to protect it and have a N4001 diode that I think might work.
I haven't created a schematic yet and I am unfamiliar with arduino code. I have some experience using assembly to program an atmega328p, and ultimately in the end I will be trying to program the ATTINY in assembly (for fun) once I understand the arduino code I create.
Does this even sound like I'm on the right track or is there things I am missing that will prevent me from accomplishing my goal?



