DIY AC mosfet solid state relay - Page 1
Forum section: electronics / projects

author: necessaryevil
author_rank: Regular Contributor
timestamp: January 30, 2015, 01:04:58 pm
content: Recently I had the idea to make a solid state relay consisting of two anti-serial mosfets. It should be able to handle the grid voltage (230v~ over here). Additionally, it should be able to switch at 20 kHz, because I want to use it as a non-audible lamp dimmer.The first thing I found was this driver:http://www.vishay.com/docs/83469/vom1271t.pdfBut... it isn't fast enough for 20 kHz.Does anyone has some advice on a mosfet driver which can do what I want?

author: johansen
author_rank: Super Contributor
timestamp: January 30, 2015, 04:04:09 pm
content: To switch a lightbulb at 20khz is not practical due to the inductance in the system.You need to make an ac buck converter to pull that off, and that will need robust mosfet drivers.Usually a transformer is used to provide power to an optically isolated gate driver, or the transformer is the gate driver.

author: necessaryevil
author_rank: Regular Contributor
timestamp: January 30, 2015, 06:50:12 pm
content: Quote from: johansen on January 30, 2015, 04:04:09 pmHmm.. and what about lets say 1-5 kHz? That could that work?

author: eneuro
author_rank: Super Contributor
timestamp: January 30, 2015, 07:07:19 pm
content: What about power rating of this light bulb?Isn't better rectify 230VAC, and limit current to needed levels?Additionally we remove this very bad 100Hz flickering at 50Hz

author: ajb
author_rank: Super Contributor
timestamp: January 30, 2015, 08:33:43 pm
content: Quote from: eneuro on January 30, 2015, 07:07:19 pmIncandescent lamps don't flicker at mains frequency--the filament simply can't heat and cool fast enough. LEDs and fluoros certainly do, but if the OP is trying to dim those there are many more potential challenges.Anyway, you're not necessarily trying to switch the light bulb at 20KHz. You'd typically have a pretty big choke on the output of a mains dimmer anyway--even on a triac phase control dimmer. So you're not exactly going to get a square wave on the output. With further filtering, you can basically PWM the incoming AC mains and wind up with a sine wave of arbitrary amplitude on the output. Sort of half way between a phase control dimmer and a frequency drive. ETC actually produces sine wave dimmers that work on this principle for their Sensor+ high density dimming systems.For reference,here's one of ETC's standard 2x20A phase control dimmer modules--each of those toroids is about the size of a hockey puck. The sine wave modules are twice the size, and presumable much of that is given over to the required filters.

author: johansen
author_rank: Super Contributor
timestamp: January 30, 2015, 08:38:08 pm
content: ajb, i'm talking about the single switch pwm.single switch pwm could work provided you provide a capacitor across the mains to nulify the incoming inductance, and you reduce the inductance of the lightbulb and the wiring to an absolute minimum.you then find some MOV's to put across the mosfet ac switch.. and they will get warm, according to I^2L * frequency.

author: eneuro
author_rank: Super Contributor
timestamp: January 30, 2015, 09:22:40 pm
content: Quote from: ajb on January 30, 2015, 08:33:43 pmThis is 100Hz flickering of 30W incandescent light bulb can be easy detected using even LDR photo resistor andxoscopeon PC Linux microphone inputWhy 100Hz - it is all about math and real power components -it confused me why it is 100hz, so looked into wiki AC voltage and derived myself how power changes in time at 230VAC 50Hz in resistive loadThis AC mosfets switch (2xBUZ78 800V) prototype tested with... 9V battery, now is used to triger triac/thyrystors in spot welder:Checked thisVOM1271Tdatasheet now and yep it is quite cheap (eg. on digi ), but... it is probably very low output current driver, so no chance fast switch some mosfetsSo, I'd use rather galvanic insulated mosfet driver (I use 6N137 +TC4426 two outputs combined to 3A) and small insulated 12V SMPS and such AC mosfet switch can be very fastNow experimenting with GDTs

