SDG

Ғылым және технология

Refining the zero crossing detector for triggering the gate on the SSR circuit
Micsig Differential Probe: www.banggood.com/custlink/33G...
Use discount code: "DP10013" to get it for $139.99!
A Micsig Scope: www.banggood.com/custlink/33m...
Schematic: sdgelectronics.co.uk/lighting...
$2 for 10 PCBs in any color: jlcpcb.com/
Support the channel: / sdgelectronics
Visit my website: www.sdgelectronics.co.uk/ #ElectronicsCreators

Пікірлер: 22

  • @ericgee6585
    @ericgee65855 жыл бұрын

    Very interesting to watch the design process. Thanks for your time.

  • @OrbiterElectronics
    @OrbiterElectronics5 жыл бұрын

    Thanks Steve, interesting project. Looking forward to seeing what you get from that uC if anything. I bought a couple of those trailing edge dimmers for my LEDs to get rid of the buzzing from the standard type, they work a treat 👍 Cheers John

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    The Varilight ones are the most versatile out there, but they need a method to lock out the 'programming' mode as guests always mess them up. The trailing edge dimmers make the isolation transformer buzz quite heavily. I'm probably generating quite a lot of harmonics.

  • @Mr.Leeroy
    @Mr.Leeroy4 жыл бұрын

    7:26 digital zero and one thresholds are probably in different voltage points. unless you are sampling with very high end ADC, middle point is probably not a zero-crossing.

  • @robertcalkjr.8325
    @robertcalkjr.83255 жыл бұрын

    Thanks Steve!

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    Thanks for watching Robert :)

  • @electronic7979
    @electronic79795 жыл бұрын

    Very good and useful video 👍

  • @stupid-handle
    @stupid-handle5 жыл бұрын

    Yes, they might probably be feeding the AC signal directly to the relevant mcu pin through a large value resistor, and so might probably use the same "technique" to power it, being the whole thing in the high-voltage side. For your case, wouldn't it be more reliable to raise an interrupt before the zero-crossing event, such that not only the mcu would be at charge before it happened, but also simply by checking the state of a pin (which might even be the same that caused the interrupt) could help it decide exactly when to perform switching? The "problem" is I see by doing it in software is that due to variations on the power-grid supply, the last time you registered a zero-crossing event might not translate to the exact time you'd want to wait after your next zero-crossing interrupt. Whether that, added to the time it actually takes for the mosfets to physically close could ever result in the same I don't really know, but in any case you'd get an added layer of robustness plus some spare mcu-processing power in the case you'd want to get more off the same hardware without having to deal with complex firmware changes and such for small or simple features you might want to add or try in a future.

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    There's a few parameters at play - if you directly link the AC waveform to the pin, you need to either scale down the voltage, or limit the current. The pins have a specified range for threshold voltages for high and low, which if you scale down results in a wide band where the MCU will think the zero crossing event has triggered. If you limit the current, the pin or clamping diodes need some recovery time. I simplified my explanation of what the firmware is actually doing and probably didn't explain it that well, but when I finish the firmware I'll put it on the website - it is triggering all the timers on the approach to 0 as detected by the zero crossing detector (that pulse in turquoise on the scope), so is completely stable and dictated by the incoming AC (it'll work on 60Hz and still work at 400Hz...). This interrupt is somewhere around 300us before the actual zero crossing point. The bit that it learns from previous waveforms is how long it takes from this interrupt to where the zero crossing point actually occurs. There is also a 'fudge factor' added in to allow this to be fine tuned if needed.

  • @stupid-handle

    @stupid-handle

    5 жыл бұрын

    Your explanation was fine. That I can remember off the top of my head I've done something similar with software usarts in order to find the center of the incoming pulse and get both to sync. I commented based on the comparator circuit you showed today, your comments about the power dissipated by the resistors, and the fact that this comparator could be on the high-voltage side, same as in the commercial dimmer. So in my approach, the comparator would turn the opto-isolator on at, say +15/-15V while the sine wave is approaching zero, raising an interrupt, and off again little before zero. The mcu would "awake" with the interrupt, and would wait for the same pin to go low to fire the mosfet. But this will probably be more suitable behind a transformer whose peak RMS wouldn't exceed that of the comparator, because I reckon it would end up having more loses than your circuit if facing mains power, or else a differential instrumentation amplifier properly rated should be used, which are pricey, and as you say, make things more complex. So if your circuit works up to 400Hz and you still have room to account for fine-tuning it should be fine. I was also thinking after I posted that variations on mains between two adjacent zero-crossing events might not be enough to burn the mosfets after all, but again my experience with mains stuff is nil.

  • @partouelectric2353
    @partouelectric23533 жыл бұрын

    Thanks, Steve great video. Have you tried FL5150 IC from On Semiconductor? It may simplify your circuit and zero crossing issue

  • @partouelectric2353
    @partouelectric23533 жыл бұрын

    I am trying to build a board with 12-volts AC input to drive commonly available 12-Volt LED's. Most circuits are designed for 120-volt lights Do you have any suggestions. I found FL5150 IC quite useful for this job but the designs are for 120-volt lights

  • @The.Doctor.Venkman
    @The.Doctor.Venkman5 жыл бұрын

    More questions, Steve: I see you're using a Microchip programmer. What is the model and did you put those nice rubber feet on it yourself? (I've got the Pickit 4) Also, I'm assuming you're using MPLABX or an older version? If so, are you programming in Assembly or C?

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    Hi Andy, it was the RealICE pictured in this video (although upside down). I tend to use that or the ICD3 mainly. Yes, I use MPLABX and in this project I'm using XC16 for development in C. I still use assembly where appropriate.

  • @The.Doctor.Venkman

    @The.Doctor.Venkman

    5 жыл бұрын

    @@sdgelectronics Cheers, Steve - Good to know and thanks.

  • @power-max
    @power-max5 жыл бұрын

    How would this design work with a very nasty input waveform from say a generator?

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    There should be no trouble, the only waveform that potentially could cause trouble would be a modified sine wave inverter, but this would kill any dimmer switch.

  • @jackbuechler
    @jackbuechler5 жыл бұрын

    What package do you use for your circuit diagrams please?

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    For schematic and layout I use Labcenter Proteus. It's a relatively old version but works well.

  • @drakonzebra
    @drakonzebra5 жыл бұрын

    Why are you using 12V to drive the MOSFETs?

  • @sdgelectronics

    @sdgelectronics

    5 жыл бұрын

    Vgs on these MOSFETs is only around 20V or so. It could be increased at the risk of transients destroying the gate. Much lower and the dissipation starts to increase.

  • @Mr.Leeroy
    @Mr.Leeroy4 жыл бұрын

    note H11AA1 optocoupler

Келесі