When the PIR-Sensor (Passive Infrared) triggers an interrupt, the ATtiny checks the LDR and decides if the ambient brightness is low enough to turn on the LEDs.
The ATtiny84 controls three N-channel MOSFETs which drive the LED-Strip. The LEDs automatically turn off after a specified time.
I changed my 12V Supply to a higher quality one, now everything works as expected.
I think the problem was, in sleep mode the circuit draws so little current, that the supply can't hold a steady voltage.
The only small problem left is, at low brightness you can see the individual brightness levels. In the future I may add 10/12? bit software-PWM to get smoother dimming of the LEDs.
Everything works as expected if I power the circuit via the ISP programmer (Arduino UNO) or my bench power supply.
But if I use the 3,3V regulator from the PIR-module, the circuit behaves strange. I also tried a L78L33AC regulator powered from the 12V rail, resulting in the same strange behaviour.
My circuit consumes less than 10mA, which both regulators should be capable of.
This is great. I was looking to do something like this using a few NeoPixels instead of individual RGB and using an ATTiny85 and some AA batteries to fit in with my Nest Protect smoke alarm pathway lighting. Just bright enough to illuminate a small area.
Will definitely have a crack at forking this. Cheers for the effort!
This is great. I was looking to do something like this using a few NeoPixels instead of individual RGB and using an ATTiny85 and some AA batteries to fit in with my Nest Protect smoke alarm pathway lighting. Just bright enough to illuminate a small area.
Will definitely have a crack at forking this. Cheers for the effort!