I'm creating an IRL Screamapillar. It's a character from The Simpsons which screams loudly if it's not constantly taken care of (something like a baby but in an adorable caterpillar shape)
The thing will be a 3D printed enclosure shaped like the Screamapillar, fitted with the highest powered small speaker I can get down its throat, and equiped with one of these always-on ultra low power sound-detecting microphones from PUI Audio, some cheap accelerometer with ultra low power shake detection and a light sensor.
The idea is that the thing will start screaming like there's no tomorrow if X amount of time passes without any sound/motion detected, with X halving if light gets low. That means, if you don't speak near the think or keep moving/shaking it constantly it will start screaming.
As I want it to be small for extra lulz, and I also want to power it with regular batteries (nothing fancier than AAAs) and I want the electronics to be simple, as I'm already saturated with electronics design at my day job. Also, for some reason I can't rationally explain, I'd like it to run for a loooong time while asleep, so that if for some reason it's kept ON in a high-noise/movement environment and the bug is thus amused and not feeling like screaming, its battery woudn't die in hours, but in months/years. Of course this is idiotic as in real life it'll be turned off or thrown out the window before it has a chance of running out of battery, but I still want it that way.
My first thought was to just toss the cheapest low-power microcontroller in there, make it sleep with a low power timer set up for automatic wake up after some amount of time. The count reset line for the timer would be brought out to a GPIO which would be connected to the sound detection/motion detection signals OR'd together. So, the microcontroller would be sleeping and would only wake up if the timer expires, which would only occur if it hasn't been reset before overflow, i.e. if no motion/movement happens within the timer overflow time. Then, the micro would wake up and start randomly playing high quality screams from an ISD2360 or whatever other chipcorder IC I can find.
But that solution would make the project a bit more muggle-proof than I'd like it to be, as I plan to open-source it. I want anyone with advanced SMD soldering skills, a proper 3D printer, basic painting skills and a serial to USB converter to be able to build it, without needing extra programmers/dongles for whatever microcontroller I choose.
So my second thought would be using an ESP8285 as the base IC, connected to an I2S audio DAC+speaker amplifier. That solves the audio playing stuff, has enough embedded flash memory for scream sounds and the extra WiFi could be used to adjust screaming patterns or thresholds via a web interface or something. They can be powered relatively well by 2xAAAs (which should fit inside the caterpillar) and implement a ROM bootloader so that you need no special programming tools for them. However their low power modes are weird and you need to externally reset the things to wake them up, which can be done automatically with an internal RTC which unfortunately I can't reset while operating.
So I need an IC that's simple, ultra low powered and all it does is counting time and setting an output low or high after a set amount of time. It needs to have a reset input that's level sensitive, not edge sensitive, so the count would be reset AND inhibited while the input is low or high. Does anything like that exist? I can't find D: