Author Topic: Mains switching research break out  (Read 7651 times)

0 Members and 1 Guest are viewing this topic.

Offline wizard69

  • Super Contributor
  • ***
  • Posts: 1184
  • Country: us
Re: Mains switching research break out
« Reply #25 on: August 03, 2020, 03:43:58 am »
what on earth are you trying to achieve  :palm:

Don't use fets and simple opto coupler. You should look into using opto triac and triacs for the actual switch. This class AB amplifier you made has some significant drawbacks and most likely overheat the fets (not to mention zero crossing distortion etc) you also forgot protection features like movs, X and Y class rated caps depending on phases / netrual, common mode choke / ferrites for noise.


Perhaps I should have been more explicit. The object is go beyond triacs, which don't work with many modern lamps types to start with, and create evil harmonics (leading edge on, zero cross off).
I know it is old fashion but why not use a relay?   Use an opto isolator to turn in on that can drive the coil directly.   
Quote
I was clearly concerned about the commutation (class AB as you called it), hence the question on that. The idea for that architecture is not from me ;-)

But if it's seriously flawed please be specific. What's the alternative? Separate and retrigger?
I'm not here to call it flawed but do question if it make sense in this use case.   If I understand your goals, the idea is to sell this to people that might have any sort of use you can imagine.   So why not make it as simple and rugged as is possible?   Frankly an ideal device would take a 5 VDC signal at what ever current the opto requires and that is it.
Quote
The other most common/sane architecture (other than full blown industrial AC drive style DC Bus and re-chop) is MOSFET wrapped in a in a bridge rectifier, which has the same challenges ( I believe) with lots more parts that don't add anything..

Thanks for your thoughts and the ideas on protection protection features particularly. I had not yet added any, as trying to validate architecture first ("early sketch..."), but those are all certainly valid suggestions.

I look at something like this and frankly don't see a Sane reason to use any sort of solid state switch to drive the output.   This mainly because you have no idea what the load will be.

 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #26 on: August 03, 2020, 03:48:25 am »
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #27 on: August 03, 2020, 09:44:52 am »
According to your circuit, your making an AC PWM on/off switch, not a variable output DC PWM supply.

A variable DC PWM output supply has a topology where when you turn on the low side and high side mosfet simultaneously, you short the V+ rail to your GND.  You are not making this, so in the TI datasheet, the example circuit on page 1 with the added diodes and resistors to tame the turn on and turn off speed do not apply to your design as both mosfets are either on, or off at the same time.  All you need is a series resistor from each output to each gate.


Yes, that's the intention. ie, I am not making an AC motor drive. They have a full rectification stage first then a DC bus with huge caps and then an H-Bridge type switch topology. The advantage of that is that they can make AC of any frequency, hence "variable speed drive". My circuit can't do that. All it can do is operate in three  modes (I know you have understood this, but I am catching up on what was clearly an inadequate circuit description in original post which caused confusion):

1. ON / OFF multi cycle period (say 1-2 seconds), the uP can (optionally) do the careful timing to ensure it switches the MOSFETs off during zero cross and hence causes less harmonics ... doing the job of an SSR - if this is all I wanted I should use an SSR - this is the relatively trivial part

2. What is often referred to as chopping / dimming / phase angle switching etc. Means turning the devices on / off once per 50/60Hz half-cycle. This can be done on the leading edge, ie wait after zero cross before switching on, or on the trailing edge, ie turn the devices off early before the half cycle completes. The former (ie leading edge) is what triac based dimmers do, but they can't do trailing edge which has advantages in many circumstances.

3. PWM of the sine wave at frequencies of multiple kilohertz. This is different to the AC variable speed motor drive because it is not switching DC to make AC of any frequency, it is switching the AC sine wave. That means we can "vary the effective amplitude" of the sine wave, but we cannot change it's frequency.

So proper induction motor control is beyond the scope of this "research break out board". It's purpose is to introduce hobbyists / students to the various kinds of AC switching you can do. It should be able to demonstrate the above 3 modes. The purpose is to educate and provide information on strengths weaknesses, from a "ready made box" which can do all 3 modes and be safe. Someone above mentioned current/voltage monitoring and that would be a great addition. Non-trivial due to the isolation requirements, but I might need to go there.

