0

I have realized what I thought was a classic zero cross detector circuit using an H11AA1 chip: https://www.digikey.com/product-detail/en/on-semiconductor/H11AA1SR2M/H11AA1SR2MCT-ND/2094174

My circuit is the following:

Circuit schematic

Note, I am using a H11AA1SR2MCT chip in my physical circuit (linked above) which should give me all zero-crossings.

I am now probing with an oscilloscope; I did not attach this circuit directly to 110VAC, I am using a toroidal transformer that gives a ~42V peak to peak isolated output. In the following image, the yellow trace is the transformer output, the green one is the signal at "PAD3" in the above circuit referenced to the local GND. I am using a 3.3V power supply.

enter image description here

I was planning to use that signal to generate an interrupt on a microcontroller very close to zero crossing, but so far it's simply unusable, voltage only goes down to 2.1V instead of zero and the timing characteristics are very far from the actual zero-crossing, even if they stay in sync with the wave. Is there an obvious mistake I am not seeing? Thank you

Alessio Sangalli
  • 125
  • 1
  • 10
  • Think in terms of current in the diode. As you have scaled down the input voltage, you have also scaled down the input current thanks to the values of R9, R10. You can modify these, but remember to undo the change before revertnig to mains voltage! –  May 17 '20 at 14:01
  • Why not use the [SFH 6206](https://www.vishay.com/docs/83675/sfh620a.pdf)? See [here on EESE](https://electronics.stackexchange.com/a/8698/38098) for an answer suggesting it. (My initial thought was to just apply the MOC3063, which has zero-cross built in. But the SFH 6206 seems better suited.) – jonk May 17 '20 at 17:46
  • Why would the SFH6206 (that I am sure is a fine chip) have any advantage over the H11A1? – Alessio Sangalli May 18 '20 at 00:38

3 Answers3

2

Either increase R3 or decrease R9/R10, that optocoupler only has a current transfer ratio of 20%,

42V / 94K = 447uA

447uA * 0.2 = 89.3uA

10K * 89.3uA = 0.893V, so everything lines up perfectly,

Reroute
  • 4,377
  • 6
  • 14
  • Wait... *increase* R3? I need to think why that would work (I understand why decreasing R9/R10 could help) – Alessio Sangalli May 17 '20 at 09:52
  • To make the output signal swing closer to ground you either need to let more current flow through led's, or make that current cause a larger voltage drop on R3, decreasing R9/10 increase the LED current, reducing them both to about 15K would cause it to swing to ground, or increasing R3 to about 33K would cause it to swing to ground. – Reroute May 17 '20 at 10:08
2
  • You have no reverse polarity protection on the LED. It is likely to fail. Generally it's a bad idea to apply more than 5 V in reverse across an LED.
  • With almost 100 kΩ of current limiting on the LED current you are getting 42 / 100k = 0.42 mA RMS through the LED. This is a bit mean and the LED is barely lighting.
  • According to the datasheet the CTR (current transfer ratio) is 50% under specified conditions. You need to take that into consideration in designing the transistor side of the isolator. As it stands the pull-down isn't strong enough.

Note on schematic: It's generally a good idea to have the current flow from top to bottom. Invert the left side of the opto-isolator and move VCC to the top of the page and the emitter and ground towards the bottom.

Transistor
  • 168,990
  • 12
  • 186
  • 385
  • It is a bidirectional optocoupler, it already has anti-parallel leds internally. – Reroute May 17 '20 at 09:24
  • Thank you: 1) As I stated in the description above, I am using a H11AA1 device that has two LEDs as user Reroute mentioned. My schematic program did not have such component but the pinout is the same. 2) good point, this circuit is supposed to work on 240VAC(RMS) but I wanted to test, characterize and debug on a lower voltage first 3) That is not the right datasheet, I linked the correct one in my question 4) Yeah but there are other, unrelated parts of the schematic not depicted here that drove the way I did it. Yes, I am sloppy – Alessio Sangalli May 17 '20 at 09:46
2

the timing characteristics are very far from the actual zero-crossing

enter image description here

It looks pretty close to me - see the red lines I've added. In other words the middle of the peak of the yellow waveform corresponds entirely with the centre-points of the yellow waveform's rising and falling edges.

I did not attach this circuit directly to 110VAC, I am using a toroidal transformer that gives a ~42V peak to peak isolated output.

Well, that doesn't really help you. 110 volt AC has a peak to peak amplitude of 311 volts and you are testing your circuit with a signal that is 7.4 times smaller. This means that the output waveform will look a bit sloppy.

You would much improve things if you either reduced your input resistors by 7.4 times and tested on 42 volts p-p. And, what you'll find is that the green waveform will become rectangular and the positive peak will be "thinner" and much more indicative of the AC input's zero crossing points.

As a side note - don't expect perfection from circuits like these - they do need some signal processing to get to the information you want.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • The final circuit is supposed to work on 240VAC RMS that is why I choose those resistors. Instead of going directly on 240VAC I thought it was a good idea to try an isolated output first, but point taken, I need to rethink the resistors for this experiment. I understand adding some software processing, not a big deal, but with a waveform like that I really don't know if an interrupt would be generated with sufficient consistency. Thanks – Alessio Sangalli May 17 '20 at 09:50
  • @AlessioSangalli in your question you said this: *I did not attach this circuit directly to 110VAC* - you didn't mention 240 volts - I'm just pointing this out so you can correct yourself. – Andy aka May 17 '20 at 09:53
  • Yeah true, my test progression would have been 40V isolated so that I can use the scope, then try 120VAC, and when I am ready for the final tests go to 240VAC. I did not cite 240VAC in the original text as I did not want to possibly confuse people with a discussion on split phase and so on. Now I understand what is happening. I intend to develop most of my software using the isolated output. – Alessio Sangalli May 17 '20 at 10:01