How I can directly interface 220V AC line by microcontroller for detecting zero crossing. Pls advise example circuits which have safety and robust circuit.
U hav to build a zero corssing detector circuit .. only when the voltage on the line is 0V the microcontroller can access the line .. tats the safest method to carry on power line communication.
If you are using a PIC micro controller you can directly conect AC power line for detecting zero cross through 20 mega ohm resistor in 220VAC and 5Mg resistor in 110VAC. then zero cross can be detected through software.
Take a look at the picture below ..
For 220Vac all you need to do is to increase the value of 10kΩ resistor to 18-20kΩ or use a 1.5µF capacitor (rated for 250Vac) ..
Could you describe this circuit?.
Why the 1.5uF capacitor can be used for resistor in 220V?.
Can I use 1.5uF capacitor in 110V?.
Could you tell me about working of D5 and R2?.
1.5µF capacitor @ 230Vac will allow the same amount of current as 3µF @ 120Vac .. So for 110/120Vac operation you may use 3µF cap ..
D5 (11V zener) together with R2 (13.5kΩ) determine the width of th positive pulse on the Q1 collector - the higher the zener voltage the wider is the pulse .. R2 value is not critical, and yo may use anything between 4.7kΩ - 20kΩ ..
do u want to measure the voltage and frequency of the supply using microcontroller and display it in LCD or computer. Better you use a step down transformer. I had given some tutorials how to do it using parallel port of computer in my book
MY EXPERIENCE IN PARALLEL PORT INTERFACING
you can get it from yahoo group-booksbybibin https://groups.yahoo.com/group/booksbybibin/
About 20Mohm solution;
yes i have just tried and its working perfectly..optocoupler solution has some disadvantage due to led voltage drop..so pulse width is not exact 10ms...But 20M rsistor solution is perfect...
ps: ucontroller f628
Best Regards..