I've on my second iteration of a motion sensor/temp/[humidity/door sensor] board. This one is based on the Attiny4313 (just because, really). It features a very low power motion sensor, DS18B20 temp sensors, XBee for reporting motion/temp. The XBee runs in timer mode to wake up the MCU to do temp; the motion sensor wakes up the MCU on motion.
I'd like to be able to run on battery power. The motion sensor is very low power (46 uA). The XBee, in sleep mode, is reasonable.
The problem is motion sensing; In the powered version I throttle motion sensing by not reporting every motion report, but throttle back to one every few minutes. But, if I sleep the MCU, I no longer have any timer to tick off time.
The obvious solution is an RTC, but RTC modules, at least domestic ones, are expensive.
Does anyone have any other solution to this? It really needs to run below 100 uA, preferably well below. It could even, in theory, just be a very low power time that runs at, say, 1Hz and kicks the MCU, though start up time, etc. might consumer too much power even at 1Hz, not sure how short a start up time I can program and it work well. Or just some kind of easy-to-read 32-bit counter with very low power 1 kHz clock. etc.
I can't be the first to run into this problem...