Mains power alert

Thread Starter

leghorn

Joined Sep 17, 2015
9
I am a novice. I need a device that will beep once when my 220V goes off, and maybe beep twice (or make a different sound) when the power goes on again. No reset buttons or switches needed. I just need to be alerted. Any help with a circuit diagram and part names will be much appreciated.

I am talking about 220V AC, 50Hz. Let's say if it is off for more than 2 seconds. I would like to be able to hear the beep from 10m away. I would like to build something. I will be careful, I will not cause injury or death.

AnalogKid recommended this forum. Unfortunately I can not figure out how to PM someone here.

Johannes.
 

BobTPH

Joined Jun 5, 2013
8,665
How much of a novice? Someone who has done a couple of projects with Arduino is a novice, but has the skills to do this project in a couple of hours.

Ignoring your experience level, I will tell you how I would do it.

8-pin PIC, one decoupling capacitor and a piezo buzzer. That is it, 3 electronic parts, plus a battery to power the beep when power goes off, and the 5V wall wart for detection of mains power. The rest is programming.
 

DickCappels

Joined Aug 21, 2008
10,123
I would probably use an AVR because I am already set up to do that, but I think something involving an NE555 or two would be much easier - no language to learn, no development environment to install and learn, not need to find programming hardware. Soldering is much easier than programming if starting from scratch.
 

BobTPH

Joined Jun 5, 2013
8,665
I would probably use an AVR because I am already set up to do that, but I think something involving an NE555 or two would be much easier - no language to learn, no development environment to install and learn, not need to find programming hardware. Soldering is much easier than programming if starting from scratch.
Agreed, it depends on your starting point. If the TS says he has used Arduino, I would suggest an Arduino nano.
 

Thread Starter

leghorn

Joined Sep 17, 2015
9
Analog version using 2 different frequency beepers and 2 different ON times.
View attachment 298836

Thank you so much for this.
I want to build your first option. I have a few questions please:
1. If I cannot find a 2N3904 transistor, can I use a 2N2222 in its place?
2. For the resistors, can I use 0.25W?
3. For the battery, how many mAh will be suitable?
4. Could you please give specs for the buzzers?
 
Whilst I'm a huge fan of the 555 I'm wondering if it's necessary for this application? How about:
1690222076225.png
when the power comes on the capacitor is discharged so the tansistor turns on, sounding the first buzzer until the base rises to about 4.4V. When the power turns off the base of the 2nd transistor drops which turns the second transistor on. The cut-offs won't be so sharp, but this may make them distinguishable.
 
Base to emitter is shorted on Q2
Need small series base resistor for Q1 when 5 volts is applied.
Requires large value cap for ON time of several seconds, over 1000uf.
Buzzer sounds continuously when the 5 volt supply is down.
Thanks for pointing out the error of my ways. Base to emitter shorted unforgiveable. I've re-thought the right hand side - sounding when the power drops out.

C2 needs to charge up when the power is on to avoid the need for a battery. Agreed, it needs to be a high value.
1690278386872.png
In this arrangement, with 5V connected Q2 turns on effectively grounding the base of Q3. C2 will charge up to 5V less the diode drop. When 5V is turned off Q3 will turn on. I'd try it with R4 = 47K, R5 = 10K, R6 = 47K and C2 = 1000uF to check ihow it works. Q2 and Q3 can be virtually any small signal reasonably high gain (>200) NPN transistors. And the diode can be virtually any silicon diode, although a schottky which has a smaller voltage drop would make the buzzer sound a little longer. Maybe https://www.ebay.co.uk/b/piezo-sounder/bn_7024807294 for the buzzers as they are specified to work down to 3V. A bigger capacitor should make the buzzer sound longer.

Edit: just thought, there should be a small resistor just to the right of the diode to limit the initial current into C2. 20R would limit it to a maximum of 250mA
 
Last edited:
Could you please give specs for all the components?
I've just posted an improved/corrected part of the circuit including suggested component details. 0.25W resistors are fine. I have a 6800uF capacitor rated at 6.3V which is 40mm long and 22mm in diameter which should be ideal - the voltage rating must be greater than 5V. You could see if it works with a 100uF capacitor but the buzz will be very brief. I recommend building this side of the circuit first to check it out. For the left hand side virtually any small signal PNP transistor should be okay. Please ask again if you are not sure - I haven't actually tested this circuit yet, but I'm reasonably confident it would work.
 

Thread Starter

leghorn

Joined Sep 17, 2015
9
Thank you very much for all the input. Just to be sure, I made a drawing. This is how I see it now.
Is my drawing correct? If yes, then I have a few questions, just to make sure I understand this correctly:

1. Should I put a 20 ohm resistor at the question mark?
2. Can I use 2N2222 for Q2 and Q3?
3. Can I use 2N3906 for Q1?
4. Can I use 1N4148 for D1?
5. Can I use a 3.3uF at C1?
6. Can I use a 6800uF at C2?
7. All resistors 0.25W?

If I need to get other components, to experiment with, please also give specs for that. I live in a very remote, very small town in Africa. Components I see are fairly cheap, but shipping is expensive, so I would like to order only once.
Thank you again, for everyone's time and effort.FinalVersion.jpg
 
Top