• AVR Freaks

Opto isolated Zero cross detector

Page: < 1234 > Showing page 3 of 4
Author
F4brizio
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2011/10/26 21:06:48
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2011/10/27 18:22:51 (permalink)
0
Ty fdanoo

The above circuit works well.I placed a 22k resistor instead 10k.
Optocoupler = 4n25

ty again Smile
#41
rpg7
Super Member
  • Total Posts : 1383
  • Reward points : 0
  • Joined: 2003/11/07 12:47:35
  • Status: offline
Re:Opto isolated Zero cross detector 2011/10/27 22:21:07 (permalink)
0
F4brizio
But why will be 4.8W??
It's on 120AC main

Mmm, in my part of the world it is 220V.
V squared / R

#42
F4brizio
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2011/10/26 21:06:48
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2011/10/29 15:10:06 (permalink)
0

I use 2(39k instead 22k) resistors in parallel to dissipate the heat.
Now it's working better.
The Zcross is a nice square signal and the rising/falling time it's less than 250us, maybe it could be improved.

Ty

regards!!


functional circuit attached
120 VAC 
post edited by F4brizio - 2011/10/29 15:15:39

Attached Image(s)

#43
shoeb
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2010/03/20 10:18:20
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/06 01:42:38 (permalink)
0
I simulated Ian.M's circuit in Proteus and got the following -

Attached Image(s)

#44
shoeb
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2010/03/20 10:18:20
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/06 01:59:35 (permalink)
0
It shows inaccurate zero crossing detection. How can I get more accurate output?
#45
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/06 02:17:32 (permalink)
0
That's pretty good considering that you are underdriving the optocouplers by over an order of magnitude.  The original circuit was a minimum parts count solution to getting timing information for triac firing from a 240V RMS AC mains supply.   The amount of energy in the tails of a half cycle of AC is insignificant so a small delay is quite tolerable so long as it is symmetric.   This thread may appear a bit disjointed as the moderators have recently purged the forum of a number of trolls and all their posts, but if you read it carefully you will see there is a steep tradeoff between dissipation in R1 and quality of the output signal.
#46
shoeb
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2010/03/20 10:18:20
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/06 09:17:11 (permalink)
0
Yes, this occurred due to low magnitude of AC. To get TRIAC firing signal for dimmer, there should have zero detection for both way positive to zero and zero to negative. Here is the desired waveform. How such output can be obtained?

Attached Image(s)

#47
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/06 12:12:33 (permalink)
0
Shoeb, of course you're aware of the "simpler" (though not optoisolated) method, involving a 1MOhm resistor straight to a PIC's pin that has Interrupt-on-change feature and reversable edge...

It works pretty well.

GENOVA :D :D ! GODO
#48
shoeb
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2010/03/20 10:18:20
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 01:43:51 (permalink)
0
Yes, I headed it but confused how PIC's pin handle such large voltage? Connecting 1M Ohm resistor directly from AC to PIC pin does not reduce the voltage to 5v at PIC pin. So, how does it work?
#49
rpg7
Super Member
  • Total Posts : 1383
  • Reward points : 0
  • Joined: 2003/11/07 12:47:35
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 02:35:13 (permalink)
0
shoeb
Connecting 1M Ohm resistor directly from AC to PIC pin does not reduce the voltage to 5v at PIC pin. So, how does it work?

It does reduce it. The PIC has internal diodes on the input from VSS - input pin - VDD and these conduct when the pin exceeds the VSS-VDD range. With a 1M resistor the current will only be a fraction of a milliamp, well within the capabilties of the input circuit.
#50
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 04:09:03 (permalink)
0
Yep, as RPG said Smile

GENOVA :D :D ! GODO
#51
julian_lpp
Senior Member
  • Total Posts : 137
  • Reward points : 0
  • Joined: 2011/05/02 10:55:36
  • Location: Argentina
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 10:37:43 (permalink)
0
wow, this thread has certainly grown.

In my case, I just assembled the 1Mohm (3 * 330k see Ian.M tip!) kind of circuit, and it worked well enough. However It seems to me that the line in which I tested the circuit had some strange noise, cant confirm wheter it was a software or line problem.

The sad thing of the history is that incandescent lamps are now gone in my country (from December 2011 it is forbiden to sell them in shops) so I'll have to take another path to dim a lamp. I was trying to build a cheap decorative "candle effect" lamp.