(I might edit original post to put this description there)

So yes, the 2 MOSFETs will always "switch on at the same time". Actually that is not quite correct. In the "upper half cycle"  (when Vline > Vneutral the lower MOSFET on my schematic (Q2) will be in "body diode bypass", ie whatever you send to its gate is irrelevant.  In that upper half cycle the "triggering which is important is on Q1. In the lower half cycle, the roles are reversed.

Now my original circuit with the optocoupler & +12V supply referenced to joined sources and that pull down resistor meant that the uP didn't have to care which half cycle it was in. It would just look at the zero cross info from U1 and decide when to trigger U2 - upper or lower half cycle, don't care.

Your suggestion for a proper MOSFET driver is very good, just what I was looking for, and will be needed to achieve Mode3 = PWM > 1kHz. However we are now talking about separate +/-15V gate triggers... (maybe not...see below)


I made a little mistake, you only need 1 cheaper single DC-DC 15v isolated converter and a single mosfet driver as your mosfet sources are connected together.  You only need to go from 0v to 15v from the 'source' on both.


Let me paraphrase for clarity. I initially understood your requirement for a +/-15V supply like this: Output stages of a driver like the UCC21220 are "functionally isolated from each other". ie they have VDDA/OUTA/VSSA and quite separately VDDB/OUTB/VSSB. in this case the sources are linked and therefore we would therefore join VSSB and VSSA together. I had originally thought: "Ah but we need to trigger one with +15V and one with -15V", but I am now realising (the same as you did?), that because they are both N-Channel devices and the gate we care about (ie the one which needs triggering, and not the one in body diode conduction) will always need a "positive trigger relative to the common sources".

Have I understood this correctly and am I correct in thinking that feeding what will be "an effectively -15V pulse" to the "non-active device in body diode conduction" will not bother that device at all...? It's "off", and turning it off some more, is still off. Do you have a part number for an equivalent single driver? Is it "normal" to use an isolated driver like this, on 2 MOSFETs, one of which has reverse Vds on it? I suspect it's not very common - except in high power trailing edge dimmers perhaps. Does it matter?

So then yes. single driver and single +15V auxiliary, isolated SMPS. Much easier - and actually kind of rather similar to what I had orginally, but with a proper driver which includes the job of the U2 optocoupler and drives the gates much more competently, allowing "HF" switching, and hence PWM. 

Thanks for the links to the SMPSs - easier now as you say. Some great options there.

Sorry for the long post. More words = more clarity...?
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #28 on: August 03, 2020, 10:02:55 am »

I'm not here to call it flawed but do question if it make sense in this use case.   If I understand your goals, the idea is to sell this to people that might have any sort of use you can imagine.   So why not make it as simple and rugged as is possible?   Frankly an ideal device would take a 5 VDC signal at what ever current the opto requires and that is it.

I am sorry, I now realise that my original post had insufficient detail of what the purpose of this circuit was and how it is intended to operate. I have now put a fuller description of those things in the OP.

I am also not yet clear "whether I want to sell this". It is an area of research which interests me, and on which I see many videos/blogs which do many things wrong or are even outright dangerous. So if ultimately people find it interesting and want to "buy something", sure, maybe... but it's not yet a goal as such. In fact, as you correctly point out, I don't know what the load will be and the whole point is to demonstrate how different loads respond to the different modes of operation (see updated description in OP). So whatever the final design, it will not be "optimised for the load", so it will necessarily fall short of a custom design for a particular type of load in either cost or performance or both.

« Last Edit: August 03, 2020, 10:16:23 am by oschonrock »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #29 on: August 03, 2020, 01:27:48 pm »
So yes, the 2 MOSFETs will always "switch on at the same time". Actually that is not quite correct. In the "upper half cycle"  (when Vline > Vneutral the lower MOSFET on my schematic (Q2) will be in "body diode bypass", ie whatever you send to its gate is irrelevant.  In that upper half cycle the "triggering which is important is on Q1. In the lower half cycle, the roles are reversed.

No, it is important that both mosfets are on.  Relying on a body diode means a 1v to 1.5v drop in high current applications.
Say 2.5kw switch.  1.5v drop x 10 amp means 15 watts of heat generated on an off mosfet while using it's body diode to conduct current.  Having a rugged mosfet turned on in this case means when using something like a 'STB40N60M2' at 88mOhm on means a 0.88v drop at 10 amps generating only 8 watts of heat.  Also, with high frequency load transients, that mosfet body diode may switch on and off adding a degree of signal noise while having the mosfet off relying on that internal diode, with the mosfet on, it acts like a fixed resistor conducting current swing transients in both directions, IE, no 1v crossover glitch.
« Last Edit: August 03, 2020, 01:30:08 pm by BrianHG »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #30 on: August 03, 2020, 01:37:50 pm »
Let me paraphrase for clarity. I initially understood your requirement for a +/-15V supply like this: Output stages of a driver like the UCC21220 are "functionally isolated from each other". ie they have VDDA/OUTA/VSSA and quite separately VDDB/OUTB/VSSB. in this case the sources are linked and therefore we would therefore join VSSB and VSSA together. I had originally thought: "Ah but we need to trigger one with +15V and one with -15V", but I am now realising (the same as you did?), that because they are both N-Channel devices and the gate we care about (ie the one which needs triggering, and not the one in body diode conduction) will always need a "positive trigger relative to the common sources".

No I was mistaken.  Since both mosfet 'sources' are wired together, and they are both N-channel mosfets, the only valid gate voltage between both gates and sources is 0v for off, 15v for on.  You only need one isolated single 15v supply & a single isolated gate driver hence my additional posts with the new silicon labs IC and single supplies, both DC-DC and 240v AC-DC.  (My innitial comment was for an isolated gate drive each going their own way.  Use for a completely different application)

See top left diagram on page 5, 'Bidirectional MOSFET Driver Application' of the Vishay VOM1271 Photodiode Output Optocouplers.
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #31 on: August 03, 2020, 02:24:57 pm »
See top left diagram on page 5, 'Bidirectional MOSFET Driver Application' of the Vishay VOM1271 Photodiode Output Optocouplers.

Yes. That is the exact topology  I sketched in my original circuit isn't it?

I found it confusing to:

a) realise that the MOSFET will conduct "in reverse" if you just keep its gate positive with respect to source  (a BJT would never do that obviously, and this also answers the MOSFET vs IGBT question for this application. IGBT would require external diode at minimum) - so yes, not body diode, but just "ON" for the one which is "in reverse" (and the other one obviously)

b) the way those circuits are physically drawn on the page screws with my head. ::)  Something about the floating supply and having centre between the sources "grounded" with respect to that floating supply, if you understand what I mean...

