Maker Pro
Maker Pro

Mains electricity to circuit board

screwball

Jan 9, 2012
89
Joined
Jan 9, 2012
Messages
89
Hey,

I've been looking for a circuit that i can use to check if there is power through the mains electricity but dont have a clue where to start,

Basically, I want to use a microchip (programmable IC) which will detect when the mains electricity is on/off but dont have a clue where to start in terms of making a circuit and then designing it so that it doesn't blow my microchip to pieces. Preferably without any special components of any sort

Any help would be great
 

GreenGiant

Feb 9, 2012
842
Joined
Feb 9, 2012
Messages
842
I would say spend a few bucks and get something like this look under shopping they range from around a dollar to over 50, the main difference is sensitivity

I paid 10 for a craftsman from Sears that does what I need it to do, youll spend more than that on parts for a circuit without a micro, plus you dont have to fool around with the mains voltage
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Use an optoisolator with a capacitor to drop the voltage to the LED side of it. Be sure to also bypass the LED with a diode pointing in the opposite direction. You should see a 50/60 Hz square wave out when the lines voltage is on.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Like this:

linemonitor.JPG

The LED is the input of the optoisolator.

The capacitor is sized for 120V 60Hz and a 20ma LED, if different you need to resize it.

Bob
 
Top