| Electronics > Projects, Designs, and Technical Stuff |
| Isolated zero cross detection w/ AC mains |
| << < (4/15) > >> |
| wraper:
--- Quote from: beduino on October 07, 2019, 10:45:38 am --- --- Quote from: wraper on October 07, 2019, 12:14:16 am ---It's easier to use optocouplers specially made for AC. Like H11AA1 --- End quote --- Isn't those 33k resistors too low for 230VAC? It looks like something around 0.4W loses on each of them? I've used for 230VAC 4 x 100k - (2x 100k in parallel) x 2 in series, so 2x 50k, then we have something like: 0.00115^2*100000 ~ 0.132W losses on each of 100k resistors. BTw, I've used two PC817 to have configuration similar H11AA1, but in this case I could detect on two pins not only zero crosing but also which part (top/bottom) of sine wave which might be sometimes helpfull in some applications. --- End quote --- You calculate power loss. But do you even consider current and power through optocoupler? 100k in series means 0.23 2.3 mA RMS current through emitter LED which BTW has forward voltage of only 1.2 V. For example H11AA1 has minimum 20% CTR. If you want to use higher resistance resistors, you would need to use otocoupler with higher CTR like H11AA4. |
| schmitt trigger:
--- Quote from: wraper on October 07, 2019, 12:14:16 am --- --- Quote from: nctnico on October 05, 2019, 08:31:36 pm ---Otherwise I'd use this: (Attachment Link) I've used this circuit in a (one off) design but I still need to test it. --- End quote --- It's easier to use optocouplers specially made for AC. Like H11AA1 --- End quote --- Ditto for using the H11AA1. It makes life simpler. Also since it has a base connection, you may want to experiment with a small capacitor (C <15 pF) to ground, to reduce noise susceptibility which as others have noted, is prevalent around the zero crossings. |
| beduino:
--- Quote from: wraper on October 07, 2019, 12:32:48 pm --- --- Quote from: beduino on October 07, 2019, 10:45:38 am ---I've used for 230VAC 4 x 100k - (2x 100k in parallel) x 2 in series, so 2x 50k, then we have something like: 0.00115^2*100000 ~ 0.132W losses on each of 100k resistors. BTw, I've used two PC817 to have configuration similar H11AA1, but in this case I could detect on two pins not only zero crosing but also which part (top/bottom) of sine wave which might be sometimes helpfull in some applications. --- End quote --- You calculate power loss. But do you even consider current and power through optocoupler? 100k in series means 0.23 mA RMS current through emitter LED which BTW has forward voltage of only 1.2 V. --- End quote --- Maybe someone of us missed orders of magnitude of RMS current, so lets do the math with two 51k resistors in series (51000 Ohm 1W I've used in mains zero crossing three pin probe shown below): (230VAC-1.2Vf)/(2x51k)= 0.002243 A ~2mA :-DMM In this DIY probe below I've used mentioned 2xEL817 with its input diodes in antiparallel of course,so I'm capable sense near zero crossing to positive and negative part of mains sinewave if needed thanks to three pins instead of two 8) I use MPU in my spot welder, so I can compensate for zero cross based on logic analyser output from this probe and hall effect current sensing pure resistive load during the tests :-/O UPDATE: Of course mains connection shown above is not only hot black glued, but additional insulation put first on those exposed mains wires brown and blue, so do not try this unless you know what you are doing :-BROKE |
| wraper:
--- Quote from: beduino on October 07, 2019, 11:19:27 pm ---Maybe someone of us missed orders of magnitude of RMS current, so lets do the math with two 51k resistors in series (51000 Ohm 1W I've used in mains zero crossing three pin probe shown below): (230VAC-1.2Vf)/(2x51k)= 0.002243 A ~2mA :-DMM --- End quote --- Yes I messed up one decimal place. Still 2 mA with 20% CTR (=0.4 mA) sucks, especially for zero cross. Optocoupler reacting only to peak voltage is not very helpful for accurately detecting zero cross. There is not always ideal sine waveform in mains to allow you to accurately calculate zero cross from that. Ideally you want it to turn off only as close as possible to zero voltage. Also one need to consider that if it works now, does not mean it will work over time. Optocoupler CTR tend to degrade and one should consider that when designing things. |
| beduino:
--- Quote from: wraper on October 07, 2019, 11:39:13 pm ---Still 2 mA with 20% CTR (=0.4 mA) sucks, especially for zero cross. Optocoupler reacting only to peak voltage is not very helpful for accurately detecting zero cross. --- End quote --- When we use 33k instead of 51k we get ~3.5mA instead of ~2mA, so is it much better use 33k instead of 51k? In the case of 51k we get ~0.5W power disipation on both resistors, so ~0.26W per resistor - I used 1W resistors anyway. --- Quote from: wraper on October 07, 2019, 11:39:13 pm ---There is not always ideal sine waveform in mains to allow you to accurately calculate zero cross from that. --- End quote --- Yep, so that is why I use MPU to calculate average period instead of making decisions only based on zero cross pin state, so hopefully also filtering some noisy zero crosses in software. |
| Navigation |
| Message Index |
| Next page |
| Previous page |