[Review Request] Trailing Edge SSR, First time dealing with mains! - Page 1
Forum section: electronics / projects

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 03, 2024, 09:09:10 pm
content: Hi, this is my first time dealing with anything above 24v DC, so I'm terrified. to avoid a trip to the afterlife, I thought I share this with you, and get your opinion on it.My scope doesn't have a differential probe and I'm broke, so I either have to just use my regular probes (scary!) or just YOLO it and hope it's working correctly.The thing is, SSRs are annoying, they're blind, use triacs and there's a lot of explosive clones out there, so I made my own.I used pre-made modules for ac to dc and the isolation as 200v+ dc is even scarier than 120v AC, and I had no idea how to choose a coil for the dc-dc isolator so I just put on a nice pre-made module there too. the 5v is used for the board connecting to it to ease wiring and its boosted to 12v for the gate. however I'm thinking of just putting a 12v converter there and just getting the logic input from the MCU side.I'm hoping my zero crossing signal isn't too awful (the datasheet for the H11L1 says 1ma forward current? so it should detect the crossing at 30v to -30v, I can use software to find the middle ground)the board is designed for 8A/800W (tho I'll use it with 400w) I'll add a heatsink on the silicone side of the MOSFETs, i wanted to add exposed copper on the back but that'd be connected to neutral and I want to ground the enclosure.I'm also very worried about the vias I used and having HOT and NEUT cross over each other, and I also worry my traces for the mains are too small? the 5v can only do 500ma anyways so I'm sure that side is more than fine.

author: thm_w
author_rank: Super Contributor
timestamp: April 03, 2024, 10:55:27 pm
content: - Is F1 a mains rated fuse?- Do you have any trace spacing requirements in your design rules, specific to live and nuetral?- Have you calculated the power dissipation of the FETs?Not saying you shouldn't complete this project, but,- 25A random turn on SSR with heatsink for $4 CAD:https://canada.newark.com/multicomp/mc002253/solid-state-relay-25a-4-32vdc/dp/48AC9088- 10A zero crossing SSR with heatsink for $10 CAD:https://canada.newark.com/multicomp/mc002281/ssr-4vdc-32vdc-10a-din-rail-panel/dp/48AC9104- 100A no heatsink for $14 CAD:https://canada.newark.com/multicomp-pro/mc002306/solid-state-relay-100a-4-32vdc/dp/48AC9129

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 03, 2024, 11:06:10 pm
content: Quote from: thm_w on April 03, 2024, 10:55:27 pmhttps://www.lcsc.com/product-detail/Fuses_Reomax-SST2100_C2762480.htmlThis is the fuse I chose.QuoteI have no idea... I set it to 0.5mm distance and 1.5mm trace width, I used 1mm/0.6mm vias.and uuuh... wow I had no idea those exist, now I can just turn the circuit into a zero crossing detector? Although, at that point, I might as well add the two small/relatively cheap MOSFETs and enclose it, unless I use the second one you linked but the datasheet doesn't explain much, and it might be a pain to ship here?but i'm very confused about how to control the SSR you linked!EDIT: ooh these only on-off like a relay, I want to adjust my load power to say 80% by cutting the ac wave off before it finishes each cycle, or maybe a two-three phase where 50% is only every other wave allowed and 75% is one wave and half of the other, I want to PID control a heater or lights

author: thm_w
author_rank: Super Contributor
timestamp: April 03, 2024, 11:17:33 pm
content: OK fuse is good. 0.5mm is a bit low, absolute minimum is more like 0.75mm, and to be overly safe you might want to bump up to 2mm.Those SSRs are controlled with a DC signal, 4-32V for on. Info should be in the datasheet.Newark is quoting me $12 for shipping to Canada.

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 12:34:21 am
content: Optional: Replace your complex multi-supply gate driver & optocoupler with this guy if it is fast enough for you:https://www.mouser.ca/pdfDocs/vom1271.pdf

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 04, 2024, 04:13:47 am
content: Quote from: BrianHG on April 04, 2024, 12:34:21 amit's 1.5$ vs 0.13$!tho the pull-down worries me as it's a resistor and not a transistor, it'll go low kind of fast and heat up, should I add a transistor behind it to drive the gate low when not high?found the tlp152TPL tho, it's cheap enough!gosh Kicad does suck tho, importing and finding footprints is a pin! if I could get paid for it i'd work on that software non-stop

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 05:05:34 am
content: Quote from: AmeliaBuns on April 04, 2024, 04:13:47 amNo pull-down resistor needed for the VOM1271. Also, no separate isolated 12v supply, so, unless that supply is free, the difference isn't from 1.5$ to 0.13 cents.Next, timing. Fair enough. You are using a 4.7k pulldown on a 4N35. That's an ~30us delay turn off compared to the VOM1271's 24us turn off time. The turn on for the 4N35 is much faster. However, if you do not want your mosfet to warm up, you should be using a CMOS output or push-pull gate driver optocoupler. Their transition time is measured in the ns, not microseconds.Example: H11L1 / H11L2 / H11L3, ~40cents, CMOS logic out.Supply the detector logic with 12v and the output will have a rise and fall time of 100ns roasting everything mentioned to date. Though, the signal delay will be 1000ns / 1Mhz, this still roasts everything else and you mosfet wont heat up due to the gate being only off or on.However, I see the problem with the H11L1 output being inverted as your default for the mosfet will be on.Ok 1 sec, looking at logic isolaters.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 04, 2024, 05:18:41 am
content: Quote from: BrianHG on April 04, 2024, 05:05:34 amwait, the IC you linked doesn't need 12v? how does it drive the gate tho? it needs 10v min to reasonably turn onQuotea consistent delay can be compensated for in software, my worry is the period the MOSFET gate spends in a non-idea state (say only 8v-5v-3v) as it'll have increased resistance during this period. so i want a fast shutoff time not a fast response time!I'm still a bit confused tho by what you mean with the last sentence.and an inverter logic is easy to re-invert in a microcontroller!

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 05:42:19 am
content: Quote from: AmeliaBuns on April 04, 2024, 05:18:41 amThe VOM1271 has a photo-voltaic solar cell in it. The LED illuminates the solar cell & that cell generates the electricity. Though, I believe it guarantees 8v and maxes out at 9v. I also believe this is what is used in AC/DC solid state relays.QuoteAll I mean in the last sentence is that with the H11L1, when the LED is off, the output is open-collector. So, if you pull-up to 12v, when the LED is off, the mosfets will always be on. When you turn on the LED, that will pull down the output to GND and turn off the mosfets.Again, the H11L(1/2/3) are truly good if you want super speed, or to precisely PWM your AC mains as that optocoupler will be ~20x the propagation speed of a 4N35 + >100x faster rise and fall times when driving the gate.The only way faster solutions are the true IGBT/Mosfet gate driver optocouplers at >2$ each. They have a push-pull output with a 3amp gate drive down in the ~35ns range. Those default to gate-off, but you still need your 12v supply unless you search for the ones with an integrated isolated supply.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 04, 2024, 05:53:06 am
content: Quote from: BrianHG on April 04, 2024, 05:42:19 amoh huh, cool! tho I worry about the current generatedand theH11L1 is used to get the crossing signal to the MCU so it's only a signal! my worry right now is where the crossign point will be, as with two 20k resistors, it's at 40k resistance. so 1ma at 40v

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 06:00:35 am
content: Quote from: AmeliaBuns on April 04, 2024, 05:53:06 amJust so we are clear, I was talking about using a H11L1 to drive your mosfet gates. I never looked at your AC signal crossing detector.

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 06:46:30 am
content: Hmmm, they were cheaper than I thought:https://www.mouser.com/ProductDetail/Infineon-Technologies/1ED3140MU12FXUMA1?qs=8Wlm6%252BaMh8TrvCPMF8TYxA%3D%3D<45ns propagation delay. <5ns rise and fall time. 6 amp gate drive current, separate high and low drive resistors.Arrow has the 1ED3140MU12FXUM series for 89cents each, look for the datasheet.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 04, 2024, 08:42:59 am
content: Take a look at the Skyworks Si8751 - avoids the need for the isolated gate supplyThere are better zero-cross circuits with much lower power dissipation and more consistent timing- you can use a capacitor, transistor and some passives to generate a short pulse at the zero crossing.

author: voltsandjolts
author_rank: Unknown
timestamp: April 04, 2024, 09:41:57 am
content: https://dextrel.net/dextrel-start-page/design-ideas-2/mains-zero-crossing-detector

author: Wolfram
author_rank: Frequent Contributor
timestamp: April 04, 2024, 11:11:49 am
content: The 5V/12V DC/DC in your design has inadequate clearance, and likely also inadequate internal isolation ratings. The clearance between the Q1 drain and the trace connected to Q2 drain also looks problematic. Be careful about running traces under components as well, for electrolytic caps and most through-hole resistors this is a no-go, for film caps it can be fine.I recommend looking up the required clearance and creepage required and stick to it, since this is equipment connected to mains. Also any component crossing the barrier needs to have an appropriate isolation rating. Is the control side SELV/PELV?

author: BrianHG
author_rank: Super Contributor
timestamp: April 04, 2024, 04:38:16 pm
content: Quote from: mikeselectricstuff on April 04, 2024, 08:42:59 amThat's the isolater I was looking for...Damn annoying when you google all the key words you can think of and never hit the right part...

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 06, 2024, 05:33:00 am
content: Quote from: BrianHG on April 04, 2024, 06:00:35 amOooh. i see, I switched that for the TLP152TPL_E. I wonder if i'm smart/resourceful or just greedy and paranoid, counting my BOM like that

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 06, 2024, 05:36:39 am
content: Quote from: Wolfram on April 04, 2024, 11:11:49 amCould you elaborate more? I'm just a hobbyist and aren't that good with electronics! the datasheet for the 5v-12v states: "I/O isolation test voltage: 1.5k VDC"

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 06, 2024, 05:39:17 am
content: Quote from: BrianHG on April 04, 2024, 04:38:16 pmit seems cheaper to just use the octocoupler with the built-in driver and isolator, 5$ for the chip :O

author: tooki
author_rank: Super Contributor
timestamp: April 06, 2024, 01:46:00 pm
content: Quote from: AmeliaBuns on April 03, 2024, 11:06:10 pmHow odd, for devices calledsolid staterelays.Quote from: AmeliaBuns on April 03, 2024, 11:06:10 pmYou can buy modules like that. However, for a heater that’s largely pointless, since the thermal mass makes sub–line-cycle PWM pointless. For heaters, cycle times of 1 second to many seconds are typically more than adequate, depending on the load. When using mechanical relays or contactors, you don’t want short cycle times because the relay or contractor will fail, so cycle times of e.g. 20 seconds were common. With SSRs, there’s no harm in going shorter. In two recent projects at work, I’m using off-the-shelf temperature PID controllers, and just selected their minimum cycle time of 1s. The controller’s SSR control output then goes to an SSR with zero-voltage switching, which avoids electrical noise.You’d have to be using a grossly oversized heater on a small thermal load to really reap benefits from sub-second cycle times. (An example: modern soldering irons. Huge power reserves make them responsive and quick to heat up. Consequently, they need well-tuned PID and power controllers that give reasonably granular power control. I’ve never seen one that does sub-cycle “dimming”, though, they just control whole cycles. At 50-60Hz, that means power granularity of 2% or 1.67% steps, respectively, more than adequate for this.)Lighting is different. But for that, rather than dimming the AC waveform, just use modern LED lighting with high-frequency PWM, or constant-current control, of the DC.

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 07, 2024, 06:09:42 am
content: Quote from: tooki on April 06, 2024, 01:46:00 pmFiiine, i'm being too paranoid! I'll just use an SSR. but do I use it at 50hz blindly? because that'd not sync up with the AC, or still just use a zero crossing detector, but this time only do what you said (only turn off/block cycles instead of chopping them)

author: tooki
author_rank: Super Contributor
timestamp: April 07, 2024, 12:22:51 pm
content: 50Hz is the line frequency. You can’t PWM a zero-crossing SSR at the line frequency because it’ll rarely turn on, since you’ll be turning off the input signal before it can ever turn on the output. (Remember, it’s got to wait until the next zero-crossing, plus some delay in its own zero-cross detection circuitry, to switch the output.If you want single-cycle control, you’d need to implement your own driver circuit and control a triac. But again, IMHO lighting should be done with high-frequency (over 2kHz rock bottom, but over 20kHz ideally) PWM, or linear constant current control, of the LEDs. For heating, you do not need single-cycle control. It complicates your circuitry and gains you nothing. A cycle time of 1 second is more than adequate for almost any heating application, and is already overkill for a great many applications.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 07, 2024, 07:55:53 pm
content: Quote from: AmeliaBuns on April 07, 2024, 06:09:42 amFor heating :You could put the mains detector across the load, so you can detect when it has turned on, and keep mains cycle count/sync.You should always emit full mains cycles (2N 10ms triggers), to keep AC loads on transformers balanced.If you are making lots of these, you may need to consider load rules standards.The legacy Mains Zero Cross detector in #13 can be refreshed into 2024, by using a low threshold, low C MOSFET, which allows much larger R values and lower C, for much lower power loss.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 07, 2024, 09:44:28 pm
content: Quote from: PCB.Wiz on April 07, 2024, 07:55:53 pmNo, becausea) The capacitance is needed to provide the power to turn on the optoisolatorb) A transistor has a much more predictable turn-on voltage than a MOSFETPower disssipation of this circuit is pretty minimal - way better than a dumb rectifier/resistior, and no real benefit in trying to optimise further

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 07, 2024, 09:54:41 pm
content: Quote from: mikeselectricstuff on April 07, 2024, 09:44:28 pmDid you actually try it ?Quote from: mikeselectricstuff on April 07, 2024, 09:44:28 pmPartly true,somecapacitance is needed, 10uF is excessive.Quote from: mikeselectricstuff on April 07, 2024, 09:44:28 pmThere is more in play than simple 'turn-on voltage'. Try it, and learn.Quote from: mikeselectricstuff on April 07, 2024, 09:44:28 pmFor some values of 'pretty minimal'.With power and size being important globally and SMD parts it isalwaysa benefit to reduce power.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 08, 2024, 07:41:54 am
content: Quote from: PCB.Wiz on April 07, 2024, 09:54:41 pmBy the time you account for loss of capacitance due to voltage, variation in supply voltage and optocoupler aging, 10u is far from excessive (I did some tests on this a while ago when designing a product). 10u ceramics are hardly expensive so little reason to go lower.QuoteA transistor works just fine here, no reason to spend more on a MOSFETQuoteAt some point any differences are too small to bother with. You will need large/multiple dropper resistors anyway to get sufficient voltage rating, so power dissipation in them isn't an issue

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 08, 2024, 07:54:30 am
content: Quote from: mikeselectricstuff on April 08, 2024, 07:41:54 amIt's not just a question of 'hardly expensive'.The circuit you linked has a significant delay on startup, (thanks to that big cap !) so it might be ok for sync to mains, but it's poor for load-verify sense..The OP is now talking about heating control using whole mains cycles, which means they need to load sense,

author: AmeliaBuns
author_rank: Regular Contributor
timestamp: April 09, 2024, 02:33:22 am
content: Quote from: PCB.Wiz on April 07, 2024, 09:54:41 pmya'll be nice to each other! but I actually can't figure out how the zero crossing circuit works!

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 09, 2024, 03:10:11 am
content: Quote from: AmeliaBuns on April 09, 2024, 02:33:22 amFrom the earlier link, there is an addendum SCHC1 is charged after a few cycles, and the current coming from the mains continues to charge most of the time.When the mains current is not enough to overcome the 22k current (ie close to mains zero) then Q1 turns on, briefly.Some charge balance occurs so mains injection current matches (22k + opto impulses).There is also an EDN variant of this SCHhttps://www.eevblog.com/forum/projects/mains-zero-crossing-detection/msg3469950/#msg3469950In this EDN circuit, D3 and R4 are somewhat optional.As mentioned above, in 2024 with modern opto couplers cheap at 200-400% CTRs, you can increase resistors and drop the power loss on the mains side.