Shop OBEX P1 Docs P2 Docs Learn Events
resistors connected to H11AA1 getting hot — Parallax Forums

resistors connected to H11AA1 getting hot

InSilicoInSilico Posts: 52
edited 2015-03-09 10:22 in General Discussion
I've implemented a light dimming circuit that uses a H11AA1 for zero cross detection for the SX microcontroller. I have two 15K 1/2W resistors connected to the H11AA1 like this:

        15K 1/2W
 Hot <----\/\/\-------------
                            |
 Neu <----\/\/\----------   |
        15K 1/2W         |  |
                     _|__|__|_
                    |         |
                    | H11AA1 (|
                    |_________|
                      |  |  |
                      |  |         10K
                      |   --------\/\/\----> 5V+
                      |  |
                      |   -----------------> Zero Cross Output
                      V
                     GND

The pair of 15K 1/2W resistors get quite hot during operation, but the entire·light dimmer circuit works just fine. By the way, this circuit is designed for 120VAC 60Hz. My calculations indicates that this circuit should be fine. Is this circuit sound, or·should I use 1W resistors instead?·(I can desolder the resistors and drop-in replace it with 1W versons, I still have board space for it)

Much appreciated!

Post Edited (InSilico) : 10/12/2008 9:22:10 AM GMT

Comments

  • LeonLeon Posts: 7,620
    edited 2008-10-12 11:05
    How much current does the chip take?

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-10-12 11:35
    InSico -

    Based on the datasheet I downloaded, it appears that the H11AA1 is merely an opto-isolator, and not an opto-isolator WITH a zero crossing detector (ZCD). That alone could account for the high amperage passing through those resistors, and the resultant heat you're seeing. With a ZCD, switching only occurs when there is little or no current.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-10-12 14:09
    Using the output to determine zero-crossing on the input.
    • I = 120vac / (15K *2 )
    • I = 120vac / 30k
    • I = 4mA
    • P = 120vac * 4mA
    • P = 0.48W
    • P1 = 60vac * 4mA = 0.24W
    • P2 = 60vac * 4mA = 0.24W
    • PT = P1 + P2

    You have 60vac across each resistor, but the same current, so the power is split across the resistors; 0.24W each.

    1/4W is a lot of power in a small·space like that, a 1/2W resistor.· It's OK, that's just how it is.
  • InSilicoInSilico Posts: 52
    edited 2008-10-12 20:31
    I know that the H11AA1 is just an opto-isolator, that's why there's a 10K pullup on the internal phototransistor so that the SX sees a high pulse for every zero-cross and a low signal for everything else. I've seen this circuit (and variations thereof) used in a lot of light dimming projects (including this one: http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol8/col/nv146.pdf) and it seems to work well. I guess I just didn't have a grasp on how much 1/4 watt is.

    PJ, it seems we are in agreement, since those were the calculations that I've arrived to.

    Thanks all for responding... now I can sleep well at night smile.gif
  • edited 2015-01-30 14:45
    InSilico wrote: »
    The pair of 15K 1/2W resistors get quite hot during operation, but the entire·light dimmer circuit works just fine. By the way, this circuit is designed for 120VAC 60Hz. My calculations indicates that this circuit should be fine. Is this circuit sound, or·should I use 1W resistors instead?·(I can desolder the resistors and drop-in replace it with 1W versons, I still have board space for it)

    Post Edited (InSilico) : 10/12/2008 9:22:10 AM GMT
    PJ Allen wrote: »
    Using the output to determine zero-crossing on the input.
    • I = 120vac / (15K *2 )
    • I = 120vac / 30k
    • I = 4mA
    • P = 120vac * 4mA
    • P = 0.48W
    • P1 = 60vac * 4mA = 0.24W
    • P2 = 60vac * 4mA = 0.24W
    • PT = P1 + P2

    You have 60vac across each resistor, but the same current, so the power is split across the resistors; 0.24W each.

    1/4W is a lot of power in a small·space like that, a 1/2W resistor.· It's OK, that's just how it is.

    These posts have helped to me finally figure out how to use the H11AA1 in my own circuit. Thanks everyone.

    Regarding the resistor power rating. According to PJ Allen's calculations, using the 15k resistors the wattage calculates out to .24 watts. If you replaced each 15k resistor with a pair of 30k resistors, in parallel, the wattage for each resistor would be halved to .12 watts but the total current through the circuit would remain the same. That should solve the heat problem.

    Sandy
  • kwinnkwinn Posts: 8,697
    edited 2015-01-30 20:26
    These posts have helped to me finally figure out how to use the H11AA1 in my own circuit. Thanks everyone.

    Regarding the resistor power rating. According to PJ Allen's calculations, using the 15k resistors the wattage calculates out to .24 watts. If you replaced each 15k resistor with a pair of 30k resistors, in parallel, the wattage for each resistor would be halved to .12 watts but the total current through the circuit would remain the same. That should solve the heat problem.

    Sandy

    Sorry, not correct. True, you have half the current through each resistor, but you have twice the voltage across them so the power dissipation is the same.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-01-30 20:40
    No, Alex has the right idea: replace two 15K resistors with four 30K resistors, in series/parallel, and you get twice the power-dissipation capacity. The voltage across the paralelled pairs is the same as that across the singlet 15Ks. The current through each is half.

    You'd get the same benefit by putting four 7.5K resistors in series. This time the current would be the same, but the voltage across each would be half.

    -Phil
  • Mark_TMark_T Posts: 1,981
    edited 2015-01-31 03:43
    Replace each 15k with two 7k5's in series then you share the power between 4 devices _and_ reduce the
    risk of any single component failure causing an overcurrent situation and reduce the risk of flashover....
  • kwinnkwinn Posts: 8,697
    edited 2015-01-31 08:21
    No, Alex has the right idea: replace two 15K resistors with four 30K resistors, in series/parallel, and you get twice the power-dissipation capacity. The voltage across the paralelled pairs is the same as that across the singlet 15Ks. The current through each is half.

    You'd get the same benefit by putting four 7.5K resistors in series. This time the current would be the same, but the voltage across each would be half.

    -Phil

    Yep, you're right. Misread Sandy's post. My apologies Sandy.
  • edited 2015-02-01 12:51
    Mark_T wrote: »
    Replace each 15k with two 7k5's in series then you share the power between 4 devices _and_ reduce the
    risk of any single component failure causing an overcurrent situation and reduce the risk of flashover....

    That sounds like a better solution.
  • edited 2015-03-09 10:22
    My final configuration replaced each 15K resistor with 4 X 100K resistors in parallel. That works out to 50K total resistance. Worked fine.

    Then the customer changed his mind and eliminated the need for zero crossing detection in this circuit haha.

    Sandy
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 06:16
    I didn't mean to raise a dead horse from the grave and start beating it again...


    BUT I SWEAR I SAW IT MOVE.



    I was looking over this thread, and I noticed the 10k resistor on the 5v as pullup.

    Isn't that a bit much for the part?

    I calculated a current of 0.5ma,... wouldn't the part be better served by a 1k ohm pullup at 5v, allowing 5ma to flow, which is half the transistor base max rate?


    So for the propeller, a pullup of 500 ohm at 3.3v? (giving 6.6ma) (or a commonly used 470ohm at 3.3v giving 7.02ma)

    I could scope it out and see the rise/fall differences but i figured someone might know from theory/experience.
  • jmgjmg Posts: 15,140
    Clock Loop wrote: »
    I calculated a current of 0.5ma,... wouldn't the part be better served by a 1k ohm pullup at 5v, allowing 5ma to flow, which is half the transistor base max rate?
    So for the propeller, a pullup of 500 ohm at 3.3v? (giving 6.6ma) (or a commonly used 470ohm at 3.3v giving 7.02ma)

    It certainly was an old thread....

    I'm not following the logic here, usually you want the least current in a design, and 5k to 5V for 1mA is more common, with sub-1mA being common now for optos.
    At 50Hz/60Hz, there is no demand for speed at all, and higher IC side current just means higher AC drive needed, and that's heat ! (as lamented in #1)

    AC input optos look good on paper, but they are quite a lot more expensive than generic optos, and have poor LED:LED matching (often 3:1)
    With something like a Prop, you are probably better to use a '817' series opto, with a diode and target 0.1-0.2mA of collector current (20k) and 0.5~1mA of drive level.(56k + 56k)

    You then measure the 'lazy AC' result and find the centre of the peak (50% between the _/= and =\_ , that mid-location is aging and CTR tolerant.
    Next derive the _/= to _/= as Mains Period, and then delay from the virtual peak P/4, for a derived zero crossing with minimal parts.

  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 06:59
    The Ac led won't conduct until the voltage reaches...?

    Typical voltage drop on h11aa1 is 1.2v.

    So the ac line must be...
    1.2v or

    120v-1.2v = 118.8v ?

    Before the led will conduct at all?
    jmg wrote: »
    You then measure the 'lazy AC' result and find the centre of the peak.

    From what you wrote (i think) you say it conducts when ac line reaches 118.8v --- up to 120 --- then back down to 118.8v--- then turns off.

    H11AA1%20Propeller%20Ac%20Phase%20Detection%20Resistor.jpg
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 07:27
    oops
    mistakenly put it in a new post... ignore this...

    Im making crispy bacon, and i gotta get my ac timing right for my element!

    Ac Darn phase drifting... not cooking my bacon right.

    Ahh, middle of the peak, means my timing is 240hz. Now i get why faster rates were working better. .



    When used with the object...
    http://obex.parallax.com/object/794


    
    {{
    ''*******************************************
    ''*  AC Phase DEMO                          *
    ''*  Author: Clock Loop @ parallax forums   *           
    ''*******************************************
    
    }}
    CON
      _CLKMODE = XTAL1 + PLL16X
      _XINFREQ = 5_000_000
    
       ZeroCrossingPin = 0
      
       SolidStateRelayPin = 1
      
    OBJ     PWM     : "PWM_32_v4.spin"
    
    
    PUB DEMO | PwmRate
    
        PwmRate := 50
    
        PWM.Start
    
        '1/240 = 0.004166    
        ' The Period is calculated by taking the inverse of the desired frequency
        ' 1/240Hz = 4.166ms ; since the value entered is in micro seconds this
        ' value needs to be multiplied by 1000 so it becomes 4166
    
        
    
    Repeat
    
        Repeat Until Ina[ZeroCrossingPin] == 0         'Power on ac wire is > 118v.   Optoisolator is lit, grounding the pullup resistor, making pin low.
           
        Repeat Until Ina[ZeroCrossingPin] == 1         'Power on ac wire is less than optoisolator will light up at, bi-directionally. Pin pulled high.
    
        PWM.Duty(SolidStateRelayPin,PwmRate,4166) 
    
    
    
    CON
    {{
    ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │                                                   TERMS OF USE: MIT License                                                  │                                                            
    ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation    │ 
    │files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,    │
    │modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│
    │is furnished to do so, subject to the following conditions:                                                                   │
    │                                                                                                                              │
    │The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│
    │                                                                                                                              │
    │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE          │
    │WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR         │
    │COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,   │
    │ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                         │
    └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
    }}
    
    


  • jmgjmg Posts: 15,140
    Clock Loop wrote: »
    The Ac led won't conduct until the voltage reaches...?
    Typical voltage drop on h11aa1 is 1.2v.

    Best to think of optos in current terms & ignore the voltage drop.
    Current will start to flow very early, eg with 125k series R, even 2V on the mains will drive a measurable 6.4uA of current.
    Of course, CTR down here is very low, so we need to ensure enough LED current flows, to get into the operating region.

    Some of the better optos spec at 0.5mA, cheaper ones might need 1mA+
    Then, you choose a load current far enough below that, for the worst CTR to deliver it. eg 5:1 allows a feeble 20% min CTR

  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 07:44
    I am talking about the H11AA1 with the above propeller circuit, and not about trying to find a replacement or better part(s).
    I am focusing on the AC line voltage, that the transition happens at here, based on the datasheet specs of the H11AA1, and the above attached propeller circuit.

    And so, by your comment...

    The H11AA1 led won't conduct the needed current to excite the opto and turn on the transistor until 118v? Is that correct?

    Heres the exact part datasheet from the manufacturer that I have.

    https://www.digikey.com/products/en?keywords=h11aa1sr2vm
    https://www.fairchildsemi.com/datasheets/H1/H11AA1M.pdf
  • 50 or 60Hz, not 240Hz. If the voltage is 120V RMS then the peak is 1.414 * 120 = 170V peak but because the LED forward drop is only 1.2V it is best to ignore that and calculate the resistor value so that it limits peak current but always turns on the opto even if there is low voltage. 18k will result in a peak current of 10ma so you could use 2 split series 10k resistors instead. However the average current is 6ma and so the power dissipation would be around 720mw and using two 0.5W resistors would do it but expect them to get hot. So don't mount them flat to the board but raise them off the pcb so that it can be air cooled and it doesn't burn the board. I would be more inclined to use larger resistors or a capacitor plus resistor or even 4.7k x4 series resistors just to help with the heat.

    If you were running LEDs from logic voltages you would always take the forward voltage drop at the rated current into consideration however.
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 08:44
    50 or 60Hz, not 240Hz.

    WARNING: CRISPY BACON AHEAD! Maths and stuff.. TWO transisions per cycle.. (-120 and + 120.) 120hz..

    Another two, for the fact that you are at the center of the peak during detection.
    (because you MUST also consider both the 0v transistions, no current flows to your device during those moments, effectively turning any device under control, off)

    240hz.

    Ok, now I am going to yank out the scope damit. Im done.

    I think peeps are missing this attachment i made above..
    You'd get the same benefit by putting four 7.5K resistors in series. This time the current would be the same, but the voltage across each would be half.

    -Phil


    H11AA1%20Propeller%20Ac%20Phase%20Detection.jpg
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-04-06 15:00
    I ran some code to count between state changes..
    
      Repeat
      
            Repeat while Ina[ZeroCrossingPin] == 0         'Power on ac wire is enough to make Optoisolator lit, grounding the pullup resistor, making pin low.      
                ++cnttmp1
    
            cnt01 := cnttmp1
            cnttmp1 := 0
    
    
            
            Repeat while Ina[ZeroCrossingPin] == 1         'Power on ac wire is less than optoisolator will light up at. Pin pulled high.
                ++cnttmp2
    
            cnt02 := cnttmp2
            cnttmp2 := 0
    
    

    The pin state Ina[ZeroCrossingPin] == 0 ends up with higher counts of 400,
    The pin state Ina[ZeroCrossingPin] == 1 end up with lower counts of 60.





    This means the led conducts (thus turning the output transistor ON) for the majority of the time, it turns on and off near the zero transition, not the peak.

    240hz won't work, its no longer a neat center timed signal just at the peak voltage, but kinda arbitrary based on part heat, line noise/stray, and program execution...?
    EXCELLENT!

    So the answer is: The Led turns on when the ac line voltage is ABOUT 1v-1.5v, it stays on all the way up to 120v and then back down to ABOUT 1v-1.5v, where it turns off.

    Based on my timing measurement, on counts was 400 and off counts was 60 total loop of 460.

    60 / 460 = 0.1304347826086957 = 13.1%
    400/ 460 = 0.8695652173913043 = 86.9%



    13.1% of 120v = 15.65v

    But then i think i need to divide 13.1 in half because half of it is the fall and half is the rise.
    6.55% of 120v = 7.86v


    If we do some (very rough)maths...


    Assuming 1.2v led drop, and a total voltage of 7.86v with a resistor of 30k, i calculate the led starts to light up at 0.2222 mA.


    Hmm, so the led conducts more like around 7.86v up to 120v and then back down to 7.86v, and is OFF from 7.86v to 0v back to 7.86v.
    My timing code might be an issue? I need to check my circuit to verify my H11AA1 led resistor is in fact a total of 30k.

    These are kludge numbers and are not even close due to lack of rms etc...

    Not counting any kind of rms or other calcs, program delays... <--thats in bold so no one gets on a soap box and starts yelling.
    But if you want to educate on the best method and code to do this stuff.. go ahead...

    
    Repeat
    
                    If powercnt > powercnttop           'Is the new count higher than max count?
                        powercnttop := powercnt         'Make max count equal new count          This ends up as 120 if the counts are right, and you reset the count every second.   (120hz)
    
                    ++powercnt                           'Count ac phase change every time it happens.   
    
    
                    'The time is right to commit/sync pwm changes to the pins, while the phase is 0v but on the rise.
                                            
                    PWM.Duty(SSRPin,PwmRate,7241)   '7241 is 86.9% of 1/120 (8333)   *my ON time*
                    
                    Repeat While Ina[ZeroCrossingPin] == 0         'Power on ac wire is not 0v.   Optoisolator is lit, grounding the pullup resistor, making pin low.
    
             
                    
                    Repeat While Ina[ZeroCrossingPin] == 1         'Power on ac wire is less than optoisolator will light up at, bi-directionally. Pin pulled high.
    
    



    BECAUSE we are talking about programming a prop chip and AC MAINS.

    A PARALLAX WX device is really recommended here so you can debug and wirelessly program the prop on mains..
    I created a post on how the prop is connected, programmed, and debug output viewed wirelessly using the parallax wx device.
    https://forums.parallax.com/discussion/comment/1434618/#Comment_1434618


    I LOVE WIRELESSLY CRISPIFIED BACON! DON'T U?
  • JonnyMacJonnyMac Posts: 8,912
    edited 2018-04-06 15:53
    This means the led conducts (thus turning the output transistor ON) for the majority of the time, it turns on and off near the zero transition, not the peak.
    That is how it works; if you look at the input the to Propeller you will see pulses with a 120Hz rate (in US). I've used this circuit many times, though I tend to use a 3.3K pull-up to 3.3V, and there is no need for the 100-ohm series resistor. The EFX-TEK FC-4+ is a 4-channel AC dimmer. I have a PASM driver than does phase-angle dimming on four outputs.
  • jmgjmg Posts: 15,140
    edited 2018-04-06 20:16
    Clock Loop wrote: »
    If we do some (very rough)maths...
    Assuming 1.2v led drop, and a total voltage of 7.86v with a resistor of 30k, i calculate the led starts to light up at 0.2222 mA.

    The approach is good, but a quick sanity check on your claimed 222uA to the needed > 3mA to register LOW (1.5V on 500 ohms), gives a CTR well above H11AA1 specs to typically 100%, MIN 20%


    If you do add in the AC peak (ie sine wave) and correct for bogus halve, I get closer to 700uA LED drive.

    That still indicates a high CTR, and suggests the pullup may not be 500ohms, which is far too low anyway.
    It is so low, that a worst-case H11AA1 will not work : ((3.3/2)/500/0.2)*30k = 495V
    (H11AA4 is better choice, with CTR of MIN 100%, allows you to have better margins, and lower power.)


    As already mentioned above, you can/should raise the pullup, and raise the 7.4k x 4, to greatly lower the energy this uses.

    Clock Loop wrote: »
    ...its no longer a neat center timed signal just at the peak voltage, but kinda arbitrary based on part heat, line noise/stray, and program execution...?
    Partly right.
    It is center timed, (the width was always a variable), but the CTR skews of H11AA1 mean you have two differing center-widths.
    Run those captures over a whole mains cycle, (capture +/- separately) and you will get differing half cycle widths due to that MAX CTR skew of 3:1
    (Typically it will be better than 3:1, but I think the physical die design means one LED is always better located than the other...)

    The center location is stable, for each half-mains peak, however the width is indeed 'kinda arbitrary' and will vary with heat/LED aging/component batch/ and +/- LED side.
Sign In or Register to comment.