AC Rectified - DC Mosfet dimmer  - Hints please - Page 1
Forum section: electronics / projects

author: bingo600
author_rank: Super Contributor
timestamp: March 02, 2017, 07:21:12 pm
content: I was thinking about using this AC rectified DC-dimmerhttp://www.instructables.com/id/AC-PWM-Dimmer-for-Arduino/BrianHG writes hereQuote from: BrianHG on February 28, 2017, 01:20:54 pmWould that apply to this construction (switching of the opto during zero cross) ?I mean it's not AC anymore , but "unfiltered DC"/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: March 02, 2017, 07:34:56 pm
content: I'll be dimming 2 x 40w - lightbulbs (The big ballon ones with golden glow)I have gotten both someMosfets : STB10NK60Z -http://www.st.com/resource/en/datasheet/stb10nk60z.pdfAnd someIGBT's : SGP10N60 -https://www.digchip.com/datasheets/parts/datasheet/216/SGP10N60-pdf.php100uF will be - NIPPON CHEMI CON series KMX 100uF 400V super LONG LIFE capacitors 105'CAnd i have some 4N25 Optos in the drawer.The author says the IGBT's are probably the best for this , but Mosfets are ok.I don't have much experience with Mosfets or IGBT's , but i do with mains (no worries there).MCU would be a ESP8266 , where i'll adapt the opto resistor to 3.3vCan anyone see problems with the circuit , besides missing a fuse ?/Bingo

author: bingo600
author_rank: Super Contributor
timestamp: March 02, 2017, 07:38:49 pm
content: The ESP8266 is going to need 3.3v anyways , so if i get a 230->12v PSy , and a DC-DC switcher for the 12 -> 3.3vCould i get rid of the Capacitive PSU , i mean the 100uF cap & diode.And put the 12v psu in use for driving the Fet/IGBT ?I'll loose the galvanic isolation , but the IF is going to be wireless via the ESP , so i'm not too worried.Unless the "shared ground "Unsmooted 400v DC Ground" , and 12v DC-DC converter ground would intefere.Any hint for what to modify ?I mean i suppose i still need to have a pullup in the FET gate , as the opto is the "pulldown"Do i need some 400v cap on the "mains (load) DC" ? - For smoothing ?As i see it on the existing schmatic , there isn't any on the one in the picture, due to the diode.A few hints would be appreciated./Bingo

author: Benta
author_rank: Super Contributor
timestamp: March 02, 2017, 08:16:42 pm
content: That circuit has so many dumb things, it's difficult to know where to start (is "instructables" really like that? I've never visited them).First: if you switch off your Arduino, the lamps will be lit always.If you decide that the "always on" functionality is OK, then:There's absolutely NO reason to use a 400 V cap. The cap will work just a well connected to the junction of R4/R5, so a 25 V type is enough.D5 is unnecessary.Reduce R5 to 5k6Place a resistor between R4/R5 and the 4N35Use a high-voltage resistor for R4, eg, VR68 from Vishay.That's just a start...

author: bingo600
author_rank: Super Contributor
timestamp: March 02, 2017, 08:35:07 pm
content: Quote from: Benta on March 02, 2017, 08:16:42 pmThanx for the commentsI knew about the PWM source must be always onAuthor mentions this circuit (other creator) , and says it has some bad design faults , explains on Instructables pageHe modified it , and says this is betterUnfortunately i'm an "Analog noob" , and "have to trust" the designers , that's why i asked for some hints (review)It will be in my summerhous , and i don't want a fire/Bingo

author: Benta
author_rank: Super Contributor
timestamp: March 02, 2017, 08:52:10 pm
content: Yes, the Giesberts circuit has a major problem (if PWM is 100%, there is no power for the control section).The modification, placing the bulb on the DC side fixes this, and should work.But the suggested "new" circuit is way off.

author: james_s
author_rank: Super Contributor
timestamp: March 02, 2017, 10:21:03 pm
content: Is there a reason for using such an unconventional circuit rather than the classic triac phase control dimmer? If you use a zero crossing signal to trigger an interrupt in your microcontroller it's fairly easy to adjust the trigger point.

