Ooooh, nice enclosure! This is a little motion sensing lamp which [Krazatchu] built a few years back as a Mother’s Day gift. The PIR sensor is easy enough to see as the white dome on the front of the case. But look closely below that and you’ll see the LDR which it uses to keep the thing asleep during the day. This is intended to save on batteries but the original version still ate through them like crazy. This year he gutted it and worked out a much more power-friendly design.
He moved to a TLC1079 OpAmp which greatly reduced power consumption when reading from the PIR sensor. The microcontroller was also upgraded from an ATtiny13 to an ATmega328, making the new version Arduino compatible. It puts itself to sleep and keeps the lights out during the day, drawing just 0.08 mA. When driving the RGB LED the lamp pulls about 50 mA. That should still last a while on three AA batteries but we’d still recommend using rechargeables.