Continue to Site

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.

zero cross problem pls help

Status
Not open for further replies.

takbbb

Junior Member level 2
Joined
Sep 3, 2008
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,428
i connect 1M resistor from main 110v ac to MCU

however, the zero cross is uneven

and i found that the waveform to mcu is a bit strange ..

as below
006.jpg


the point is not really drop to zero, and the scale have changed??(why??)

007.jpg


and this the resultant waveform fm my mcu

the falling edge or rising edge interrupt wase @ abt 2.5V

pls help and suggest thx~
 

This is to be expected, since the threshold of your MCU input is not going to be zero, but somewhere in the middle of the supply voltage. Variations on the threshold will also affect the duty-cycle of the waveform.

The shape of the voltage at the input of the MCU is due to the input protection diodes that the MCU has built-in to protect its inputs. This is actually why you could simply connect a resistor from 110VAC to the MCU input without destroying it. The diodes will clamp the voltage to safe levels.

If you need true zero-crossing, then you can use a comparator to detect the actual zero crossings of the waveform. The reference input can be connected to GND if you have a negative supply for your comparator.

If you do not have a negative supply, then divide down the 110VAC to some reasonable value of a few volts peak to peak and then couple that to the comparator through a capacitor. The reference input of the comparator can be biased in the middle of the supply voltage. Make sure you bias the actual input of the comparator from the same supply through a relatively large resistor. This way the two inputs of the comparator are at the same potential and since the signal is capacitiely coupled, you will detect true zero-crossings. Of course, they will still be affected by the comparator's response delay and hysteresis (which you I recommend you add to remove noise), but the results will be far superior.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top