Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Zerocross detection problems ( mains noise )

Status
Not open for further replies.

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
I made a dimmer a while back and had problems with the zero cross detection due to mains noise and got tired of it and put it on the shelf. Normally it worked fine but sometimes it could make a sudden flash (once a week). The software is minimal and reliable so I think it is the zero cross, most of the times the mains look fine but sometimes it looks really terrible with lots of noise. So I was wondering if anyone have any idea how to filter it out in a clever way without beeing to complicated. I would preffer a short IRQ spike beginning right at zero cross and no false trigger on noise around zero cross. Could come from mains communication equipment etc.

MrEd
 

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
Thanks,
I have seen it before but it was intressting comments on the app.

MrEd
 

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
It is a Mosfet, IRF840 if I remember correctly. Used over a bridge, wanted to test two in series to skip the bridge but never got that far.

MrEd
 

woodooman

Member level 1
Joined
Jul 26, 2001
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
deep forest
Activity points
216
It's very interresting for me!!!
I am building probably very similar dimmer (with IRF840). I use PIC12CE519 for controlling and for zerocross i test 3 easy circuits, but i don't test it for noise problems over line. What is your control device??? SLB0587 or any other???
 

woodooman

Member level 1
Joined
Jul 26, 2001
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
deep forest
Activity points
216
It's very interresting for me!!!
I am building probably very similar dimmer (with IRF840). I use PIC12CE519 for controlling and for zerocross i test 3 easy circuits, but i don't test it for noise problems over line. What is your control device??? SLB0587 or any other???
 

whoops

Junior Member level 2
Joined
May 30, 2001
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
177
As zero crossing detector I use a double phase rectifier with two diodes, resultiging voltage applied to a comparator with REF level set low.
at the microcontroller I check if the comparator output is low for while to prevent triggering at false edges.
This is working now for many years withot problems.

Whoops
 

woodooman

Member level 1
Joined
Jul 26, 2001
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
deep forest
Activity points
216
On 2001-08-17 16:46, whoops wrote:
As zero crossing detector I use a double phase rectifier with two diodes, resultiging voltage applied to a comparator with REF level set low.
at the microcontroller I check if the comparator output is low for while to prevent triggering at false edges.
This is working now for many years withot problems.

Whoops
I agree, one solution is time window, because you know freq. But for this solution you must use own uC (I think).
 

aNdreiBuuu

Full Member level 4
Joined
Apr 30, 2001
Messages
223
Helped
25
Reputation
50
Reaction score
12
Trophy points
1,298
Location
moon
Activity points
1,811
use an optocoupler and U have +2 features:
1. optoisolation
2. the trigger window made by optocoupler LED...

best,
//a
 

padspcb

Member level 4
Joined
Apr 28, 2001
Messages
77
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Earth
Activity points
828
Hi
I've implemented an easy 0 xing using a resistor on a 508 input pin. when it changes, i calculate the time for the next change and get a mean time in cycles. to start the triac i just place a wave through a cap to the gate. also dimming is possible, but with those pl lamps will not work
 

padspcb

Member level 4
Joined
Apr 28, 2001
Messages
77
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Earth
Activity points
828
Hi
I've implemented an easy 0 xing using a resistor on a 508 input pin. when it changes, i calculate the time for the next change and get a mean time in cycles. to start the triac i just place a wave through a cap to the gate. also dimming is possible, but with those pl lamps will not work
 

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
For "normal" situation it is fine with any kind of window compararor or simple zero cross detection but for 100% proper detection it is not enough. Put your scope on mains (use an isolation transformer!!!) you will see that , not always, that there is quite a lot of noise that has to be filtered out.

Woodoman, I used an Atmel 2313 to decode DMX 512. Compared to the 89C2051 I used earlier there is plenty of time for other things like preheat ,softstart, rise time reduction on heat etc. Nice when there is spare time on a processor for other goodies,

Check out the CoolMos FET series from Infineon, really low RDSon for low heat with bigger loads. Unfortunately they are quite expensive. Anyone know of any other FET nowadays?

MrEd
 

Attachments


woodooman

Member level 1
Joined
Jul 26, 2001
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
deep forest
Activity points
216
OK, i make only "low-cost" dimmer, doesn't based on DMX512, which is built into switch device (sometimes there is very small room :sad: ) AT2113 is nice, but expensive and BIG. What you mean about new PIC18F0xx series from Microchip???
 

tanuki

Member level 5
Joined
Jun 11, 2001
Messages
92
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,288
Location
Spain
Activity points
841
MrEd:

Since you have a uC in the existing design. Code a Digital Phase Lock Loop (DPLL) that will at power on initially and jump to the line frequency and then change only very slowly there after. It should clean up the noise problem completely.

_________________
Best regards,

Tanuki

<font size=-1>[ This Message was edited by: tanuki on 2001-08-18 15:15 ]</font>
 

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
Good idea!
I will try that, there is still some space left. I have seen hardware circuit for that but that was for an UPS and probably to sync it to mains again when power comes back.

MrEd
 

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
Thanks,

I was thinking, to do more channels at good resolution, 8 bits is not good enough for small loads. You can actually see the steps, to learn VHDL and do something with lots of 10bit timers. A processor normally have up to 3 timers, so with an additional chip taking care og the ouputs and triggering one could do many channels with a minimum of chips.

How hard is it to get going with VHDL designs? I've seen plenty of posts but don't know anything about it and where to start. Anyone knowing of a simple start design and easy to learn software to get up and going, prefferably something with a flash chip?
Are Atmel good at this? they are good at flash.

With the software availble through elektroda I have a good chance to learn how to use it. Anyone got any first hints where to start and which program for it.

MrEd
 

Slammer

Member level 3
Joined
Aug 3, 2001
Messages
56
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,286
Location
Ios Island
Activity points
330
Some versions of MOC3041 optotriac have zero-crossing circuit build in.
I am always using the MOC3041 directly to MCU pin and then a large TRIAC fired by MOC.
Never had problems with this configuration and requires nothing from the side of MCU.

I think this configuration is the best if you want to ON/OFF a triac from MCU.

Greets
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top