author: necessaryevil
author_rank: Regular Contributor
timestamp: January 31, 2015, 07:02:15 pm
content: Well I am just experimenting with the idea and I want to try it with two mosfets. Well, lets say the circuit must go up to 1A. I want to use IRFP460 (I have a bunch of those, hooray dumpster diving) or IRF840 mosfets (I can get those cheap, hooray dump stores).Using an normal mosfet driver combined with an smps and an optocoupler seems a nice idea. But isn't there any mosfet driver available which already has a built-in isolated power supply and is fast at the same time?? A built-in switched capacitor supply for example?I did think about using a rectifier + pwm, but I just want to figer out if it's possible to use just two mosfets.Another nice idea is this circuit, which involves a rectifier, but the output is still AC!http://www.instructables.com/files/deriv/FHT/C19H/HO235ZQY/FHTC19HHO235ZQY.SQUARE3.jpgPossibly with a smaller value for the R2 resistor.

author: tom66
author_rank: Super Contributor
timestamp: January 31, 2015, 07:09:38 pm
content: You could easily derive the necessary 15V for the MOSFETs using something like a capacitive step-down power supply (caution: output is not isolated) and then drive an IR2110 (or similar) through optocouplers from an MCU. Bonus points for using a DC-DC converter module to take the dangerous nonisolated 15V and make it into a nice safe 5V.

author: eneuro
author_rank: Super Contributor
timestamp: January 31, 2015, 07:52:14 pm
content: Quote from: tom66 on January 31, 2015, 07:09:38 pmFor example those optoisolated gate drivers: TLP250 1.5A or TLP350 2.5A should be fine with additional power supply:http://www.digikey.com/product-detail/en/TLP350%28TP1,F%29/TLP350TP1FCT-ND/949807Didn't tried supply AC mosfets gate derived from 230VAC mains-no worry about transients from switching 230VAC circuit or grid noise, possible lighting-probably more tricky to protect mosfets gate when such derived PSU for gate from 230VAC mains is taken?BTW: Capacitive Power Supply Circuit do you mean something like this:http://www.electroschematics.com/5678/capacitor-power-supply/or another trick with capacitors voltage divider?This one is quite interesting :http://www.electroschematics.com/5935/12volts-transformerless-power-supply/Lets see if it could be usable as AC mosfets switch gate driver power supply

author: necessaryevil
author_rank: Regular Contributor
timestamp: January 31, 2015, 08:16:14 pm
content: Quote from: tom66 on January 31, 2015, 07:09:38 pmWell, shouldn't the output be isolated? It should be able to drive the gate 5-15v above mains voltage, but if the output is not isolated from that mains...?? Or do I see this the wrong way?

author: tom66
author_rank: Super Contributor
timestamp: January 31, 2015, 09:31:31 pm
content: The circuit (last picture) is what I'm referring to and the output is not isolated from mains. The ground reference, negative lead of the output capacitor, will be upto +/-320V away from ground at any given time for a 230V mains circuit.This low current 15 V supply can then supply IR2110 or similar. (Optoisolated driver will still need power on mains side to drive FETs.)The high-side FET is usually driven by a simple diode-capacitor charge pump. A boot-strapping circuit.

author: eneuro
author_rank: Super Contributor
timestamp: February 01, 2015, 08:11:13 am
content: Quote from: tom66 on January 31, 2015, 09:31:31 pmUnfortunalelly, this 12volt transformerless power supply will not work with AC mosfets switch as well as other non isolated power supply for tricky reason-when AC mosfets switch is ON... there will be very small voltage across such switch (depends on its RDSON and load current), so we have NO AC VOLTAGE to supply gate driverYes, we can fire from time to time and turn on such AC mosfets switch, but depending on power consumption in gate driver and switching PWM duty cycle, we can land with not sufficient current to power gate driverFor example we want to have such switch ON for unlimited time but we can charge gate driver power supply only when this switch is OFFAnyway, one could use such 12V transformerless power supply to run oscilator and small SMPS to output insulated voltage needed to power gate driver... or output GDT pulses and drive mosfets gate directly when needed and this is what I'm about to test next week.Now trying to figure ou thow to protect mosfets gate in GDT against too huge voltage spikes in pulses and idea is to use two 12Vz Zener diodes in series with small resistors and clamp voltage to about 13V regardless of GDT AC voltage to be below required +/-20VUpdate: Looks like it might work-nice close to +/-13V on capacitor (mosfet gate) while transformer ouput (GDT) is 24VAC (12VAC in real setup), but maybe something faster than Zenner diodes will be better

