Need help for a super simple Cheapest USB POWER OUTAGE ALARM sketch

MrAl

Joined Jun 17, 2014
11,389
BUT! How long before the 9V battery is drained? I did something similar for a freezer door alarm and discovered that for some reason beyond my skill or understanding level lasted for only two weeks. My concern is for the longevity of the battery - and no - please don't make a separate thread for my question. I'M NOT ASKING - I'M POINTING OUT! Some moderators have taken my questioning as hijacking. I'm only pointing out that using a 9V battery with a 1megΩ resistor will still drain. And at some point it's going to be too weak to react with an alarm.

The super-cap seems like a good idea, but as you pointed out - expense may be an issue. Another issue would be audibility of the buzzer (I didn't see one defined by the TS, maybe I missed that). What kind of power is it going to draw?
Hi,

I did a refrigerator door monitor a long time ago and got 2 years out of the AA batteries.
The trick is to have it show the status just once every so often, like 10 minutes, and if there is a fault, have it show up more often but not continuous. IF it shows up once per minute it will make the battery last 60 times longer than if it runs continuously.
I used a microcontroller which had a 'sleep' function. During sleep, the uC chip consumes extremely low power and thus low current from the batteries. Maybe 10na cant remember, but to the batteries it's almost nothing.
Using a bright LED to show the status also means consuming less power during the time it has to be shown. The LED can be pulsed with a very short pulse and still be visible, which overall means very low power consumed. For a buzzer, just turn it on for a short time just like how a fire detector works when the battery runs down, and also have a different buzz pulse pattern for when the battery gets low.
The thing about a refrigerator is if the temperature gets above a certain point then another 5 minutes wont make that much difference so the check can be once every 5 minutes or something like that, along with the LED status indication.
I used a multicolor super bright LED. Green for good, red for temperature too high, something like that. I dont use it anymore i use a mechanical method to make sure the door is shut.
 

MisterBill2

Joined Jan 23, 2018
18,167
I did not specify a sounder other than Piezo, which may be driven by something like a CD4049 oscillator driving the other 4 inverters out of phase for a 10 volt square wave. So it will be fairly loud for a while then eventually fade.
 

Audioguru again

Joined Oct 21, 2019
6,672
The 1Meg resistors in series with the Cmos CD4049 inputs have no current in them.
The idle current of the entire CD4049 at many supply voltages is typically only 0.02uA or 2uA maximum.
That is why Cmos is used in smoke detectors.

Of course the current is much higher if it is beeping frequently but a Piezo sounder uses a fairly low current.
 

MrAl

Joined Jun 17, 2014
11,389
I did not specify a sounder other than Piezo, which may be driven by something like a CD4049 oscillator driving the other 4 inverters out of phase for a 10 volt square wave. So it will be fairly loud for a while then eventually fade.
My observation was that the 'speaker' was 33 Ohms and that's kinda low for a gate output to drive.
I did drive an actual small speaker maybe 32 Ohms with a microcontroller but i used a coupling cap and current limiting resistor. I may have used one clamp diode too i'd have to look that up it was maybe 10 years ago now.
 

Tonyr1084

Joined Sep 24, 2015
7,852
Hi,

I did a refrigerator door monitor a long time ago and got 2 years out of the AA batteries.
The trick is to have it show the status just once every so often, like 10 minutes, and if there is a fault, have it show up more often but not continuous. IF it shows up once per minute it will make the battery last 60 times longer than if it runs continuously.
I used a microcontroller which had a 'sleep' function. During sleep, the uC chip consumes extremely low power and thus low current from the batteries. Maybe 10na cant remember, but to the batteries it's almost nothing.
Using a bright LED to show the status also means consuming less power during the time it has to be shown. The LED can be pulsed with a very short pulse and still be visible, which overall means very low power consumed. For a buzzer, just turn it on for a short time just like how a fire detector works when the battery runs down, and also have a different buzz pulse pattern for when the battery gets low.
The thing about a refrigerator is if the temperature gets above a certain point then another 5 minutes wont make that much difference so the check can be once every 5 minutes or something like that, along with the LED status indication.
I used a multicolor super bright LED. Green for good, red for temperature too high, something like that. I dont use it anymore i use a mechanical method to make sure the door is shut.
Good approach. Check once every 10 seconds - or even once every 5 minutes.

What I ended up doing was installing a plunger and adjust it so that if you just tugged on the door without opening it then power (via 9V battery) was switched on to a Son-Alert. Switching was done via a microswitch. The Son-Alert would start out beeping once every second for (I think) eight seconds, then twice every second for another eight seconds, then start beeping many times per second. Also incorporated a delay of approximately 30 seconds so that if you opened the door you didn't get screamed at the instant you tugged on the door. Since the freezer gets opened infrequently the battery has been in service for about three years now, and still going strong.
 

MrAl

Joined Jun 17, 2014
11,389
Good approach. Check once every 10 seconds - or even once every 5 minutes.

What I ended up doing was installing a plunger and adjust it so that if you just tugged on the door without opening it then power (via 9V battery) was switched on to a Son-Alert. Switching was done via a microswitch. The Son-Alert would start out beeping once every second for (I think) eight seconds, then twice every second for another eight seconds, then start beeping many times per second. Also incorporated a delay of approximately 30 seconds so that if you opened the door you didn't get screamed at the instant you tugged on the door. Since the freezer gets opened infrequently the battery has been in service for about three years now, and still going strong.
Hi,

Oh that sounds good too.
Yes if you make it mechanical and make sure it works as expected you can get years and years out of it.
For a large freezer unit if you make it electronic you can probably get away with checking it once per hour i bet.
Long time ago we had a big freezer in the basement and you could go a whole day with no electric and the food would be just fine.
I was also able to increase the insulation on one of my refrigerators and so it holds the 'cold' in for a longer time.

The uC based monitor was quite easy to program too, just read the thermistor now and then and show the status. Less than an hour to program and get up and running with an Arduino (of you know how to get it into sleep mode) but i used a MicroChip 8 pin part because i knew how to get it to sleep for a long time pretty easily and never got around to doing that with an Arduino board which probably takes some modification although the chip itself is probably easier to do this with.

Anyway congrats on your solution.
 
Top