Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Help with zero crossing detector

Status
Not open for further replies.

kushagra411

Newbie level 5
Joined
Mar 28, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
76
Hi friends,
I'am using the following circuit for powering a AVR microprocessor.
I need a zero crossing detector for the same circuit.
Please suggest how to build a zero crossing detector that can be used simultaneously with this power supply.


ac2dctranz.JPG
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,455
Helped
4,300
Reputation
8,605
Reaction score
4,260
Trophy points
1,393
Activity points
129,015
Hi,

it would be easier (at least to read the schematic) if "neutral" is near the "GND" level.
With your circuit "VCC" is near "Active" level.

Is it possible to change the circuit?


Klaus
 

kushagra411

Newbie level 5
Joined
Mar 28, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
76
Is it possible to change the circuit?

Hi klaus,
Yes we can reverse the components to change Phase and neutral like the image below, but then main problem is i have to also connect triacs with this circuit.
Please keep that also in mind.

ACcapbleed.GIF
 

asdf44

Advanced Member level 3
Joined
Feb 15, 2014
Messages
999
Helped
354
Reputation
708
Reaction score
343
Trophy points
1,363
Activity points
9,695
I agree with the above and don't see how the Triacs factor into the decision to reference the circuit to active.

Anyway, I suppose it sort of doesn't matter. You can construct a comparator that's looking at the input AC. Construct a resistor network that properly attenuates and then biases a representation of the input AC into a range that's within your Vcc and GND. A high value chain of resistors from Active and Neutral each pulled to Vcc/2 with a much much lower value resistor divider would do the job. Then feed that pair into a comparator.

A better option is to use a small transformer to step down and isolate the voltage first, though you seem to have avoided transformers so far.
 

kushagra411

Newbie level 5
Joined
Mar 28, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
76
Yes I do have thought about transformer and a SMPS circuit but that can add a lot of components to the design and a transformer. Its a considerable option though.
I will try to get zero crossing in this or otherwise use SMPS, that would be more safer also.
thanks anyway.
 

Kurenai_ryu

Advanced Member level 2
Joined
Jun 10, 2006
Messages
671
Helped
159
Reputation
316
Reaction score
99
Trophy points
1,308
Location
Bolivia
Activity points
5,913
I just simulated but I think it should work if you change one diode for an optocoupler and use it to trigger a signal for the microcontroller...

929bd08514.png
[output at R4 optocoupler collector]

from what I get, the real limits are the current of the microcontroller and the current on the optocoupler LED (is there a 50mA optocoupler? the 4n25 says 50mA...) maaaaybe you can combine a led and a resistor like this

but remember, this is not a true 0v cross detector... the signal doesn't change on 0° and 180°.. instead (according my simulation) it changes at 90° and 270° (truth is maybe in practice the triggering angle could be different) but at least it triggers constantly at each cycle...

so, how can you work with a circuit like this?

what for the negative edge (via an interrupt pin?) and adjust your triac-triggering-timer to wait 5ms + your program specific time (where 5ms is the time from the negative edge to the 0v cross signal according my simulation [and that you should change according a real test])

please be careful while doing tests, and disconnect the main AC line before checking temperatures of the optocoupler... if it heatens too much, try using the resistor-added diode...

be careful and good luck
 

asdf44

Advanced Member level 3
Joined
Feb 15, 2014
Messages
999
Helped
354
Reputation
708
Reaction score
343
Trophy points
1,363
Activity points
9,695
Part of your problem is that your forced to chose a resistor for the opto that won't blow it up at peak voltage. This means a weak resistor that won't turn the opto on quickly.

A good alternative to that pull-up resistor would be a depletion mode mosfet in a current source topology limiting to ~1mA. Even at 240V it would only be dissipating 0.24W which should be sustainable for an LND150 in a SOT-89 package. See "ID vs RSOURCE":
https://ww1.microchip.com/downloads/en/DeviceDoc/LND150 C041114.pdf

The sharper turn-on of the current source would get you closer to the zero crossing, improve phase accuracy and cut down on dissipation and circuit size/cost at the same time. Though if you need tight phase accuracy an opto probably isn't the way to go.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,455
Helped
4,300
Reputation
8,605
Reaction score
4,260
Trophy points
1,393
Activity points
129,015
Hi,

What is the optocoupler good for when you don't need nor use isolation?

Just use a bjt and you will have no problem with speed, current and power dissipation.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top