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