AC Phase control - H11AA1 is 16ms not 8ms

I got a scope and am troubleshooting an AC phase control circuit described in this article: ACPhaseControl.

It shows that the H11AA1 will output a zero crossing signal on every zero crossing. However, the data sheet (attached) indicates that it will only output a signal every one cycle. Please let me konw if you read the same.

Also, I attached a couple scope shots of pin 5 output and one that shows the measurements. The pin should be 5V normally, and when H11AA1 sends a signal, it connects the arduino input to ground. I am using the INPUT_PULLUP feature on pin 2. The signal looks good, though is every 16ms, hence my question above.
Second question is if the shot showing the noise is typical of what you see on an arduino?

Also, the measurement shows in the attached shots about 105mV difference between the 5V level and the H11AA1 signal level at zero crossing. i believe this is 5V minus 105mV. Or I am using the scope wrong. This might be an issue with the scope set up. another try shows the voltage droping to about 3.1V. Is that enough for a logic 0?

Thanks!
Ted

H11AA1_trash.png

H11AA1_scopeMeasurements.png

h11aa1_dataSheet.pdf (145 KB)

H11AA1_clean.png

However, the data sheet (attached) indicates that it will only output a signal every one cycle. Please let me know if you read the same.

No, I don't read it that way. What makes you think otherwise?

From the data sheet:

The H11AA1 is a bi-directional input optically coupled
isolator consisting of two inverse parallel gallium arsenide
infrared LEDs coupled to a silicon NPN phototransistor

The two inverse parallel led's will emit light on both positive and negative cycles. The H11AA1 should definitely pick up both crossings.

What is your input signal to the H11AA1?

Seems to me that you're using this one by mistake.

The device is marked H11AA1. The scope is showing 16ms separation between the signals. That and the diagram at the very end of the data sheet I attached is telling me something is not right. I do see the info on the first page like you cite.

I should be getting 8ms intervals right?

However, one of the scope shots I attached shows something pulling down between the signals. I suppose I could change the pin on the Arduino and used the other H11AA1, either.

Any thoughts on the noise in the scope shots?

Thanks!

Do you have a pullup resistor between pins 6 and 5? The internal pullup may be too weak.

Hi,
Check this link in you tube. He explain it very good.
link:Zero Crossing Circuits for AC Power Control - YouTube

Well, if your using a 10K pullup from pin 5 to +5V, and you're sure you have a pure, complete 120V sinewave source @ 60 Hz, then you should get 8.33ms interval between pulses.

Possible problems:

  1. One of the internal IRLEDs in the optocoupler is defective (try another H11AA1) Could test the internal IRLEDS with a multimeter diode check or just connect pin 1 to 10K pullup to 5V and pin 2 to GND ... should measure 1.2V. Then use 10K pullup on pin 2 with pin 1 to GND ... should also measure about 1.2V.

  2. Fake product / mislabeled - was it purchased from a reliable source?

  3. Incorrect scope connections / settings - where is the scope ground connection connected to?

Is the 5V DC supply isolated?

Are you able to verify the AC input signal?

I was able to verify the power supplies: 5V, gnd, and 120VAC. Scope ground is the Arduino ground for channel A on the scope.

I am still working on understanding this scope, and now have a nice 8ms signal (see attached). However, it is a positive or rising signal. I expected a falling (H11AA1 LED drives the gate and connects to ground at the zero crossing).
Given the data sheet, which is the expected behavior, and where on the data sheet do you read that?

Thanks!
Ted

H11AA1_clean8.png

yelkenli:
I was able to verify the power supplies: 5V, gnd, and 120VAC. Scope ground is the Arduino ground for channel A on the scope.

I am still working on understanding this scope, and now have a nice 8ms signal (see attached). However, it is a positive or rising signal. I expected a falling (H11AA1 LED drives the gate and connects to ground at the zero crossing).
Given the data sheet, which is the expected behavior, and where on the data sheet do you read that?

Thanks!
Ted

The optocoupler LED is on when the voltage exceeds the LED's breakdown voltage so the only time the LED is off is when the AC voltage crosses zero. the photo transistor shorts the pin to ground so when the ac voltage crosses zero it will release the input pin to go high

Very easy to invert:

RE: H11AA1_clean8.png ... Very nice signal, but low amplitude.

EDITED: Whether using your original connections, or the inverted connections above and the signal is too weak, change 10K to lower value, i.e. 4.7K.

This answers the question. I also see that in the youtube video posted above.

To revisit one of the original questions: what voltage level results in a logic change...

I was still not getting an interrupt due to a zero crossing. The H11AA1 was giving a 1.4V signal out to the Arduino. As recommended above, I changed the resistor to a 10kOhm, by adding a resistor in my circuit and changing the input to a regular INPUT from a INPUT_PULLUP.
I now get approximately 3V spike for the signal, and the interrupt is working.

Does anyone have an Arduino reference that states what voltage levels result in logic high and low, and trigger interrupts?

I now get approximately 3V spike for the signal, and the interrupt is working.

Does anyone have an Arduino reference that states what voltage levels result in logic high and low, and trigger interrupts?

Logic low threshold ( 1.5V) 0.3Vcc, logic high threshold (3.0V) 0.6Vcc. You're interrupt signal is on the verge of failure.

Try changing the external 10K to 4.7K to get increased signal span.

Hi,
how much current your are sending in the input? Maybe you need to increase it. Max = 60 mA

Hi,
Also be careful if your are using the Arduino UNO board. You have a 5.0 pin and next to it there it is 3.3 volts pin. Make sure your using the +5 volts pin.

Hi,
Also, I built something similar to power on/off my amplifier by ramping the AC at zero crossing. Just like you use a Variac or a fan speed adjustment. For your reference attached it is the drawing how I did it.

I'm Working on a project that is similar but I took a different direction to control the AC Phase using all hardware PWM control with only a minimal interrupt capture to reset the PWM timer.

Take a look at this thread:
http://forum.arduino.cc/index.php?topic=443509.0

[SOLVED] PWM Fails when adjusting Timer1 Pin 9 (Fast PWM, 10 Bit mode 7)]([SOLVED] PWM Fails when adjusting Timer 1 Pin 9 (Fast PWM ICR1 BOTTOM TOP) - Programming Questions - Arduino Forum)

40a5ccc83af55d42ebfe3bd0f0d390b9be965cc7.jpg

Working code is in my post for you to try :slight_smile:

Z

If you look at your latest oscilloscope trace, you will see that at the zero crossing, the trace starts ramping up towards 5V, but never gets there before it begins to ramp down again. I think that you need to reduce the current through the LEDs in the optoisolator, by increasing the value of the series resistors (R1 & R2 on the page you linked to) so that there is a longer period when the LEDs are actually off.

The waveform shown on the page you linked to goes right up to 5V, and has a flat top. I'm not sure whether that is real, or idealised, however I think you should try and achieve that sort of waveform, with the flat top being as narrow as possible.

Yelkenli, I see from the time-zone in your profile that you are probably in Europe.

The waveform shown on the page you linked to shows the supply voltage going up to 120V, implying that the circuit has it's component values selected for US territory.
(it's actually wrong, since it is the RMS voltage that is 120V, the peak is higher)

I suggest that you double the values of R1 and R2 to take into account the higher supply voltage, if you are indeed in Europe.