author: Benta
author_rank: Super Contributor
timestamp: March 02, 2017, 11:16:42 pm
content: Quote from: james_s on March 02, 2017, 10:21:03 pmI asked myself the same question. The only rational reason is that the PWM controller (Arduino) can operate independently and does not have to sample the mains voltage (thus avoiding mains voltage connection).That's OK for me.

author: james_s
author_rank: Super Contributor
timestamp: March 02, 2017, 11:24:36 pm
content: Well if anyone builds this I'm curious to hear how well it works. Zero crossing detection on the mains is fairly simple, I used a comparator in the DMX dimmer pack I did years back, sampled the AC off the secondary of the power transformer before the rectifier. It's no problem for the AVR to sync to the zero cross and control dimming on 8 channels.

author: bingo600
author_rank: Super Contributor
timestamp: March 03, 2017, 05:53:23 am
content: I'd like to use it because apparently running zerodetection on the ESP8266 , would make ESP webpage responses laggy./Bingo

author: BrianHG
author_rank: Super Contributor
timestamp: March 03, 2017, 06:04:28 am
content: Quote from: bingo600 on March 02, 2017, 08:35:07 pmYes, this is the schematic is what I was thinking of...

author: BradC
author_rank: Super Contributor
timestamp: March 03, 2017, 06:08:22 am
content: Quote from: james_s on March 02, 2017, 10:21:03 pmThe above circuit with the bridge rectifier in *series* with the load is a really neat way to allow you to use a DC device to control AC, so you can use a MOSFET rather than an IGBT. Additionally, it can be operated outside the parameters of being locked to a zero cross, so you can use either faster PWM *or* (as I've actually seen done) use the MOSFET as a resistor to give a clean but reduced voltage output (with the consequential power dissapation in the MOSFET). It'd even be a neat way of effectively implementing a trailing egde dimmer.I have a real issue with supplying high voltage DC to anything a finger can get into (such as light socket).

author: BrianHG
author_rank: Super Contributor
timestamp: March 03, 2017, 06:14:00 am
content: You can also get rid of all the optocoupler and gate drive circuitry, replace it with a 500mw green led and a few photodiodes and a logic level mosfet. Good for switch on and off, isolated, but it wont work at high speed, but, you never need worry about the gate supply for that second circuit.

author: BrianHG
author_rank: Super Contributor
timestamp: March 03, 2017, 06:18:34 am
content: Also, with the above AC circuit, a dumb 20Khz PWM allows for dimming of lights without the annoying 100/120hz buzz created by phase dimmers. Also, with a 20khz tuned inductor & cap filter, you can make a nice AC full sine wave of the source good for driving AC motors.

author: Zero999
author_rank: Super Contributor
timestamp: March 03, 2017, 08:46:56 am
content: Quote from: bingo600 on March 02, 2017, 07:34:56 pmWhat sort of light bulbs? LED, compact fluorescent, incandescent?Quote from: Benta on March 02, 2017, 08:16:42 pmUnfortunately yes. Most instructables are very poor quality. There are one or two very good ones but most are bad. There's no quality control on that site. Anyone can post crap and it doesn't get removed because it generates advertising revenue. I like to call them destructables.

author: bingo600
author_rank: Super Contributor
timestamp: March 03, 2017, 02:28:25 pm
content: Quote from: Hero999 on March 03, 2017, 08:46:56 amStandard light bulbs w. clear glass , and those wires that glows golden inside./Bingo

author: bingo600
author_rank: Super Contributor
timestamp: March 03, 2017, 02:32:03 pm
content: Quote from: BradC on March 03, 2017, 06:08:22 amWould you care to point out with one you mean ?The top post (it think you mean that one) , or the one wo. the red crossAnd i'd be using an ESP8266 for control , no fingers involved/Bingo

author: BradC
author_rank: Super Contributor
timestamp: March 03, 2017, 03:36:55 pm
content: I meant the one with the Red Cross. Not that circuit specifically, but the same theory. Bridge I series with the the load.

author: Seekonk
author_rank: Super Contributor
timestamp: March 03, 2017, 03:52:12 pm
content: I use opto isolators to switch FET often. FET gate capacitance will make a very slow turn off with a 22K resistor. I wouldn't use any more than 1K to reduce transition heating. Electronic wall warts are a convenient way to power these circuits. Surprised no one mentioned capacitive dropping to eliminate resistor heat.

author: Kees van Gelder
author_rank: Newbie
timestamp: March 03, 2017, 04:12:59 pm
content: Actually there is more sense in using a 400 Volt capacitor in the position that it is in than you give credit.When using Mosfets or IGBT you want them to work as a switch that switches fast between OFF and ON. You dont want the Gate voltage to linger somewhere halfway, making the MOSFET or IGBT to dissipate a lot of heat. Tou want it to be either OFF or ON on its RDSon.With the capacitor as is in the given circuit, the only RCtime you have to worry about is that of the 100k resistor and the capacity of the tarnsistor.For the average MOSFET that is in the range of 10pF. Hence your RC time being practically zero. Which means that the FET or IGBT will switch very fast.Now lets see how that is with a 25uF capacitor where you say it should be. Then suddenly the picture is different. The RC time will be 2.5 seconds. Which means that it takes 2.5 seconds to get to 63% of its gate voltage. All that time the Transistor is not at RDSon but at a higher resistance, which translates in dissipating power -> heating up.So I presume a bit more thought is gone in to that than you say.Having said that, the 100uF probably could go down a bit, say 50, but I'd certainly keep it in the position it is,The zener, as the author says is there just in case. Sure, you could leave it out, but it isnt a 'flaw'. I even see a circuit there with just the zener.Coming to the 'resistor between the connection of R4/R5 and the optocoupler', I presume also here fast switching was the goal, you want that Voltage to go down fast.Now if you put a capacitor there as you propose, yes chances are you will kill not only the Transistor but also the optocoupler so yes then you need a resistor, but then not only you are slow in charging but also in discharging -> more time spent outside RDSon -> heating up your MOSFET5k6 instead of 6k8 ? CosmeticStays on when Arduino is off? yeah I guess that is the design, but I guess you could put the optocoupler in series with the 100k.regarding the discussion on using a TRIAC and do zerocross detection. Sure that works as well, but you will not be able to use PWM which seems to be the point of this circuit

author: Seekonk
author_rank: Super Contributor
timestamp: March 03, 2017, 04:30:16 pm
content: Quote from: Kees van Gelder on March 03, 2017, 04:12:59 pmI'd sure like to get some of those FET!

author: Benta
author_rank: Super Contributor
timestamp: March 03, 2017, 04:44:40 pm
content: QuoteMe too!!@Kees van Gelder:I assume you are commenting on my first reply (#3)?Concerning the cap: the original idea is a 310 VDC supply using a huge 100 uF, 400 V cap (do you realize the physical size of such a thing?)My suggestion is to make a 16 V DC supply by placing the cap at the R4/R5 junction instead. 100 uF, 25 V is absolutely sufficient and can be smaller with no problems. And at 16 V, no Zener is needed.The series resistor between cap and optocoupler is to prevent too much discharge of the cap when the coupler is on.But quite frankly, an even better solution is to place the coupler transistor in series with the gate, plus a pull-down resistor on the gate. This would provide "positive logic" to the circuit and eliminate the "always on" issue.As to switching losses: a circuit as simple as this is not laid out for 50 kHz switching. I'd switch it at perhaps 500 Hz. And the relatively slow transistions (due to the gate resistor) are actually a blessing if you think about EMC radiation.

author: Seekonk
author_rank: Super Contributor
timestamp: March 03, 2017, 08:17:56 pm
content: This is the FET gate driven by one of those ebay 4 channel opto boards with a 5.1K pullup, just opposite of the pull down. So, a 22K would be quite problematic.

author: Benta
author_rank: Super Contributor
timestamp: March 03, 2017, 08:33:55 pm
content: QuoteI've no idea what eBay boards you are talking about, and I've no idea what your trace shows.But let's put a few facts on the table:IRF730 input capacitance: 700 pF typ.This gives a time constant (at 22 kohm gate resistor) of: 22^3 x 700^-12 = 15.4 usNow tell me that PWM'ing this circuit at 500 Hz is a problem. Not!

author: Seekonk
author_rank: Super Contributor
timestamp: March 03, 2017, 09:20:04 pm
content: I never directly answer any one persons issue directly. That FET is pretty dinky. I'm doing 480Hz quite often. My gates are at least six times that capacitance. I also don't allow short pulses at either end of the duty cycle. 20KHz was mentioned. There doesn't seem to be any practical reason to have a resistance that high. As long as you are aware. This is for those that might consider copying parts of your circuit.

author: Benta
author_rank: Super Contributor
timestamp: March 03, 2017, 09:38:33 pm
content: QuoteFine.QuoteIt's an industry-standard IRF730.QuoteFine.QuoteAnd? That would make matters worse.QuoteQuoteNot by me.QuoteDo the calc.QuoteYes. We're warned.

author: TJ232
author_rank: Frequent Contributor
timestamp: April 15, 2017, 10:09:16 am
content: Any specific reason that you are not looking also to a more classic solution, with ZCD and Triac?You can find a nice example here:It has all the MAINS related funtions onboard (including phase detection, ZCD,etc), you just need to provide a VCNT voltage control to drive it. Voltage control can be provided by a DAC, PWM, even a 10k pot between Vcc and GND with the viper on VCNT input pinAlso on the same channel you can find a lot of AC dimmer implementation tutorials with ESP8266, Domoticz, RaspberryPI, etc .Happy Easter!

author: bingo600
author_rank: Super Contributor
timestamp: April 17, 2017, 07:02:19 am
content: Quote from: TJ232 on April 15, 2017, 10:09:16 amI am interested in PWM'ing the dimmer , and avoid ZCD issues.For me the "DC" dimmer is "elegant" , i do think i'll put in a small 12v 500mA psu , and see if i can get rid of the capasitive psu.Just bought a few small ones.I have seen your page(s) , nice projects. But i'd like to go with the DC version.Happy easter to you too.Ps: My EE friend says a 10uF/400v would be suficcient , if one goes down that route./Bingo

author: bingo600
author_rank: Super Contributor
timestamp: April 17, 2017, 07:05:50 am
content: Quote from: bingo600 on April 17, 2017, 07:02:19 am

author: TJ232
author_rank: Frequent Contributor
timestamp: April 18, 2017, 04:23:31 pm
content: Quote from: bingo600 on April 17, 2017, 07:02:19 amThank youBut what's so appealing about PWM'ing the dimmer in that way, what do you consider to be the main advantage of it?

author: Zero999
author_rank: Super Contributor
timestamp: April 19, 2017, 08:09:55 am
content: Quote from: TJ232 on April 18, 2017, 04:23:31 pmAdvantage compared to what? A huge variable transformer?Personally, I'd prefer to use good old fashioned phase control.

author: TJ232
author_rank: Frequent Contributor
timestamp: April 19, 2017, 01:12:25 pm
content: Quote from: Hero999 on April 19, 2017, 08:09:55 amThis was actually also my question, a more classical phase control solution with ZCD and Triac versus the DC PWM MOSFET as above.

author: mrTheWheel
author_rank: Newbie
timestamp: November 18, 2018, 09:38:37 am
content: @Benta,Can you please provide me the schematic of your improvements for a AC PWM dimmer circuit?It seems dimmable LED bulbs need PWM. I wanted to build the revised circuit (the one without the red cross) but indeed the big 400volt capacitor is not going to fit in a small enclosure so I like your idear of placing the cap. between the R4/R5.Thanks in advance!