Now I'll be looking to pwm a 12-24v DC car-lamp, or .... dimming a fluorescent lamp (which I guess isnt the same as with an incandescent one). Neither of two options compare in price with the 1Mohm/incandescent lamp device though

regards,
julian


#52
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 10:50:24 (permalink)
0
You can probably still get oven lamps if you want to experiment with dimmer circuits and *MAY* be able to get halogen lamps.  Most countries that have introduced this sort of ban have simply prohibited incandescent lamps that fit a normal fixture.  If you try to dim a compact fluorescent the results are not very satisfactory and the lamp has to be dimmer compatible or it can even be dangerous.   For serious lighting that can be PWM controlled, look at LED lights. 
#53
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 14:03:21 (permalink)
0
Yep, as Ian says.

The Halogen ones are being sold in Italy as "temporary replacement" (IMO) and they *should* work like standard lamps - not tried though.

GENOVA :D :D ! GODO
#54
Ian.M
Super Member
  • Total Posts : 13225
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/07 14:23:33 (permalink)
+2 (1)
Beware of dimming Halogens too far. If the bulb or inner capsule wall falls below 250 deg C the halogen cycle fails to scavenge deposited Tungsten atoms effectively and without a saturated cloud of tungsten atoms round the filament, the filament will very slowly evaporate and eventually fail while the glass surface gets more and more opaque. See the first few pages of this guide from Philips.  Time at full power will to a great extent reverse the undesirable deposition on the glass if it is not too severe, but the filament life will still be reduced somewhat.

The 100W Halogen A bulbs are excellent replacements for 150W conventional bulbs and the 75W ones are better than a conventional 100W bulb.


#55
DarioG
Allmächtig.
  • Total Posts : 54081
  • Reward points : 0
  • Joined: 2006/02/25 08:58:22
  • Location: Oesterreich
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/08 04:25:51 (permalink)
0
Yeah I'm aware about the better efficiency ratio.
Thanks for the hints about their "use", Ian! Will see , at the moment I have tons of old lamps in store...

GENOVA :D :D ! GODO
#56
voyager
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2012/01/23 06:02:58
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/23 06:38:33 (permalink)
0
I tested this one. it works pretty good.
Only one opto-isolator is needed.

Attached Image(s)

#57
dr pepper
Starting Member
  • Total Posts : 90
  • Reward points : 0
  • Joined: 2010/09/02 22:21:59
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/01/23 12:16:22 (permalink)
0
Look like a decent circuit, make sure the bc547's are bc547c's, a bc547a might not take the volts and go collector emitter short.
mpsa42's might be a better choice.
I've recently built a circuit that uses a dekatron which runs at 420v, I need to know when one of its outputs (also at 420v) is activated, I did this through a divider so that 420 divides dwon to 5v through a resistor pair, to protect the input theres a 1n4148 to +5v, it works well.
You need the resistors to be a high enough value not to allow enough current through to pull up the +5 supply, but not so little not to be able to drive the input to logic hi.

Note doing this means your whole circuit is at dangerous volatages, also your schematic shows one side of the power line going to ground, is this a mistake?, this used to be a practice with valve radios but not something that really should be done these days.
#58
sam781
Junior Member
  • Total Posts : 94
  • Reward points : 0
  • Joined: 2012/01/10 11:59:25
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2012/12/17 08:24:02 (permalink)
+2 (1)
I've just made zero crossing detector by connecting three 470k series resistor from 230v ac source to the PIC's Ext Int pin. Zero crossing detection is perfect. But the problem is the whole circuit becomes dangerous as testers detects AC presence. Whenever I touch tester it gives light. It is due to the direct connection from AC to PIC. I simulate the simple opto isolated zero crossing detector circuit given by voyager in proteus which does not give good result. :(
#59
sam781
Junior Member
  • Total Posts : 94
  • Reward points : 0
  • Joined: 2012/01/10 11:59:25
  • Location: 0
  • Status: offline
Re:Opto isolated Zero cross detector 2013/01/11 14:00:31 (permalink)
0
@voyager: What is the function of diode across the optocoupler input terminal (post#56)? What will happen if it is not used?
#60
Page: < 1234 > Showing page 3 of 4
Jump to:
© 2019 APG vNext Commercial Version 4.5