View previous topic :: View next topic |
Author |
Message |
tanveerriaz
Joined: 04 May 2012 Posts: 7
|
|
Posted: Fri May 03, 2013 7:05 am |
|
|
for Mike Walne.
this is prototype. i draw a sketch of my board.
i made this pcb for test code.
i understand the risks working on live mains.
i am not a programmer.
only a electronic/radio hobbyist.
my code work show voltage on lcd and on/off led.
i can not made relay driver board. and mains in put circuit.
i say when i complete it i show it. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Sat May 04, 2013 2:58 am |
|
|
Quote: | this is prototype. i draw a sketch of my board. | Yes, I can see that.
Quote: | i made this pcb for test code.
i understand the risks working on live mains.
i am not a programmer. | I've survived over quarter of century working with live mains circuits.
I strongly advise you isolate your PIC from the mains input.
As shown your dealing with half-wave-rectified mains.
Dorinm has pointed out a serious flaw in your strategy.
Quote: | i can not made relay driver board. and mains in put circuit. | Does this mean you don't know how or have not yet done?
Mike |
|
|
dorinm
Joined: 07 Jan 2006 Posts: 38
|
|
Posted: Thu May 09, 2013 2:57 pm |
|
|
so, if you want some help (and thank's Mike, I do know what it means to live betveen 6kV lines ), first do what Mike suggested and isolate the PIC from your mains, anything else could lead to undefined behaviour (or fun elecronic fail;) );
there's something you might want to consider: an isolation transformer is never a wrong bet ;) ...you could actually use a two-winded transfomer (one for pic, one for feeding the adc, common ground wont'n be a problem), and rectify one winding for feeding the adc of your pic; use a zero-crossing detector, and you'll know exactly when to sample, and you have plenty of time (50-60HZ = 20-16mseconds), to determine the actual voltage on your mains |
|
|
|