Skip Navigation

A nightlight with orientation control

So I wanted to design a children's toy, where the electronics could last 100 years (ignoring mechanical abuse). I figured some people here might be interested.

I settled on a CR2032-powered night light, using an attiny10 microcontroller, where the flash is rated for 100 years unless you're writing to it (which I am not). I did some pretty heavy power optimization. The firmware is hand-optimized assembly.

When you turn it upside-down, a tilt switch toggles an LED @ 3mA via a pretty intense debouncing routine.

A watchdog timer has it auto power off in 30 minutes.

When off, it consumes less than 1 uA. So it has about 25 years of standby time, although the battery is only rated for 10 years (it is replaceable though).

If a child uses it every day, then the battery should last about 4.5 months.

I made custom boards for it -- I kept is simple with few components as possible (resistor is for scale):

I kept assembly simple. A better design would snap right in to the pins of the CR2032 holder, but that's an addition I'll make another day. I also should have added one more ground pad to solder to, but forgot. Still, an OK result I think.

I used some spay-on lacquer to protect the traces a bit after assembly.

0
0 comments