author: dannyf
author_rank: Super Contributor
timestamp: February 01, 2015, 12:50:53 pm
content: QuoteBecause the lightbulb id bi-directional: it heats up on the positive as well as the negative direction. So the light output goes up and down twice every 50hz cycle -> 100Hz in terms of light output.The only reason it does NOT appear to be flickering is our eyes.

author: Zero999
author_rank: Super Contributor
timestamp: February 01, 2015, 07:12:31 pm
content: It's possible to see flicker at 100Hz.The reason why it's not noticeable with incandescent lamps is the filament doesn't have time too cool down. It's true there will be some 100Hz ripple on the light output but it's not noticeable because the amplitude is too low to be noticeable.

author: eneuro
author_rank: Super Contributor
timestamp: February 01, 2015, 09:04:28 pm
content: I've checked also new (bloody because of two those cheeap one basicly shorted home grid 230VAC mains) electronic fluorescent light bulbs like in attachment and its light looks very random when detected with LDR, but didn't made Fourier analysis yet to see its spectrum.Anyway, I believe those even small pulses of light intensity can be very bad for our sight and now investigate this, so this why I'm interested in cheap methods to stabilize this 230VAC current, provide constant current to such light bulbs (I mean classic old light bulb, because of not sure if those new fluorescent can be powered with 230V(DC)) and compare room full of such AC and DC lights and see how human reacts to such light sources, because of I feel alittle bit tired in this artifical light and this might be this flickering, I guess.Of course LED lamps are an option, but still we need ensure if they have this current constant, while many cheap ones do not have when looked inside its circuit-they have only current limiting capacitors, etc. so for sure its output is flickeringSo, made this small LDR probe to be able even in the shop check if such light sources have current stabilized and there is no flickeringCan put this inside laptop microphone input and no need to carry huge scope to prove in the shop that their LED 230VAC light bulbs are bullshit

author: necessaryevil
author_rank: Regular Contributor
timestamp: February 05, 2015, 03:21:29 pm
content: Could something like this combined with a jelly bean integrated circuit (TL494, 555, MC34063) work for a mini smps?:http://nl.mouser.com/ProductDetail/Bourns/SRF0703-820M/?qs=sGAEpiMZZMu3JGptLTgkApgoxvKCoHv%2fdGHoY%252bc%252b4z8%3dWell if it can, I would still have to work out the circuit for that...

author: eneuro
author_rank: Super Contributor
timestamp: February 05, 2015, 03:58:56 pm
content: Quote from: necessaryevil on February 05, 2015, 03:21:29 pmProbably you saw last time in one thread this quite nice book for SMPS designers was mentioned and it was easy find PDF for this"Switchmode Power Supply Handbook" Keith Billings, Taylor MoreyAnyway, experimented last time with GDTs and made this AC mosfets switch quite easy switched ON from very simple (SMPS) H bridge PNP BC327/NPN BC337 0.8A transistors and running at 400kHz this customized random core was able get typical RDSON of this BUZ78 800V mosfets at power supply 12V and input current 20mA, so not so badAt mosfets 10.5Vgs I have datasheet typical RDSON -even lower 5.5 Ohm per mosfet, while datasheet says 6 OhmNow it is time to try drive real 230VAC light bulb and try group of GDT pulses to vary its brightness, but some kind of mains zero crossing probably will be helpfull, so lets solder two PC817 and connect such simple "0" crossing circuit detectror described in one of the thread some time ago on EEVblog and see what happends

author: necessaryevil
author_rank: Regular Contributor
timestamp: February 05, 2015, 06:28:06 pm
content: QuoteHow did you get the 12v?

author: eneuro
author_rank: Super Contributor
timestamp: February 05, 2015, 06:49:29 pm
content: Ok, 12Vin was car battery (so not PSU itself) to LM7805, so this H bridge which is switched from AVR ATTiny logic level 5VGDT- from old small PSU transformer I guess -has about 1:2 ratio now, so I could get above 10V on mosfets gate Vgs (N-channel mosfets) on its secondary side.BTW: 20mA @ 12V and 400kHz switching frequency everything had room temperature

