26
Zero Crossing Detectors and Comparators (The Unsung Heroes of Modern Electronics Design) Rod Elliott (ESP) Share | Introduction Zero crossing detectors as a group are not a well-understood application, although they are essential elements in a wide range of products. It has probably escaped the notice of readers who have looked at the lighting controller and the Linkwitz Cosine Burst Generator, but both of these rely on a zero crossing detector for their operation. A zero crossing detector literally detects the transition of a signal waveform from positive and negative, ideally providing a narrow pulse that coincides exactly with the zero voltage condition. At first glance, this would appear to be an easy enough task, but in fact it is quite complex, especially where high frequencies are involved. In this instance, even 1kHz starts to present a real challenge if extreme accuracy is needed. The not so humble comparator plays a vital role - without it, most precision zero crossing detectors would not work, and we'd be without digital audio, PWM and a multitude of other applications taken for granted. Basic Low Frequency Circuit Figure 1 shows the zero crossing detector as used for the dimmer ramp generator in Project 62. This circuit has been around (almost) forever, and it does work reasonably well. Although it has almost zero phase inaccuracy, that is largely because the pulse is so broad that any inaccuracy is completely swamped. The comparator function is handled by transistor Q1 - very basic, but adequate for the job. The circuit is also sensitive to level, and for acceptable performance the AC waveform needs to be of reasonably high

Zero Crossing Detectors and Comparators

Embed Size (px)

Citation preview

Page 1: Zero Crossing Detectors and Comparators

Zero Crossing Detectors and Comparators(The Unsung Heroes of Modern Electronics Design)

Rod Elliott (ESP)

Share |

Introduction

Zero crossing detectors as a group are not a well-understood application, although they are essential elements in a wide range of products. It has probably escaped the notice of readers who have looked at the lighting controller and the Linkwitz Cosine Burst Generator, but both of these rely on a zero crossing detector for their operation.

A zero crossing detector literally detects the transition of a signal waveform from positive and negative, ideally providing a narrow pulse that coincides exactly with the zero voltage condition. At first glance, this would appear to be an easy enough task, but in fact it is quite complex, especially where high frequencies are involved. In this instance, even 1kHz starts to present a real challenge if extreme accuracy is needed.

The not so humble comparator plays a vital role - without it, most precision zero crossing detectors would not work, and we'd be without digital audio, PWM and a multitude of other applications taken for granted.

Basic Low Frequency Circuit

Figure 1 shows the zero crossing detector as used for the dimmer ramp generator in Project 62. This circuit has been around (almost) forever, and it does work reasonably well. Although it has almost zero phase inaccuracy, that is largely because the pulse is so broad that any inaccuracy is completely swamped. The comparator function is handled by transistor Q1 - very basic, but adequate for the job.

The circuit is also sensitive to level, and for acceptable performance the AC waveform needs to be of reasonably high amplitude. 12-15V AC is typical. If the voltage is too low, the pulse width will increase. The arrangement shown actually gives better performance than the version shown in Project 62 and elsewhere on the Net. In case you were wondering, R1 is there to ensure that the voltage falls to zero - stray capacitance is sufficient to stop the circuit from working without it.

Page 2: Zero Crossing Detectors and Comparators

Figure 1 - Basic 50/60Hz Zero Crossing Detector

The pulse width of this circuit (at 50Hz) is typically around 600us (0.6ms) which sounds fast enough. The problem is that at 50Hz each half cycle takes only 10ms (8.33ms at 60Hz), so the pulse width is over 5% of the total period. This is why most dimmers can only claim a range of 10%-90% - the zero crossing pulse lasts too long to allow more range.

While this is not a problem with the average dimmer, it is not acceptable for precision applications. For a tone burst generator (either the cosine burst or a 'conventional' tone burst generator), any inaccuracy will cause the switched waveform to contain glitches. The seriousness of this depends on the application.

Precision zero crossing detectors come in a fairly wide range of topologies, some interesting, others not. One of the most common is shown in Project 58, and is commonly used for this application. The exclusive OR (or XOR) gate makes an excellent edge detector, as shown in Figure 2.

Figure 2 - Exclusive OR Gate Edge Detector