So all sorted then. They will just both be "on" for the whole time while we give the driver a high (I just didn't realise that was possible and was therefore relying on the body diode in my thinking)

Last problem: I can't find a single channel isolated driver which I can actually buy. TI's page for example has just 6 parts if you select MOSFET, isolated and 1 channel.

https://www.ti.com/power-management/gate-drivers/products.html#o7=Isolated%20gate%20drivers&p1250=MOSFET&p480=1

and none of those are available in the UK, it appears.

I could just use that 2 channel half bridge one for the prototype. ...?
https://uk.farnell.com/texas-instruments/ucc21220d/dual-gate-driver-half-bridge-soic/dp/2843000

« Last Edit: August 03, 2020, 02:38:02 pm by oschonrock »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #32 on: August 03, 2020, 04:15:35 pm »
These arent as fast, but they are cheaper and available and you can still do over 25KHz PWM with them.  Plus they are optical coupling instead of capacitive.  This means 500ns delay from in to out, but they still have a good +/- 2.5amp drive with a 35ns rise and fall output and they are less than half the price of the TI parts.

VOD3120AD
Farnel has stock.
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #33 on: August 03, 2020, 05:43:55 pm »
These arent as fast, but they are cheaper and available and you can still do over 25KHz PWM with them.  Plus they are optical coupling instead of capacitive.  This means 500ns delay from in to out, but they still have a good +/- 2.5amp drive with a 35ns rise and fall output and they are less than half the price of the TI parts.

VOD3120AD
Farnel has stock.

Nice one thanks. DIP....sigh. Nice for prototype though.

25kHz PWM is totally excessive. We are not "modulating DC with a sine wave", for which you need maybe 15kHz to do it nicely. But we are just "dimming" an already existing sine wave for which you need, maybe, generously, 100x fundamental ie 5kHz. That's switching every 1.8degrees of phase! More than enough. Only advantage in going higher would be to get above audio and 20kHz would be totally sufficient for that.

How are you working out what PWM switching frequency we can get out of a MOSFET given a specific driver? It's been 30yrs since I have done those calcs. Ultimately down to thermal power dissipation during switching time based on the available charge from the driver?  Experience + dark art or something more quantitative?

« Last Edit: August 03, 2020, 05:45:30 pm by oschonrock »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #34 on: August 03, 2020, 05:55:36 pm »
How are you working out what PWM switching frequency we can get out of a MOSFET given a specific driver? It's been 30yrs since I have done those calcs. Ultimately down to thermal power dissipation during switching time based on the available charge from the driver?  Experience + dark art or something more quantitative?
There are others here far better suited to help you there.  All my designs to date have over 10x headroom on switching the mosfets, so I mostly rely on simple on-resistance and current calculation.

That virshay driver can do 100KHz if you look at the specs, but my head-room practice made me quote you the 25KHz figure.  If you ever made anything down at 15KHz, I would never buy it because my ears would go nuts from coil-whine.  Many old TVs drove me nuts & I already had a scan-doubled 31Khz large screen TV back in the early 90's when they were in they were over 15K$ (ouch to my pocketbook, but I had peace and silence).  Though I can no longer hear 25KHz, I remember as a kid I could hear all the ultrasonic alarms in the shopping malls and it drove me nuts as my parents couldn't hear a thing.  I have no interest in affecting children's hearing, so 25Khz is the absolute bottom I would allow in any of my designs.
 
The following users thanked this post: oschonrock

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #35 on: August 03, 2020, 06:02:27 pm »
That virshay driver can do 100KHz if you look at the specs, but my head-room practice made me quote you the 25KHz figure.  If you ever made anything down at 15KHz, I would never buy it because my ears would go nuts from coil-whine.  Many old TVs drove me nuts & I already had a scan-doubled 31Khz large screen TV back in the early 90's when they were in they were over 15K$ (ouch to my pocketbook, but I had peace and silence).  Though I can no longer hear 25KHz, I remember as a kid I could hear all the ultrasonic alarms in the shopping malls and it drove me nuts as my parents couldn't hear a thing.  I have no interest in affecting children's hearing, so 25Khz is the absolute bottom I would allow in any of my designs.

I was starting with what is necessary to drive the load smoothly and without too many harmonics that don't get filtered by the inductors. So the industrial approach (which is my background).  Small VSDs are generally 15kHz tops, that's why I picked that figure and since the amplitude is already modulated we wouldn't need even that. That's where my estimates came from. Humans didn't come into my thinking except for an afterthought. In a factory a bit of extra VSD whine just adds to ambiance!

Wow, you have some super good ears there. BUT, since you've been so super helpful, I promise if this ever turns into  a product, it shall have nothing less than 25kHz switching frequency for the Mode3 PWM.

 8)
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8111
  • Country: ca
