zero crossing detector?

hey guys i am building a zero crossing detector to adjust with my previous build project. for this i need to convert ac(230v, 50 hz) to pulsating dc. i have made the bridge rectifier using 4 1n4007 diodes. Due to non availiblity of transformer i am unable to step down the voltage. can I use resistors(2 watt) instead?

What does this have to do with a zero crossing detecto?

the pulsating dc will be fed to optocoupler. Every time the pulsating dc goes to zero the optocoupler will draw current on its opposite side. As i said this schematic of zero crossing detector is to adjust with my previous build project so however weird the ckt may sound to you guys just remember it is and adjustment and i cannot do better than this for my project.

hey guys i am building a zero crossing detector to adjust with my previous build project. for this i need to convert ac(230v, 50 hz) to pulsating dc. i have made the bridge rectifier using 4 1n4007 diodes. Due to non availiblity of transformer i am unable to step down the voltage. can I use resistors(2 watt) instead?

I don't see any mention in your post about being a "noob" so I'll give you the benefit of the doubt.
You still didn't answer my question. Rectifying ac has nothing to do with zero crossing detectors .

I need to know why you are rectifying the AC because that is certainly not necessary for a zero crossing detector.
Also I need to know where you got that (2 watt) value from. (why did you suggest that particular value ?)
Would you be offended if I asked if you have any electronics experience ? (are you going to get all bent out of shape if asked that question ? If so, I won't ask.)

the pulsating dc will be fed to optocoupler.

Every time the pulsating dc goes to zero the optocoupler will draw current on its opposite side. .

You need to explain how you have the output side of the optocoupler wired.
Get a pen and paper and draw a schematic of what you are trying to do and take a photo of it with a cell phone and post it.

As i said this schematic of zero crossing detector is to adjust with my previous build project so however weird the ckt may sound to you guys just remember it is and adjustment and i cannot do better than this for my project

You'll have to do better explaining your question because so far it is not making sense (talking about rectifying AC with 1N4007 diodes for a zero crossing detector is not making any sense)

can I use resistors(2 watt) instead?

What's the meaning of this ?
Where did you get this value ? (2W) (what prompted you to suggest that value?)
Use 2 Watt where ? for what ? (for a zero crossing detector circuit ?)
If your talking about zero crossing detectors and rectifying dc in the same sentence then either you have no electronics experience or you are not telling us something. Which is it ?

See ! THAT'S WHAT I'M TALKING ABOUT ! Someone who knows electronics ! (Thank you Runaway Pancake)
Do you see any 1N4007 diodes in that circuit ? Is that circuit rectifying AC ?

The design of the zero-crossing detector in the link posted by Runaway Pancake is awful, and I'm surprised that it is reported to work. It shows a single resistor (unlabeled) in series with the LED of an H11A1 optocoupler. The LED should have been destroyed immediately by the reverse line voltage.

Here is a discussion that contains better designs for zero-crossing detectors: how to sense 220v input -solved- I hope - Raspberry Pi Forums

I've attached a schematic from that discussion showing the preferred solution, which has a diode D1 (1N4004 would work) to protect the LED from high reverse voltages and a 100 nF capacitor to limit the diode current. The capacitor must be an AC type, rated for 240V minimum -- 330 V would be safer. Just about any optocoupler would work in this circuit. The "zero" is indicated by each transition at the output side.

jremington:
The design of the zero-crossing detector in the link posted by Runaway Pancake is awful, and I'm surprised that it is reported to work. It shows a single resistor (unlabeled) in series with the LED of an H11A1 optocoupler. The LED should have been destroyed immediately by the reverse line voltage.

You need to go back and really look at the schematic.
It's an H11AA1.

If it had been an H11A1 then it would have met an untimely end.
But it's not, so you can go eat crow.

Here's my submission,

Sorry I missed the "A", but the do you recommend not putting a value on a resistor that is in series with the line voltage?
I don't. This circuit is very dangerous for a beginner.

330k on each leg of the line.
220V x 1.414= 312V
312v/0.001A=312000=>330k

I would recomnend 1 Meg for each leg to be safe.

jremington:
Sorry I missed the "A", but the do you recommend not putting a value on a resistor that is in series with the line voltage?
I don't.

"Sorry... but,...."
But nothing. You did more than "miss [an] 'A'" and you know it.

Do I have to specify every last detail? Why? Can't a guy figure his own resistor?

And I didn't say that it's "Beginnerville" or "n00btown" or any of that like.
Since when did anything become inappropriate for anyone to put his hand to around here anyway?
[Skill-set optional; just ask questions, anyone can do this. (-: ]
Where's that "zero-crossing shield"?

jremington:
This circuit is very dangerous for a beginner.

No more so than any other dealing with the house wiring.
The same goes for your so-called "preferred solution".

Here's more "danger" --
http://playground.arduino.cc/Main/ACPhaseControl

Another variation:
This one will give a 1/2 wave pulse.
In Arduino, just detect the rising edge.

EDIT: ... or falling edge (depends on how you connect the output side)

Maybe some combination of parts and this App note from Atmel.

Atmel AVR182 Zero Cross Detector.pdf (95.1 KB)

It doesn't get any simpler than that.

i am using my stock optocoupler which is 4n25, here is the datasheet

Now you tell me raschemmel why isn't rectification required as the reverse voltage this optocoupler can handle is just 5V.
By the way why are you being so hyper?

This is a circuit I've used, it's very similar to that given by dlloyd. The SFH628 opto actually has two LEDs connected back to back, so I've marked the diode as NNF (not normally fitted). The capacitor provides some protection from ESD and transient voltage spikes on the mains. (Don't be fooled into thinking it will filter the signal by 100nF x 100k, it has 1k in parallel with it, so the effective time constant is just 100us).

Do note that there will be a phase error with any simple circuit like this, because as the a.c. voltage reduces towards zero, the LED current will fall below the opto detection threshold before the a.c. reaches zero. If phase accuracy is important, (and it usually is in ZCD applications), then you will need to determine this using an oscilloscope and correct for it in software.

zero crossing detect.png

I didn't send you a link to an opto coupler circuit . The circuit I posted was a comparator which generates the pulse which you connect to opto but the circuit in Reply#12 will work with just a resistor , diode & opto. I'm not hyper. If you don't know electronics you should state that in your first post to save time. A zero crossing detector does not require FULL WAVE rectification. You only need the first half, hence only the one diode. Also, you wouldn't need 2W resistors (you never explained where you got that from) because using a 1 megohm resistor the current is limited to 1 mA so there is no need for a large wattage resistor. Most of the circuits posted will work but you never answered the question of how you are connecting the output of the opto (the open collector transistor). If you are just making stuff up as you go along and guessing without knowing , we need to ask you about everythng you are doing because more than likely 99% of it is wrong. This is more work than you just saying "I'm a newbie, I don't jack about electronics, please help". If you do that , we don't have to expect you to know anything and we can proceed with a minimum of interrogation Without that part, we might give you the opto circuit you asked for and you might connect the output wrong and it wouldn't work. You're initial idea of a full wave rectifier and 2W resistors was a dead give away that you have no electronics experience. The fact that you concealed that from us instead of confessing that it in your first post is an annoyance because you were not honest with us and now we have to work harder to keep you from messing up. There is no crime in being inexperienced but posting for help without admitting it is a deliberate thing and something you should avoid because it results in more work.

Now you tell me raschemmel why isn't rectification required as the reverse voltage this optocoupler can handle is just 5V. By the way why are you being so hyper?

. The 1 meg resistors on each leg of the line limit the current to 312uA @ 5V. When using the opto you only need the one diode. The very small amount of current means you don't need 2 Watt resistors.

raschemmel:
330k on each leg of the line.
220V x 1.414= 312V
312v/0.001A=312000=>330k

I would recomnend 1 Meg for each leg to be safe.

230V ac mains
half wave or full wave rectified.
trying to get zero crossing, so there is no capacitors in this circuit.

1.414 ?

general question ;
what is your rule of thumb about a single resistor in a high voltage application ? at what point to you address flashover ? before you start using either a resistor designed for the voltage or start to use resistors in series ?

A simple 1/4 watt carbon 1meg resistor has a voltage limit of about 150v.

From my point of view, zero-cross detection is about getting a pulse with each alternation.

The amount of ILED to allow depends, basically, on how wide you want that pulse to be, as Billysugger mentioned.

Flashover RoT? You could bung this up with resistors till Kingdom Come and still be undone.
Flame-proof resistors. Resistors, Fixed | Vishay
Is somebody submitting the/ir design for UL/CE/TUV/... ?