NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Best zero cross detection IC

January 04, 2012
by met_fredrik
met_fredrik's Avatar

Hi! As the title says I need a zero cross detection ic. I have looked at the IL300 but it seems unnecessary to use this as it has two diodes separately.

Datasheet

Anyone got some good ideas? I will detect from 230VAC50Hz, and the output should be within the range 0-5V so I can read it with my nerdkit!

Thanks!

January 04, 2012
by met_fredrik
met_fredrik's Avatar

And just to add some more of what the project is all about: I am building a light dimmer with an ATtiny85, MOC3021 optocoupler and bt136-600E TRIAC.

At first I will only turn the lights on and off, and then move on to the dimming.

When all of this is done I plan on making it draw power from the mains, make it as compact as possible and with rf/tx capabilities. It is going to communicate with a RaspberryPI server which basically makes it able to communicate with whatever I want. What do you think?

January 04, 2012
by rajabalu21
rajabalu21's Avatar

Try MOC3041 from Fairchild.

-Raja

January 04, 2012
by treymd
treymd's Avatar

Agreed on the MOC30X1 series, I'm using a 3041 in my SSR experiment now. There is a ton of info on this on tthe forums at doityourselfchristmas.com fyi. The renard series has quite a few solid state relay boards that are separated from the pic based controller board. I intend to make myself an AVR version of the controller board. Concerning the TRIAC. For your own safety make sure that you know if the tab on your triac is isolated or not, and take specific precautions if it isn't, touching a live tab may just ruin your day or more. The BTA series are all isolated, while the BTB series are not, I am unsure about the BT136.

Oh, and if you use a zero cross opto, you cannot dim if I understand correctly. You will eventually want to use a random phase opto and use something like the H11A1 to fire an interrupt on your MCU at the zero crossing. This is how the renard boards work.

January 04, 2012
by treymd
treymd's Avatar

After reading my datasheets I see that the 3021 you are using is random phase, while the 3041 is zero cross, so It appears you already know about the need for random phase in dimming and are one step ahead of me.

January 04, 2012
by treymd
treymd's Avatar

Actually I think the H11AA1 Is what you are looking for. On the renard board I am looking at building, they step down the mains voltage with a transformer, and then feed it into the H11AA1, with the output going to an IO pin on the MCU. The transformer is also used for the circuit power supply (after passing through a bridge caps and voltage regulator of course).

January 04, 2012
by Rick_S
Rick_S's Avatar

I built a renard ss16 this year but didn't use it. Maybe next year BigGrin I keep thinking I'm going to do somethig AVR wise with the renard protocol, but havent.

Future projects.

Rick

January 06, 2012
by met_fredrik
met_fredrik's Avatar

Thanks for a load of answers!

I am thinking about the H11AA1 as I have found some references of other people using it. But how would I connect it to the mains?

For the MOC3021 I will use a 100ohm resistor right on. But whats the way to go with the H11AA1? It's just making me unsure since this is actually going to draw current to the LED inside.

January 06, 2012
by met_fredrik
met_fredrik's Avatar

Okey, so I am going to use a 15k resistor on each of the main wires in to the optocoupler after reading an article about detecting zero crosses. Any inputs on how to correctly calculate what resistor wattage I need? :)

January 06, 2012
by Rick_S
Rick_S's Avatar

Honestly, if you don't know what you are doing with a project like this, it isn't a very wise decision to do it at this point. Household power is not something to be taken lightly. You shouldn't even put this on a solderless breadboard technically if you plan to light a 120v light bulb because most will draw more current than the breadboard is designed to handle.

I know you'll probably ignore my warnings... I probably would too, but by all means, be very careful.

The safest way by the way to detect your zero cross is through the use of a transformer that drops the voltage down to something more reasonable like 6 - 9VAC. This can easily be fed into a optocoupler to get your trigger. BTW, this comes from experiance. Notice my avatar, that is the scope reading of a zero cross circuit I built some time ago to make a light dimmer.

Rick

January 06, 2012
by met_fredrik
met_fredrik's Avatar

I appreciate your concerns! I will be careful, and I do beleive that my prototype board can handle the 0.3 amperes a 60W bulb would draw from my 230V mainline.

I'm not as blank as I may sound! I just would like some thorough explanations of the stuff I am working on, as I find many articles on the internet inadequate for learning the "whole package".

As for the transformer advice, I think it's a good one. But I do want to make this as small as possible!

I feel that what I am learning at school(electrical engineering) barely touches the subjects and then moves on. That's where the Nerdkits forums comes in!

January 06, 2012
by Rick_S
Rick_S's Avatar

Atmel has a document covering zero cross detection directly off the mains. I've never been that bold myself. One of our more knowledgeable members here (hasn't been here in a while though) is Noter. He built a zero cross triac control that he documented here on the forums. He documented his build in the library HERE

He is in the USA with 120V mains so as you have 230V mains, you will most likely need to modify his circuit some.

Rick

January 07, 2012
by treymd
treymd's Avatar

I've seen circuits where the H11AA1 is directly (well almost) attached to a 120V main, I'm curious about this configuration, as I'd like to be able to use one as an AC line monitor for my heating system. (at 24V AC) (Don't want to control it, just want to monitor it). In either event, the H11AA1 is connected to the hot and neutral via ~1W 15K resistors on both terminals. I'm trying to wrap my head around why this doesn't end in a puff of smoke.

January 07, 2012
by met_fredrik
met_fredrik's Avatar

Rick, that is awesome. The atmega has clamps on the inputs that blocks the high voltage! However I will make this first one completely isolated. Just because the mc will be connected to my computer while testing. I can imagine my computer gettong 240v in the usb port!

Treymd, I'm starting to get a feeling that you can almost use any voltage across LED's as long as you limit the current through them:p Anyone got some input on the subject?

Post a Reply

Please log in to post a reply.

Did you know that you can aim and fire a servo-controlled water gun from your computer? Learn more...