Re: Mains switching research break out
« Reply #36 on: August 03, 2020, 06:14:42 pm »
LOL, Future Electronics has the SMD version VOD3120AB available at 0.76$ each, or 0.58£.

 

Offline hli

  • Frequent Contributor
  • **
  • Posts: 259
  • Country: de
Re: Mains switching research break out
« Reply #37 on: August 04, 2020, 01:49:57 pm »
If one needs a EU-style plug, Olimex has you covered: https://www.olimex.com/Products/Duino/Shields/PWR-SWITCH/
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #38 on: August 04, 2020, 01:58:32 pm »
If one needs a EU-style plug, Olimex has you covered: https://www.olimex.com/Products/Duino/Shields/PWR-SWITCH/

That's a cool thing, and very well priced. Not much detail about "what mode of switching it supports" (see more verbose explanation of the "3 modes" in OP at top).

If I were to guess, it's probably mode1, ie that thing is an SSR in a cool box? And it can switch on zero cross only?

but yeah, I was mentally playing with how to make it physically convenient and safe. Various boxes with plugs did occur to me.

So thank you.
 

Offline oschonrockTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: gb
Re: Mains switching research break out
« Reply #39 on: August 11, 2020, 05:57:14 pm »
LOL, Future Electronics has the SMD version VOD3120AB available at 0.76$ each, or 0.58£.

