Shop OBEX P1 Docs P2 Docs Learn Events
Modified PWM for Triac Gating ? - Page 2 — Parallax Forums

Modified PWM for Triac Gating ?

2»

Comments

  • jmg wrote: »
    For Zero Crossing detection, some of the circuits I've seen used resistors direct into the microcontroller input (220K each, 1/2 watt). They work good in terms of saving some board space, but suffers from noise issues ( and safety, it's not isolated!! :o ).
    Yikes, that is a quite low value to non-isolate. Would trip many leakage breakers ?

    I have seen special resistors like the ex Philips VR68 series, used without isolation, they are rated to 10kV, and many-megs keeps the ground current to well below safe levels. 10M~33M or even their top end 68M could be considered with modern sub uA leakage MCU pins.

    It's 2x 220K resistors and it's a small wire-wound, and this exist on a dimmer I worked. Needless to say, it worked, but only some microcontrollers can tolerate that kind of noise. For others, zero-crossing should involve a lot of isolation.

    I have also worked with a transformerless power supply on a dimmer. We get to pop these things real fast and got some PCBs burning (one black hole in the vicinity of the components). The discrete ones (made with a combination of MOSFET, resistors and more resistors) are very dangerous and difficult to handle. The other one I managed to use is an on-chip buck-converter (AC to DC) which works much better but a lot of clearance is needed between two tracks!!.

    I must also stress the importance of having a notch on the center of the opto-isolators. Keep digital circuits and live circuits away from each other. They. Never. Mix.

    Ah also, never probe live circuits if you are unsure! I had a fellow engineer who kept popping these things with an oscilloscope because of the lack of knowledge on these things. Safety must be observed at all times! Do not assume, and respect the AC mains! [I know this sounds like a PSA, but I have hated the idea of working with HV without safety precautions!] :o
  • jmg wrote: »
    ... reason to select the H11D3 over others ...?
    Any opto would do, but some points to note
    [check, noted :) ... ]
    * Channel matching will be better on AC input opto, as the TRX is common, just LEDs can vary.
    What is "channel matching" and "TRX" ?

    * Phil's circuit has a nifty series connection of the optos.
    That gives a tri-state region, so has very low static current, and high sensitivity (pluses), but it only has one edge per crossing, so you lose the ability to interpolate the two edges for a near perfect zero point.
    What are the implications of not having a "near perfect zero point" (aside from stressing the Triac) ? Phil's measured 49.55 % duty cycle is only 0.45% from perfect :)) ... or am I missing something ? And that 0.45% would be the "tristate region", correct ?

    For Zero Crossing detection, some of the circuits I've seen used resistors direct into the microcontroller input (220K each, 1/2 watt). ...
    jmg wrote: »
    I have seen special resistors like the ex Philips VR68 series, used without isolation, they are rated to 10kV, and many-megs keeps the ground current to well below safe levels. 10M~33M or even their top end 68M could be considered with modern sub uA leakage MCU pins.

    Apparently, Vishay still makes these, but I (perhaps naively) don't trust the level of protection.

    Why?

    I have boxes full of dead (X-10) dimmers which, just as John Z. describes, have high ohm'ers connecting the AC directly to the pin of a PIC. I yanked a few of the PICs out of circuit to test - all DOA after a series of T-Storms blew through town (and maybe some UFO's flying over too LOL). So, for as cheap as Opto's are, it still seems safer to me. I don't like fried Propeller :-P

    Actually, the reason for my OP is towards making my own remote controllable dimmers to replace the old X-10 stuff --- so the help thus far has been valuable! (Yes, I could by OTC units, but where's the FUN in that !?)

    An electrostatic aside: I live in the "lightning capital of the northern hemisphere" (Florida) and I've seen spikes blow apart MOVs and blast even those metal glazed high-ohmic resistors right off a board ... while leaving little evidence elsewhere on the board(!) and adjacent circuits, on the same power leg, unharmed (!) Don't ask me why - lightning is just Phreaky Stuff (tm). (Probably an interesting topic for another thread ...)

    Considering the price difference of max $1 per unit, why go without optos? (Granted a big enough spike / surge will nuke anything ;-/ )
  • jmgjmg Posts: 15,144
    edited 2017-05-02 00:51
    * Channel matching will be better on AC input opto, as the TRX is common, just LEDs can vary.
    What is "channel matching" and "TRX" ?
    Sorry, was a bit cryptic.
    TRX is transistor - which has an associated Beta and optical variance when there are 2 of them...
    Channel matching is the variance between two like items, eg 2 diodes or 2 transistors.
    * Phil's circuit has a nifty series connection of the optos.
    That gives a tri-state region, so has very low static current, and high sensitivity (pluses), but it only has one edge per crossing, so you lose the ability to interpolate the two edges for a near perfect zero point.


    What are the implications of not having a "near perfect zero point" (aside from stressing the Triac) ? Phil's measured 49.55 % duty cycle is only 0.45% from perfect :)) ... or am I missing something ? And that 0.45% would be the "tristate region", correct ?
    Likely just the purist in me....
    The 0.45% is probably more down to gain differences in going different paths.
    You can push that down with higher drive current, but at the cost of more power loss in the resistors.
    The opto drive resistors still need care, as they can have high impulses, and need to be pulse rated.

    On the SMD front, I see Bourns have
    CRS Series - High Power Anti-Surge Chip Resistor
    rated to 4kV pulse in 2512 case, > 10k, for 18c/1k

    I have seen special resistors like the ex Philips VR68 series, used without isolation, they are rated to 10kV, and many-megs keeps the ground current to well below safe levels. 10M~33M or even their top end 68M could be considered with modern sub uA leakage MCU pins.

    Apparently, Vishay still makes these, but I (perhaps naively) don't trust the level of protection.
    I've seen them used in 240V Mains, and also on Electric Fences(!), with no failures....
    - however, they are physically large, not SMD handling, and not that cheap...

    I see there are newer HVR25, HVR37, that seem to be similar specs. (HVR68 seems retired, so maybe the HVR37 was able to meet all the specs)
    The HVR37 10M may be ok here...
    It would need good low leakage PCB design, with 10M, 1uA of leakage is a 10V shift in ZCD threshold.

  • John A. ZoidbergJohn A. Zoidberg Posts: 514
    edited 2017-05-02 14:15
    Apparently, Vishay still makes these, but I (perhaps naively) don't trust the level of protection.

    Why?

    I have boxes full of dead (X-10) dimmers which, just as John Z. describes, have high ohm'ers connecting the AC directly to the pin of a PIC. I yanked a few of the PICs out of circuit to test - all DOA after a series of T-Storms blew through town (and maybe some UFO's flying over too LOL). So, for as cheap as Opto's are, it still seems safer to me. I don't like fried Propeller :-P

    Actually, the reason for my OP is towards making my own remote controllable dimmers to replace the old X-10 stuff --- so the help thus far has been valuable! (Yes, I could by OTC units, but where's the FUN in that !?)

    An electrostatic aside: I live in the "lightning capital of the northern hemisphere" (Florida) and I've seen spikes blow apart MOVs and blast even those metal glazed high-ohmic resistors right off a board ... while leaving little evidence elsewhere on the board(!) and adjacent circuits, on the same power leg, unharmed (!) Don't ask me why - lightning is just Phreaky Stuff (tm). (Probably an interesting topic for another thread ...)

    Considering the price difference of max $1 per unit, why go without optos? (Granted a big enough spike / surge will nuke anything ;-/ )

    I stayed 15kms from a lightning prone zone in a tropical area, and even that we do hear quite a lot of really loud thunders and lightnings that messes up with the circuit breakers.

    And of course, I've seen a MOSFET being obliterated by clumsy grounding during oscilloscope probing. It just splits into half! :o

    I have been planning to make my own lamp dimmers too (another microcontroller to control the firing angles etc, and esp8266 for communication), but in where I work, I've seen enough exploding and all the very weird things going on (like interference and noise), so it's best for me to get myself a ready made one. (My fire insurance doesn't cover uncertified self-engineered dimmers if they are faulty!) :)

  • Ah, and I know I'm extremely prudish about this, but I need to address this issue if you guys working with lamp dimmers: Please observe the safety and never assume anything! 110/230V kills like a blood thirsty shark and doesn't care if one is an engineer or not!

    If it is permissable, start with an isolation transformer with a low voltage, and don't poke the live circuits with the oscilloscope probes if you do not know where it ends!

    Stay safe and strong, and enjoy the making process! :)
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2017-05-03 01:23
    110/230V kills ...
    Stay safe and strong, and enjoy the making process! :)

    Always important to keep safety in the forefront, of course.

    I've worked with the stuff for years- and am still alive ... I think
    My fire insurance doesn't cover uncertified self-engineered dimmers if they are faulty!

    In my case here, the commercial property rules are a bit looser than residential. As long as the wires going into and out of the electrical box were installed (or underwritten) by a licensed electrician, and everything meets code (e.g. wire gauge, the box type and capacity, etc) and the code enforcement / building inspector is OK with it, there's not a problem.

    Your mileage (and voltage :)) may vary ...

    I always pull permits (even when I technically don't have to.) And in this particular instance, I use metal boxes, fully grounded, of course.

    I'm interested in hearing about what you're doing / planning with your dimmers.

Sign In or Register to comment.