There is no doubt that the circuit shown above is more than capable of excellent results up to quite respectable frequencies. The upper frequency is limited only by the speed of the device

Page 3: Zero Crossing Detectors and Comparators

used, and with a 74HC86 it has a propagation delay of only 11ns [1], so operation at 100kHz or above is achievable.

The XOR gate is a special case in logic. It will output a 1 only when the inputs are different (i.e. one input must be at logic high (1) and the other at logic low (0v). The resistor and cap form a delay so that when an edge is presented (either rising or falling), the delayed input holds its previous value for a short time. In the example shown, the pulse width is 50ns. The signal is delayed by the propagation time of the device itself (around 11ns), so a small phase error has been introduced. The rise and fall time of the squarewave signal applied was 50ns, and this adds some more phase shift.

There is a pattern emerging in this article - the biggest limitation is speed, even for relatively slow signals. While digital logic can operate at very high speeds, we have well reached the point where the signals can no longer be referred to as '1' and '0' - digital signals are back into the analogue domain, specifically RF technology.

The next challenge we face is converting the input waveform (we will assume a sinewave) into sharply defined edges so the XOR can work its magic. Another terribly under-rated building block is the comparator. While opamps can be used for low speed operation (and depending on the application), extreme speed is needed for accurate digitisation of an analogue signal. It may not appear so at first glance, but a zero crossing detector is a special purpose analogue to digital converter (ADC).

Comparators

The comparator used for a high speed zero crossing detector, a PWM converter or conventional ADC is critical. Low propagation delay and extremely fast operation are not only desirable, they are essential.

Comparators may be the most underrated and under utilised monolithic linear component. This is unfortunate because comparators are one of the most flexible and universally applicable components available. In large measure the lack of recognition is due to the IC opamp, whose versatility allows it to dominate the analog design world. Comparators are frequently perceived as devices that crudely express analog signals in digital form - a 1-bit A/D converter. Strictly speaking, this viewpoint is correct. It is also wastefully constrictive in its outlook. Comparators don't "just compare" in the same way that opamps don't "just amplify". [2]

The above quote was so perfect that I just had to include it. Comparators are indeed underrated as a building block, and they have two chief requirements ... low input offset and speed. For the application at hand (a zero crossing detector), both of these factors will determine the final accuracy of the circuit. The XOR has been demonstrated to give a precise and repeatable pulse, but its accuracy depends upon the exact time it 'sees' the transition of the AC waveform across zero. This task belongs to the comparator.

Page 4: Zero Crossing Detectors and Comparators

Figure 3 - Comparator Zero Crossing Detector

In Figure 3 we see a typical comparator used for this application. The output is a square wave, which is then sent to a circuit such as that in Figure 2. This will create a single pulse for each squarewave transition, and this equates to the zero crossings of the input signal. It is assumed for this application that the input waveform is referenced to zero volts, so swings equally above and below zero.

Figure 4 - Comparator Timing Error

Figure 4 shows how the comparator can mess with our signal, causing the transition to be displaced in time, thereby causing an error. The significance of the error depends entirely on our expectations - there is no point trying to get an error of less than 10ns for a dimmer, for example.

The LM339 comparator that was used for the simulation is a very basic type indeed, and with a quoted response time of 300ns it is much too slow to be usable in this application. This is made a great deal worse by the propagation delay, which (as simulated) is 1.5us. In general, the lower the power dissipation of a comparator, the slower it will be, although modern IC techniques have overcome this to some extent.

Page 5: Zero Crossing Detectors and Comparators

You can see that the zero crossing of the sinewave (shown in green) occurs well before the output (red) transition - the cursor positions are set for the exact zero crossing of each signal. The output transition starts as the input passes through zero, but because of device delays, the output transition is almost 5us later. Most of this delay is caused by the rather leisurely pace at which the output changes - in this case, about 5us for the total 7V peak to peak swing. That gives us a slew rate of 1.4V/us which is useless for anything above 100Hz or so.

One of the critical factors with the comparator is its supply voltage. Ideally, this should be as low as possible, typically with no more than ±5V. The higher the supply voltage, the further the output voltage has to swing to get from maximum negative to maximum positive and vice versa. While a slew rate of 100V/us may seem high, that is much too slow for an accurate ADC, pulse width modulator or zero crossing detector.

At 100V/us and a total supply voltage of 10V (±5V), it will take 0.1us (100ns) for the output to swing from one extreme to the other. To get that into the realm of what we need, the slew rate would need to be 1kV/us, giving a 10ns transition time. Working from Figure 3, you can see that even then there is an additional timing error of 5ns - not large, and in reality probably as good as we can expect.

The problem is that the output doesn't even start to change until the input voltage passes through the reference point (usually ground). If there is any delay caused by slew rate limiting, by the time the output voltage passes through zero volts, it is already many nanoseconds late. Extremely high slew rates are possible, and Reference 2 has details of a comparator that is faster than a TTL inverter! Very careful board layout and attention to bypassing is essential at such speeds, or the performance will be worse than woeful.

Using A Differential Line Receiver

This version is contributed by John Rowland [3] and is a very clever use of an existing IC for a completely new purpose. The DS3486 is a quad RS-422/ RS-423 differential line receiver. Although it only operates from a single 5V supply, the IC can accept an input signal of up to ±25V without damage. It is also fairly fast, with a typical quoted propagation time of 19ns and internal hysteresis of 140mV.

Page 6: Zero Crossing Detectors and Comparators

Figure 5 - Basic Zero Crossing Detector Using DS3486

The general scheme is shown in Figure 5. Two of the comparators in the IC are used - one detects when the input voltage is positive and the other detects negative (with respect to earth/ ground). The NOR gate can only produce an output during the brief period when both comparator outputs are low (i.e. close to earth potential). However, tests show that the two differential receiver channels do not switch at exactly 0.00V. With a typical DS3486 device, the positive detector switches at about 0.015V and the negative detector switches at approximately -0.010V. This results in an asymmetrical dead band of 25mV around 0V. Adding resistors as shown in Figure 6 allows the dead band to be made smaller, and (perhaps more importantly for some applications), it can be made to be symmetrical.

Figure 6 - Modified Zero Crossing Detector To Obtain True 0V Detection

Although fixed resistors are shown, it will generally be necessary to use pots. This allows for the variations between individual comparators - even within the same package. This is necessary because the DS3486 is only specified to switch with voltages no greater than ±200mV. The typical voltage is specified to be 70mV (exactly half the hysteresis voltage), but this is not a guaranteed parameter.

Page 7: Zero Crossing Detectors and Comparators

Indeed, John Rowland (the original designer of the circuit) told me that only the National Semiconductor devices actually worked in the circuit - supposedly identical ICs from other manufacturers refused to function. I quote ...

We did some testing with "equivalent" parts made by other manufacturers, and found very different behavior in the near-zero region. Some parts have lots of hysteresis, some have none, detection thresholds vary from device to device, and in fact even in a quad part like the DS3486 they are different from channel to channel within the same package. Eventually we settled on the National DS3486 with some added resistors on its input pins as shown in Figure 6. The most recent version of the circuit uses trimpots, 100 ohm on the positive detector and 200 ohm on the negative detector. These values allow us to trim almost every DS3486 to balance the noise threshold in the +/-5mV to +/-15mV range. Occasionally we do get a DS3486 which will not detect in this range. Sometimes, we find that both the positive and negative detectors are tripping on the same side (polarity) of zero, if so we pull that chip and replace it.

The additional resistors allow the detection thresholds to be adjusted to balance the detection region around 0V. The resistor from pin 1 to earth makes the positive detector threshold more positive. The resistor from the input to pin 7 forces the negative detector threshold to become more negative. Typical values are shown for ±25mV detection using National's DS3486 parts. In reality, trimpots are essential to provide in-circuit adjustment.

References 1 - Quad 2-input EXCLUSIVE-OR gate 74HC/HCT86, Philips Semiconductors Data Sheet2 - A Seven-Nanosecond Comparator for Single Supply Operation, Linear Technology, Application Note 72, May 983 - Differential Line Receivers Function As Analog Zero-Crossing Detectors, John Rowland (reproduced with the author's permission)

Page 8: Zero Crossing Detectors and Comparators
Page 9: Zero Crossing Detectors and Comparators

Single Supply Zero Crossing Detector

Zero crossing detector is used to convert sine wave or other signal into square-wave, the output should be low if the input is negative and high if the input if positive. Many zero crossing detector use split supply (symmetric supply), but this zero crossing detector circuit only need a single supply, thus suitable for battery-operated circuits. Here is the schematic diagram:

The op-amp uses LM339, LM239, LM2901, LM2901V, NCV2901, or MC3302 single supply quad comparator. [Circuit's schematic diagram source: Motorola Application Notes

Page 10: Zero Crossing Detectors and Comparators

Zero Crossing Detector

jojoSeptember - 21 - 20091 CommentShare

Zero Crossing Detector using 741 IC

How to make a Zero Crossing Detector using 741 IC ?

Zero-crossing detector is an applied form of comparator. Either of the op-amp basic   comparator circuits discussed can be employed as the zero-crossing detector provided the reference voltage Vref is made zero. Zero-crossing detector using inverting op-amp comparator is depicted in figure. The output voltage waveform shown in figure indicates when and in what direction an input signal vin crosses zero volt. In some applications the input signal may be low frequency one (i.e. input may be a slowly changing waveform). In such a case output voltage vOUT may not switch quickly from one saturation state to the other. Because of the noise at the input terminals of the op-amp, there may be fluctuation in output voltage between two saturation states (+ Vsat and – Vsat voltages). Thus zero crossings may be detected for noise voltages as well as input signal vin. Both of these problems can be overcome, if we use regenerative or positive feeding causing the output voltage vout to change faster and eliminating the false output transitions that may be caused due to noise at the input of the op-amp.

Page 12: Zero Crossing Detectors and Comparators

Mains-driven zero-crossing detector uses only a few high-voltage parts

You can get isolation with low power consumption using this simple circuit.

Luca Matteini, Agliana, Italy; Edited by Paul Rako and Fran Granville -- EDN, December 1, 2011The circuit in this Design Idea generates a zero-crossing pulse off the ac mains and provides galvanic isolation. The falling edge of the output pulse happens at approximately 200 μsec before the zero crossing. You can use the circuit to safely stop the triggering of a thyristor gate, giving it time to properly turn off. The circuit generates short pulses only when the mains voltage is approximately 0V, thereby dissipating only 200 mW at 230V and a 50-Hz input.

The circuit charges capacitor C1 up to the limit that 22V zener diode D3 creates (Figure 1 and Reference 1). You limit the input current with resistors R1 and R5. As the input-rectified voltage drops below the C1 voltage, Q1 starts conducting and generates a pulse a few hundreds of microseconds long. The coupling of IC1 makes the response of Q1 squarer. The rms operating voltage dictates the only requirement for R1 and R5. SMD, 1206-size resistors typically withstand 200V-rms operation. This design splits the input voltage between R1 and R5, for a total rating of 400V rms. D3 limits the voltage across the bridge to 22V so that all of the subsequent components can have lower voltage ratings. A 22V zener diode can clamp as high as 30V, so this design uses a 50V, 470-nF ceramic capacitor. Ceramic capacitors have better reliability than electrolytic or tantalum capacitors, especially at higher temperatures. If you prefer a cheaper and smaller 25V part, you can change the zener diode’s voltage to 18V and still have a good margin for safety. Use R4 to limit the peak current in the LED. The primary limit on the LED current is the slope of the rectified ac input. The gradual slope doesn’t let Q1 generate current spikes when it discharges C1’s stored energy.

Page 13: Zero Crossing Detectors and Comparators

You can simulate the operation of the circuit in LTspice Version IV (Figure 2 and Reference 2). With a 230V input at 50 Hz, the simulation shows a 17-mA peak in the optocoupler LED. The simulation gives good results with inputs of 90 to 250V, both at 50 and 60 Hz. At 110V and a 60-Hz input, the LED current peak is 8.5 mA, so IC1 still works. If you need higher LED-drive currents, you can reduce the value

of R3 or increase the value of C1.

Testing a physical circuit shows good correlation with the simulation (Figure 3). Driving the isolated output from a 5V logic supply yields a good pulse waveform (Trace 1). The mains input is fed to the scope with a 15V isolation transformer for safety (Trace 2). You can use the persistence feature of the oscilloscope to show the zero-crossing point when zooming in to the transition (Figure 4). This approach allows you to accurately measure the pulse timing relative to the input zero crossing.

http://www.edn.com/article/520185-Mains_driven_zero_crossing_detector_uses_only_a_few_high_voltage_parts.php

Page 14: Zero Crossing Detectors and Comparators

VRS Zero Crossing discrete detector interface

This circuit was born out of much tinkering. I have gone through several revisions to get what you see here. The circuit has the minimum number of components that I could think of. I have experimented with different components and values for every part shown in the schematic, these are the best component values that I could put together.

For the true electronic purists, you will note that this circuit isn't a true zero crossing detector. It approximates a zero crossing detector.

This circuit is tuned to only emit a pulse for the positive Zero Crossing, thus making it more suitable for microprocessor interfacing. The circuit will trigger at about 500mv rms, which corresponds to about 1 rev/sec with Ford VSS sensors (8 pulses per rev).

D1 and D2 act as an input clamp. R1 is a current limiting resistor. Q1 is the zero crossing detector. R2 is a pullup for Q1. A smaller value results in a lower amplitude pulse because Q1 cannot conduct enough to overcome the resistor. Q2 is a darlington transistor to bump the current up enough to trigger U1's diode. The only critical value for Q2 is a current gain of 10,000 minimum. The current conducted through Q2 is only about 25ma, so surface mount components work for this too. R4 is a current limiting resistor for U1's diode. The darlington emits about 25ma with the 150ohm resistor, suitable to ensure that U1's diode is well on. R3 is a pullup for the collector follower of U1.

The circuit isn't a TRUE zero crossing detector, as the pulse width and leading edge vary with the input voltage. At normal values that you would use for automotive applications, the detector output pulse goes high at zero crossing and low at zero crossing. The frequency of the input and output waveforms is the same, there is just a little drift at low input voltages. You can see the drift in the waveform below. The phase difference is about 35 degrees at the low end, and less than 10 degrees at higher input voltages (see second screen).

Here is a parts list:

D1,D2 1N4733A 5.1v 1watt zenerR1 1k - 15k 1/4w (depending on VRS max voltage)R2 100k 1/4wR3 4.7k 1/4wR4 150 1/4wQ1 2N4401

2N3904

Q2 MPSA27 (TO-92)MPSA28 (TO-92)MMTBA14LT1 (SOT-23)NTE 46 (TO-92)

U1 4N35

Page 15: Zero Crossing Detectors and Comparators

GIF

Below are 2 scope captures of the circuit with a minimum input (8-10Hz) and a high frequency input. At very low input voltages the output pulse tends to shift the rising edge of the waveform. At higher voltages the pulse comes exactly at zero crossing.

Low voltage threshold

Page 16: Zero Crossing Detectors and Comparators

High frequency conversion

DIY - Isolated High Quality Mains Voltage Zero Crossing Detector  FEATURES:

AVAILABLE DOWNLOADS:

RESTRICTIONS:

- very accurate mains zero crossing detection- fully isolated and low voltage safe output- ultra-low power consumption; worst case power dissipation < 120mW- produces symmetrical pulses around the zero crossing- very low parts count, no precision components required- all components can be low voltage SMD- works over all mains voltage ranges (100VAC...240VAC), without any modification- both 50Hz (1ms ZC pulse) and 60Hz (0.83ms ZC pulse) mains frequency compatible- highly stable with varying temperature

  none  none (free use)

Page 17: Zero Crossing Detectors and Comparators

The Project

Modern electronic equipment are nowadays typically powered by switch-mode power supplies. Due to their high frequency operation, these PSU’s have no means of providing mains frequency (and/or phase information) for the low voltage electronics circuitry on the se safe low voltage secondary side. Devices such as lighting controllers, thermostats, motor drives and similar AC-load controlling or monitorin applications, often needs mains phase and/or frequency information. Adding an old type iron core mains transformer for this purpose would be both expensive and clumsy. A suitable zero crossing circuit is often needed. This DIY project presents one very clever variety of such a zero crossing detector, invented by the author.

Fig. 1 shows a low parts count and low power isolated ac-line zero-crossing detector circuit. 

OTHER KNOWN ZC-DETECTORSThe Design Idea “Isolated circuit monitors ac-line” published in EDN the 5th of July 2007, is primarily intended for mains line ac-voltage measurement, and is not optimal for efficient zero-crossing detection. The Design Idea “Improved optocoupler circuits reduce current draw, resist LED aging”, published 14th of December 2007, also suffers from unnecessary complexity and cannot produce the often required symmetrical zero crossing pulses for proper thyristor or triac firing.

THIS CIRUIT The circuit presented here produces constant and well defined zero crossing pulses, centered symmertically around the zero crossings, using very little power and just a few plain vanilla components. The pulse length is virtually independent of the mains voltage, is stable with temperature, and immune against component and optocoupler tolerances and aging. A perfboard prototype is presented in the picture.

DETAILED DESCRIPTION The zero crossing circuit consists of the voltage to current converting resistors R1-R2, full-wave rectifier diodes D1-D4, a voltage averaging and storing capacitor C1, the opto-coupler U1, and transistor Q1 that functions as a voltage compa-rator. R3 provides base current for Q1, and

Page 18: Zero Crossing Detectors and Comparators

doubles as an input voltage divider together with resistors R1-R2. R4 limits and sets the current into the opto-coupler LED. D5 provides a proper charge current path for C1, preventing the reverse-biasing of the Q1 b-e junction.

Transistor Q1 stays off during the majority of the mains cycle, during which C1 is charged via R1-R2 and D5. Q1 turns on and feeds current from C1 to the opto via R4, whenever the mains voltage (divided by (R1+R2)/R3) is lower than the voltage across C1. The voltage across C1 will reach within about 400ms an equilibrium that defines the final  operating point. The voltage across C1 never exceeds 10 volts with the given resistor ratios. The voltage stabilizes at a point when the average current charged equals the average current consumed. The typical pulse width is 1ms at 50Hz, and 0.83ms at 60Hz,when using the component values shown. The output pulse width is fairly constant, independent of the designated AC-line voltage (90… 240VAC). This makes this simple zero crossing detector quite unique, since the mains voltage does not affect the pulse width nor its position.

The circuit’s total power consumption is a mere 32mW at 120VAC, and barely 120mW at 240VAC.  The majority of this power is dissipated in the input resistors R1-R2. The peak current flowing into the optocoupler LED varies almost linearly with the mains voltage. This does not cause any inaccuracies to the zero crossing function, as long as the opto-coupler output is always allowed to saturate - even at the lowest mains voltage. This factor determines the minimum allowed value of the pullup resistor R5. The 4N35 optocoupler has a guaranteed CTR (Current Transfer Ratio) of 100%. If you use another optocoupler, please consider this when calculating the minimum value for R5. You cannot increase the current fed into the optocoupler led by decreasing R4, if you do not at the same time decrease the total resistance of R1 and R2 with the same ratio. The component values given here are optimized for the best signal quality at the lowest possible power dissipation.

C2 forms a first-order low pass filter to deal with the real world noisy power lines. By decreasing the 1/f frequency of this filter you can deliberately delay the ZC-pulse.  

All components are low cost and low voltage types (<10V), with the exception that R1 and R2 must sustain each half of the maximum peak mains voltage (200 volts). R2 can be omitted if R1 alone can sustain the maximum peak input voltage. In this case use a 390kohm standard resistor. Splitting the input resistor into two (halving the voltage handling requirement) makes it possible to use only SMD-components.

The oscilloscope screenshot shows the quality and symmetry of the output pulse. The "downhill" trace is the mains voltage at 20V/div vertical scale, zero volts is at the sceen centerline. The other trace is the output with a 5V/div scale factor. The timebase is 500µs per division. The output pulse is beautifully symmertic arount the mains zero crossing.

Even huge temperature variations have a minuscule effect on the zero crossing pulse, due to the “self-biasing” nature of the circuit. The tolerance of C1's capacitance has no effect either. The circuit’s resistor ratios set mainly the operation point, and that is the reason is why the output pulse is almost temperature independent.

The picture on the right is a simulated responce for two extreme mains voltages (100VAC...240VAC). You can see that the pulse width variation is minuscule, being less than 100us over the whole mains voltage range. Real behaviour of the actual circuit is equal.

Page 19: Zero Crossing Detectors and Comparators

OTHER USES  - LOAD MONITORINGSometimes you don't need to monitor the mains itself, but you need to monitor a controlled mains load. Also here the ZC circuit come in handy. An example is shown in Fig 2. Here a triac controls an incadescent bulb either on or off. With the help of the ZC you can monitor a shorted load, an open load, missing live voltage, and also that the triac is working properly. ¨

When the power to the load is switched off: There is always a small leakage current via the triac snubber, even if the triac is off. This current is effectively shorted by the load, thus the ZCD sees no voltage and does not produce output pulses when the load is connected. If the load becomes disconnected or the bulb filament has failed, then the snubber leakage current is high enough to produce ZC-pulses even if the triac is off. This way you can check the contidion of the bulb without adding cumbersome current measurement circuits, and get a warning if the load has failed.

When the power to the load is switched on:During this time the ZCD must produce pulses - if not - then the triac has failed or the live voltage is missing (possibly a blown fuse earlier in the circuit).

By combining ZCD information with the triac drive status, you will be able to detect failures in driving a load.  Any critical loads (such as alarm lights, traffic lights) can benefit from load monitoring.

Page 20: Zero Crossing Detectors and Comparators

OTHER USES - AC MOTOR MONITORINGRunning an 1-phase AC motor and knowing that the motor actually rotates can also easily be monitored by using two ZC detectors. This quite unique but simple idea using only two simple ZC detectors can actually monitor many types of failures, including; open or short circuits in any widning or wires to the motor, open or short circuits in the motor capacitor or its wires, relay, triac and fuse failures. Even a stalled rotor can be detected. Any of these failures will cause the motor not to rotate, and this condition can be sensed as explained below.

You need a microprocessor to perform the logic, but the circuitry is othervice simple. To power the motor on or off, you can use the circuitry in Fig 2, and use Fig 3 as the load. It is recommended to use a triac to control the motor power, and a relay (preferably two) to control the direction of the motor (if needed). To prevent relay contact damage the relay(s) should change state only when the triac is off and the motor standing still.

The first ZC detector that is connected straight across the input (between L and N) monitors the incoming voltage (and thus also checks the proper triac operation and the availability of the mains voltage or blown fuses). The second ZC detector detects the zero crossing BETWEEN the motor phases. This ZC pulse is time delayed from the mains zero crossing by a certain amount of time and depends on the motor inductance and motor capacitance tolerance. On a 50Hz mains frequency the phase shift of typically 90 degrees would produce a delay of about 5ms. Both ZC signals should be connected to a microprocessor's input capture pins. By teaching the microprocessor the time delay and it's allowed time variance, you can check with 100% certainty that the motor is rotating, even without any tachomerty feedback from its axle. Any failure mentioned above would either cause the pulses from the ZC detector (between the motor phases) to be missing completely, or the phase relationship referenced to the mains zero crossings to differ considerably. With the help of the microprocessor logic, you can thus build a rotation failure warning system for any mains operated 1-phase motor.

Amazing what you can achieve with only a few creatively inter connec ted components!

OTHER NOTEWORTHY OBSERATIONSThis zero crossing detector takes a while to start because C1 must first be charged to its equilibrium voltage. This takes about 200 to 400ms, depending on the mains voltage. However, after this period the circuit works normally and reacts immediately to missing mains voltage cycles.

This ZCD can thus be used for other specific purposes, for example as a missing mains cycle detector, as a pulse-length discriminator, as a AC-load monitor, as a mains fuse condition detector, as an AC-motor function monitor, to mention a few. Connecting the phase detector between the phases of a 1-phase motor will produce somewhat higher

Page 21: Zero Crossing Detectors and Comparators

voltages than the mains, and you have to make sure that the combined voltage and power rating of R1 and R2 is high enough.

This DIY page is still under construction. As usual, your feedback is more than welcome: SEND MESSAGE

http://www.dextrel.net/diyzerocrosser.htm