author: necessaryevil
author_rank: Regular Contributor
timestamp: February 05, 2015, 07:43:16 pm
content: QuoteActually, I just realized you don't need an internal power supply for a SSR, you can just draw the power from the control circuit  if its powerfull enough QuoteInteresting,so it's fully tested! Now I'm a bit curious about the details of your circuit.Well, I'm gonna read the "Switchmode Power Supply Handbook" now.

author: eneuro
author_rank: Super Contributor
timestamp: February 05, 2015, 08:56:16 pm
content: For the moment nothing fancy-just 290 bytes of ATTiny85 8k flash does the job turns on off two phases at 400kHz and 1N4148 on secondary charges AC mosfets switch gate to 10.5V using concept like this discrete driver from TI demoPower Tip 42: Discretes can replace integrated MOSFET driverJust want use such AC swith to triger SCR's, so GDT was quite interesting for me to try,but to drive light bulbs etc probably GDT too complicated and optoisolated mosfet driver with small 12V galvanic PSU will be better and easier to controll than GDTs

author: necessaryevil
author_rank: Regular Contributor
timestamp: February 06, 2015, 08:32:09 am
content: Very interesting! And the transistors are on the secondary side; which is convenient for high voltage inputs.

author: eneuro
author_rank: Super Contributor
timestamp: February 06, 2015, 07:55:39 pm
content: Around 2:54 sec is quite interesting, where they showed easy way to make positive and negative power supply for mosfet discrete transistors driver supplied by GDT itselfAnyway made something similar to this H11AA1 AC zero crossing detector (http://www.datasheetdir.com/H11AA1+Optocouplers), but using two PC817 in anti parallel, while waiting for ordered elements.Haven't got time to test it today, but I've already tested regular LEDs in similar antiparallel configuration like in H11AA1 with 2 x 50k resistance on 230VAC mains side and it was fine, so I hope those PC817 (EL817 there) will do the job and I should be able detect on MPU pin 230VAC mains zero crossing (with a few kV insulation in those tiny optocouplers) and switch AC mosfets switch shifted in phase when needed.

author: necessaryevil
author_rank: Regular Contributor
timestamp: February 08, 2015, 10:40:59 am
content: Can you please post the full circuit? I' m also curious which transformer you use.

author: eneuro
author_rank: Super Contributor
timestamp: February 08, 2015, 04:04:16 pm
content: Random (probably choke transformer) was used @ 400kHz in my test above.Probably something like this a few mA PSuwill be fine (even at 100kHz switching not too much current needed in th ecase of two used BUZ78 800V mosfets) better and easier to controlNote: In this simulation switches was toggled manualy, so it is visible gate RC like discharging of modled gate capacitor 10n-this is because of I do not did it to fast manually, but it works in this demo and we are able to set positive and negative pulses of given time length, so no problem to design PWM waveforms for our AC mosfets switchNow, looking for low power supply fast optocouplers (gate drivers) while when switch is in active ON very low power needed to keep it open in the range of uA's, so it could be nice to have low power optocouplers in output stages.Even something like this below should work, so want to see how it will perform with AC mosfets switch and simple PSU shown aboveOf course bloody slow"Opto-isolators are PC817C"in this video, but something much faster might work.What is nice I like in my simply PSU 230VAC ->24VAC ---->>> +/-12VDC for gate driver we have negative gate pulses available, so even this simple discrete transitor 0.5A gate driver should be quite fast and very low power consuption output stage depending on switches used

author: eneuro
author_rank: Super Contributor
timestamp: February 09, 2015, 09:52:40 pm
content: Fast PCB prototyping using... hot iron and classic old school thermal transfer, changed simulated +/-12 PSU from 24VAC input circuit shown above into... something real and what is most important it works as expected and practiced in simple circuit simulator-nice close to +/-12V on its output depending on control pinsIt is quite interesting that outpt gate driver transistors (PNP BC327 & NPN BC337 0.8A) can be easy changed to rated for more output current and gate resistor changed to get much more than 0.4A in this prototype, and it can be trigered directly from GDT output or using... optoisolated gate driver like cheap TLP251 or two fast optoisolators or even slow PC817, etc...Not so bad, nothingso farWill see what happends when classic light bulb will be switched at 100kHz with ... random duty cycle in AC mosfets switch