The prototype is working. I made a 2 channel version and that turned out to be a good thing...see below.  Here is a pic...

1045036-0

I have connected it up to a pic18 and have it doing basic switching, leading edge and trailing edge dimming (ie modes 1 + 2, explained in OP  above). Very good and very smooth. Currently working on mode3.

I had one major hickup in that the VOD3120 has a 12V UVLO and I used a floating 12V SMPS (because the 15V was out of stock  :palm:). That didn't work, so I am currently letting my bench supply float up and being very careful. This is about to change anyway, see below..

Few improvements:

1. Changing it to switch the phase and not the neutral. This was a silly mistake and makes no difference if we are using fully isolated supply and driver anyway. ---

2. I realised that for switching significantly inductive loads (which was a major objective, see top) I need a free wheeling solution, and it's non trivial. Unlike in an H-Bridge where the body diodes naturally help you to create freewheeling paths, this back to back MOSFET topology doesn't help at all - it just blocks it all, so major spikes would ensue. I have only switched resistive loads so far for this reason, because I suspect that I would just blow up the MOSFETs or stress out the MOVs. Proposed design for solution below.

So for inductive load freewheeling, I have decided to try a second back-to-back MOSFET pair (directly across the load) and trigger it (carefully!)  when the main pair is off. revised schematic is below. 

1045032-1

Because I have 2 MOSFET pairs in my prototype I can just rewire this to the above, and use  2x mini 5V->15V isolated DC-DC converters https://uk.farnell.com/recom-power/roe-0515s/dc-dc-converter-15v-0-066a/dp/2846315 to generate the now 2 floating supplies we need. These, together, are actually cheaper and significantly smaller than the single 1W PCB mount SMPS  in the picture below.

Looking around for cases and started ordering some samples. I am going for "lab use" here. So a robust, standards based and serviceable enclosure / termination. Suggestions very welcome. I am currently leaning towards one of these cases (my estimated power dissipation is ~10W at full 10A / 240 VAC load):

https://uk.farnell.com/hammond/1455nhd1201bk/enclosure-wall-mount-aluminium/dp/2904319

And these male and female IEC connectors for supply and load:

https://uk.farnell.com/bulgin/px0580-pc/iec-c14-inlet-pcb-10a-250v-flange/dp/313853
https://uk.farnell.com/bulgin/px0675-pc/outlet-iec-pcb/dp/151748

I thought these IEC connectors are tough enough and standard enough to work anywhere and on the load side people can cheaply buy a converter for their country: https://www.amazon.co.uk/Power-cable-IEC-plug-socket/dp/B005FWRHNQ , if they want a regular outlet.

The idea is to bolt the 4 MOSFETS to the floor of the case using the provided half-nut slots. Power inlet & outlet in the end plates and indicators,controls and low voltage interfaces (possibly canbus or similar), in the top panel. Does anyone know a safe way to provide HV probe points from outside the case, in case the user wants to hook up their oscilloscope..?

Any suggestions for better enclosures/solutions very welcome, this is the part I struggled with the most. There is work to do on EMC filtering too.
« Last Edit: August 12, 2020, 08:40:31 am by oschonrock »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf