Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Mains input 16f628A

Status
Not open for further replies.

Larynx1

New Member
Hi everyone,

I need to monitor for mains power failure using an input to 16f628.

I have been looking at using the transformerless circuits on Microchip appnote AN954.

My intention is to build the resistive 5v supply and put the output through a resistor/transistor arrangement into RB0

My question is this, firstly is it safe and secondly would I have to connect the 0v of my micro to neutral line?

thanks in advance for any help
 
It really depends entirely on what the circuit is doing - as that method would leave it all entirely live.

A safer method would be to use a transformer, and power the circuit safely from that, taking a 'mains' feed from the output of the bridge rectifier but before a single rectifier feeding the reservoir capacitor. This gives you the option os detecting zero crossing as well, and is perfectly safe.
 
Hi Nigel,

Thanks for your comments, attached is what I'm trying to do 240-5.png
 
Right :D

Obviously the emitter of the transistor would need connecting to the -ve of the electrolytic - but with only a 470ohm dropper resistor there's going to be an almighty BANG and clouds of smoke :p

The OP also hasn't addressed the problem of the entire circuit been live to the mains.
 
Just plug in a wall-wart (e.g. redundant phone charger) and use the micro to monitor its output. Cheap, and much safer than the transformerless method.
 
You would surely be safe with an isolated PSU. Non-isolated are only for such applications where the human could not reach the device without disconnecting power. Otherwise it could be FATAL.
 
Status
Not open for further replies.

Latest threads

Back
Top