Previous in Forum: Is it Possible to Joint 3 Cores With Steel Wire Armour to 3 nos. of 1 Core   Next in Forum: NGR Question
Close
Close
Close
32 comments
Rate Comments: Nested
Power-User

Join Date: Nov 2010
Posts: 277

Zero Crossing Detector at 230 V AC Mains

11/14/2011 12:41 AM

Can anyone tell me if there is an IC which works as a zero crossing detector which can work directly at AC mains (230 V)? Ordinarily, I would use a step down transformer, but transformers make the circuit bulky and thats what I don't want.

On the other hand, I came across this on the net:

Does this circuit look like it will work? I feel uneasy about directly connecting the diodes to the mains, just after a 56k resistor. Better still, I would like to know the name of a zero crossing detector IC which works directly on 230 V AC, if anyone may have used it or come across it.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#1

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 6:25 AM

I am not worried about the 1N4007 diodes - there are millions similar buried in "compact fluorescent lamps". I am more worried about the 56k. Not in principle, but it must be good for 250 VAC , which you will only get reliably in wire ended 1/2 watt or greater type.

Neither circuit seems foolproof to me - I doubt the second ensures switch at zero and the first looks like trouble, driving BC547 base with 1 megohm.

They probably worked OK to get pulses for frequency counting, but really good for actual zero cross.

Must go out, no time to comment immediately.

67model

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#2
In reply to #1

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 11:26 AM

Here is another idea I though of, not sure if its actually sound. But here goes: I though I could use a clipper circuit to the mains, and "clip" the amplitude to a much lower value. After that I could phase shift the signal by 180 degrees, compare it with the original signal using a comparator.

The only values for which it will be equal are when they both hit zero (or close to it, when they 'cross'). That is when the comparator will give an output - thus detecting the zero crossing.

I would like members' comments on this logic. The one thing I am not sure of is connecting a clipper circuit directly a voltage as high as mains (230 V AC). Also, that I would need to phase shift it precisely by 180 degrees. Both these are doubts I have in my mind.

I would use the above circuit (displayed in my first post) if I am sure it would work, or if I can get more opinions on its possible flaws and ways I could fix that.

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#3
In reply to #2

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 4:28 PM

there are chips that have built in '0' xing detectors. here is a link to 1 such chip which i used to drive an induction motor (speed control) with tacho feedback. http://www.datasheetcatalog.org/datasheet/motorola/TDA1085CD.pdf

There are others, I just forget which one I used for a light dimmer (UC.... something), it worked very well and was only $2 in small Qty's.

If you are after something more complex, I have a very good circuit that provides 4KV isolation. It uses a very small pulse transformer.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#8
In reply to #3

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 12:17 AM

Thanks Stephen, I will try searching for it. Even if an IC exists, they need to have it in the shops here.

Complex or simple, I need the zero crossing to work and have a longlife.

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#9
In reply to #8

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 12:23 AM
Register to Reply
Guru

Join Date: Jan 2008
Posts: 1753
Good Answers: 59
#4

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 10:35 PM

Your premises are incorrect, that's all. It is like beauty, riches and health. And you can have any two of three. You want to sense it? Sense it thru resistors or a transformer. Semiconductor inputs are low voltage, low current, normally. Power semiconductors output is for high voltage and current.

You have a really long way to grasp things.

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#5
In reply to #4

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 10:48 PM

The TDA1085 (like the TDA2086) connects directly to the mains via a current limiting resistor. Define what is the application (light dimmer, powersupply, motor drive...), and I'm sure there is a simple solution.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#7
In reply to #4

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 12:13 AM

I can always sense it through a transformer if I have no other option left. Its not what the question of this discussion is.

Register to Reply
Guru

Join Date: May 2010
Location: Metro.Manila, Philippines.
Posts: 1271
Good Answers: 27
#12
In reply to #7

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 9:31 AM

Since you have not shared what, where or how you intend to use the application you have in mind and to gain some hands-on sense of what you want to accomplish, why not put together the circuit(s) you have in mind, using whatever parts available in your shop rather than speculate on a lot of wonderful things???

__________________
vsar
Register to Reply Score 2 for Off Topic
Guru

Join Date: May 2007
Location: Geelong, Australia
Posts: 1084
Good Answers: 54
#6

Re: Zero Crossing Detector at 230 V AC Mains

11/14/2011 11:38 PM

I've used a similar circuit without the Q2 for years on a homebuilt spot welder. it used the bridge, resistor & opto isolator to generate the pulses used for timing.

Just be careful with the resistor sizes, depending on the voltage they can dissipate a bit of heat.

As usual, if you don't know what you're doing don't work on anything when it's live.

__________________
If there's something you don't understand...Then a wizard did it. As heard on "The Simpsons".
Register to Reply
Guru

Join Date: Oct 2006
Location: Surrey BC Canada
Posts: 1571
Good Answers: 42
#10

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 2:00 AM

There are lots of circuits that will work in the lab, but depending on your application AC line distortion and noise may cause the circuits to behave erratically. You may want to add a phase lock loop into your design to suppress spurious noise pickup.

A simple voltage comparator IC can be used for ZC if you take your AC line input through a voltage divider referenced to ground and ground refrence you circuit in general. Be sure to use additional diodes to clamp the inputs to the +/- powersupply rails so you don't overvoltage on noise and spikes. An input MOV can also help damage from noise spikes.

In the real world no sign wave is pure, and there can be all sorts of noise, especially at high frequencies.

Register to Reply
Guru

Join Date: Feb 2006
Posts: 1758
Good Answers: 6
#11

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 9:29 AM

Both are the same but Common/Ground connections shown are confusing.marked xxx

