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.
 
Right

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

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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…