While in this is clearly shown the Isolated [Opto-Isolator + totally Isolated supply for output circuit

Register to Reply Score 1 for Good Answer
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#13

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 12:59 PM

OK, let's have a look at the circuit image in Jay's original post...

  1. The opto-coupler diode is driven by a full-wave rectifier from 230V rms AC sine wave via 56k + 56k + 10k resistors, so the mean current in the opto is 230 x 0.9/122k = 1.7 mA.
  2. On the output side of the opto, there is 50k load with 5v supply, so maximum current is 5/50 = 0.1 mA. If the switch point of the MCU is 2.5 V, this would be 50 μA opto transistor current.
  3. So transistor Q1 has to sink almost 1.7 mA to steal all the current from the opto diode ( assuming current transfer of 100% for the coupler).
  4. Since the minimum gain for a BC548 is specified as 110 @ 2 mA, Q1 must have a minimum base current of 1700/110 = 15.5 μA to turn off the opto drive.
  5. Resistor Rb, 1 meg, will drop 15.5 volts at this current. So the voltage at D5 anode will be 16V (adding 0.5 V for Q1 base-emitter).
  6. But D5 will only get (56 + 10)/122 = 0.54 of the 325 volts peak of the 230 rms input. So the switch point is 16/0.54 = 29.6 volts + bridge voltage drop 1.2 V = 30.8 volts - not zero crossing.
  7. The sine of the error angle from 0 is 30.8/325 = 0.095, making 5.5 degrees off zero.
  8. In application terms, if the idea was to switch a triac at zero volts to avoid fast voltage/current steps radiating noise, one would actually be making a 30V step.
  9. The current gain range for a BC548 is specified as 110 - 800 at 2 mA. It is possible to get 800 in the prototype, find the performance is good. Then 1000 are ordered, the BC548s come in with a gain of 110 and you have assembled 1000 noisy products!

So, I would make Rb much lower, say 100k. Also putting the opto diode in series with Q1 collector would bring down zero-cross base current ( a zener shunt to ground, to clamp voltage while Q1 is off may be needed - the emitter-base junction of a BC547 etc makes a good 6V approx zener).

If you want real simplicity, take away Rs and D1-D4, make Rb 100k + 100k, in series, and Rp 56k + 56k in series. Put a diode (e.g. 1N4148) from base-emitter of Q1 to stop high reverse voltage (cathode to base).

The output will be a square wave with its edges at the zero-crossing times - it does have the merit that you can tell positive-going zero from negative-going - uni-directional pulses do not do that.

N.B. The purpose of two resistors in series is to increase voltage rating - typically wire-ended 1/4 watt will have max rating of 250V rms and 1/2 watt 350V rms, with temporary overload of twice rating for a few seconds. The short voltage spike withstand level is not often mentioned, but domestic mains can see 5 kV spikes - if you want the equipment to work for years, it helps to take that into account.

You have not specified how you are using, or for what purpose, the required zero crossing, so the "edges" may serve OK.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#14
In reply to #13

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 10:54 PM

Will be using it for an application like a light dimmer. Is this what you had in mind?

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#15
In reply to #14

Re: Zero Crossing Detector at 230 V AC Mains

11/15/2011 11:11 PM

I have a complete off line light dimmer cct. I will dig it out and post it (if I can work out how). Basically it uses a chip similar to the TDA1085 and uses a true RMS detector to provide feed back for the regulation error amp. Mind you, one would probably be better to use some more recent switcher technologies. Here you don't need to worry about the 0 Xing part.

Register to Reply
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#16
In reply to #14

Re: Zero Crossing Detector at 230 V AC Mains

11/16/2011 7:05 AM

I meant 1N4148 from base to emitter of the BC547 and the diode of opto in series between BC547 collector (cathode) and 10k resistor Rc(anode).

If you are driving a Triac for lamp dimming, do you need opto-coupler for isolation?

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#20
In reply to #16

Re: Zero Crossing Detector at 230 V AC Mains

11/24/2011 5:19 AM

I may use it for other things, for now I need to a circuit that can give me a zero crossing from the mains.

Sorry for having misread the modifications you mentioned. I hope I got them right this time, is this what you are suggesting? :

If yes, I could give this circuit a try.

Register to Reply
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#21
In reply to #20

Re: Zero Crossing Detector at 230 V AC Mains

11/24/2011 1:49 PM

You have shorted out the opto-diode! It should really be like this...

... and you have drawn the 1N4148 as a zener diode (it should be drawn like D5).

Do not forget that with this circuit, one zero cross (negative going AC2 to AC1 common) is at the positive-going edge of the square wave at "Out" and the other (AC2 going positive to AC1) at its negative-going edge.

For best safety, the AC1 line should be the supply neutral (low voltage to earth at opto-coupler), not the live of a single phase domestic supply.

Register to Reply Score 1 for Good Answer
Power-User

Join Date: Nov 2010
Posts: 277
#24
In reply to #21

Re: Zero Crossing Detector at 230 V AC Mains

11/25/2011 1:51 AM

Thanks for the correction! I understood what you meant though, didn't erase that line.

I am going to try this, but do the resistors have a chance of burning? Will it work for long?

Register to Reply
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#26
In reply to #24

Re: Zero Crossing Detector at 230 V AC Mains

11/25/2011 9:28 AM

Maybe it's a "typo", I only just noticed it, D5 is marked 1N4002 (only 200V peak inverse voltage rating).

It must be 1N4007 (1000 PIV).

In your original circuit, D5 is not necessary- and the only reason it did not fail is it never gets any reverse voltage - the bridge only gave out a positive voltage

For the 100k resistors in series... current = 230/200 milliamps = 1.15 mA, therefore watts loss = 1.15 x 230 = 265 milliwatts - which is 265/2 = 133 milliwatts each.

For the 56k resistors (since same voltage as 100k) 133 mW x 100/56 = 236 mW each (full wave) - however, since only half wave, the average is halved i.e. 118 mW each.

As I wrote, 1/2 watt resistors are recommended because their voltage rating is higher than 1/4 Watt type. Often the "1/2 watt" are now 0.6 watt at 70 Celsius ambient.

Have a look at the data sheet.....

http://www.rapidonline.com/pdf/62-2002e.pdf

- which I got by clicking on the adobe PDF logo in the Datasheet column of Rapid's list for MF60 resistors.

If you use metal film resistors, which are common nowadays, they should not burn. But if you use carbon resistors, these can burn - although the film type have only a thin carbon film on a ceramic core, so there is not much to burn. Small things the size of 1N400x diodes and 1/2 W film resistors on 230V AC mains just go "pop" leaving a bit of charred debris, they are much weaker than fuses.

How long? At 125 mW an 0.6W resistor may only have 10 degrees rise above 25 Celsius ambient, surface temperature 35 degrees compared to 155 rated continuous. Everything else is running cool too - is 20 years enough?

Register to Reply Score 1 for Good Answer
Power-User

Join Date: Nov 2010
Posts: 277
#27
In reply to #26

Re: Zero Crossing Detector at 230 V AC Mains

11/26/2011 8:00 AM

More than enough .. we'll have a new technology in place by then

Register to Reply
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#28
In reply to #27

Re: Zero Crossing Detector at 230 V AC Mains

11/26/2011 12:21 PM

Sorry to bring in a change. I looked at the data sheet for 4N35. Its turn-off time with 50 k load is 0.5 millisecond! It will be a bit late for zero-cross!

That figure is with 10 mA input, so it should be much less with 1 mA or so - the graph shows 10 microsecond with a 1k load (10 mA collector current = opto-diode current). A 10k load resistor, in place of 50k should speed it up a lot, a 100k resistor from base to collector of the opto-transistor also helps - but reduces ON collector current. The long time to turn off is mostly because the transistor is overdriven into saturation when on, the charge in its base has nowhere to go when the light stops, it hangs around till the tiny base current removes it.

Have a look 4N35 at... http://www.datasheetarchive.com/ ..... enter what you want in the search box, you then have to scroll down a lot to get past the advertisements, then click on an adobe (pdf file) symbol at right of list, then the image of the data sheet. It is a useful source, it includes obsolescent types, not just the latest for sale.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#29
In reply to #28

Re: Zero Crossing Detector at 230 V AC Mains

11/27/2011 9:10 AM

The 4N35 is only for the circuit diagram. The actual opto-coupler IC I am using is MCT2E 827Q (white package). What changes would come given its specifications?

http://www.datasheetcatalog.org/datasheet/fairchild/MCT2E-M.pdf

Register to Reply
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#30
In reply to #29

Re: Zero Crossing Detector at 230 V AC Mains

11/27/2011 1:27 PM

The transfer ratio of the MCT2E is only 20% minimum, compared to 100% for 4N35. This means that with an input current of only 0.7 mA to diode, transistor will only give 0.7 x 20/100 = 0.14 mA.

Also the data sheet shows transfer ratio falling a lot below nominal (10 mA input test) at 0.7 mA (estimated minimum current at transistor BC547 turn-off).

So 50k with 5V supply (N.B. 5 volt/50kohm = 0.1 mA) would be barely fully drivable by opto-transistor.

If the circuit is working OK, the voltage measured by a DC meter at the microcontroller input would be +5V to common with no AC at the mains input, but 2.5 V with mains applied, because there will be a square wave, which has a mean value of 1/2 the peak. If the output is not going down to 0 volt for 1/2 of time, as it should, the meter reading will be more than 2.5V.

This works well with a moving coil meter, but a DVM can give a fluctuating reading because they sample in a window of several mains cycles width according to their own clock. If mains frequency is off normal whole cycles are not sampled - a bit of the square wave may be missed or added according to phase.

Also the DVM loading is often 1 megohm, which reduces peak voltage with 50k load. If you measure across 50k resistor, this problem is avoided, but less than 2.5V reading means trouble.

To raise the drive, the 56k resistors would need to be reduced to 27k, with 1 watt rating.

With a "one off" board, one can adjust the resistance till the meter reading deviates from 2.5V, then halve the value to give 100% margin for deterioration of the opto-coupler with time.

Are you really driving a CMOS MCU with infinite input resistance??

If not, its load resistance/current must be added to the opto-coupler load.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#25
In reply to #21

Re: Zero Crossing Detector at 230 V AC Mains

11/25/2011 2:01 AM

"and you have drawn the 1N4148 as a zener diode (it should be drawn like D5)."

Sorry, I was under the impression that IN4148 is a zener diode.

Register to Reply
Member

Join Date: Jun 2011
Posts: 6
Good Answers: 1
#17

Re: Zero Crossing Detector at 230 V AC Mains

11/17/2011 3:18 PM

2 things you could do to vastly improve performance of the circuit:

1) use a DC-DC converter to remove the need for the circuit to self power the front end of the led. a 5vin 5vout isolated 1/2 or 1 watt converter (whatever you can find that's small because you only need 5 - 10 ma to drive the led - pay attention to minimum load requirements of the converter).

2) even better get rid of the opto coupler and replace with a digital isolator like the Si8650 or similar. you need the dc-dc converter to power this. now you can get a very narrow pulse around the cross point with a very sharp vertical edge.

At that point you could probably simplify the rest of the thing immensely. It will cost more mainly due to the DC-dc converter, but if your only building a small qty, you can probably find what you need from surplus places for a buck or 2.

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#18
In reply to #17

Re: Zero Crossing Detector at 230 V AC Mains

11/17/2011 4:22 PM

Couldn't find the complete circuit, however I did find the main chip I used, it was a U2010B and Mouser have them for $150. Every part of the circuit is at mains potential and not need for transformers.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#19
In reply to #18

Re: Zero Crossing Detector at 230 V AC Mains

11/24/2011 5:01 AM

Sadly, thats way beyond what I can afford and I doubt such a costly chip is even for sale here. But thanks for searching :)

Register to Reply
Member

Join Date: Nov 2011
Posts: 7
#22
In reply to #19

Re: Zero Crossing Detector at 230 V AC Mains

11/24/2011 3:52 PM

Just realised I left out the DP in the price (should read $1.50). Sorry for the mistake.

Register to Reply
Power-User

Join Date: Nov 2010
Posts: 277
#23
In reply to #22

Re: Zero Crossing Detector at 230 V AC Mains

11/25/2011 1:38 AM

Haha..lol. sounds more reasonable now

Register to Reply
Participant

Join Date: Dec 2011
Location: Northland New Zealand
Posts: 4
#31

Re: Zero Crossing Detector at 230 V AC Mains

12/01/2011 5:28 PM

http://www.datasheetcatalog.org/datasheet/motorola/CA3059.pdf

Use triac gate control as output. 230V AC has 20k ohm 4w dropper resistor as supply. Very simple and reliable IC. Have seen it used in blood warmers for operating theatre use so must be reliable.

Stardust

Register to Reply Score 1 for Good Answer
Guru

Join Date: Dec 2010
Posts: 1686
Good Answers: 116
#32
In reply to #31

Re: Zero Crossing Detector at 230 V AC Mains

12/02/2011 7:06 AM

Good suggestion! CA3059, unfortunately, came up as obsolete at Mouser.

However, they have UAA2016, which is about GB£1-00 each and throws in a temperature control etc loop along with zero-crossing pulses (100 microsecond wide, centred on zero), all in 8 pin package.

http://uk.mouser.com/Semiconductors/Power-Management-ICs/_/N-wnwh?Keyword=zero+voltage&FS=True

ATMEL T2117 looks very similar to UAA2016.

Register to Reply
Register to Reply 32 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

67model (8); ffej (1); GW (1); Haajee (1); Jay_ (11); leveles (1); pm (1); Stardust (1); Stephen Brown (6); vsar (1)

Previous in Forum: Is it Possible to Joint 3 Cores With Steel Wire Armour to 3 nos. of 1 Core   Next in Forum: NGR Question

Advertisement