Light dimmer circuit - A MOSFET connection issue

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
upload_2019-8-6_22-16-59.png

I am trying to make the above circuit, which will operate at around Vac = 230V. The two MOSFETS are 12NM50's. I am not married to the idea of using these MOSFETS and can order different ones if they will better suite the application. I would like to drive the gates of the MOSFETS from a TC4427 MOSFET driver, which will be powered using a 7.5W 15VDC power supply, which will supply 15VDC to the VDD pin of the driver. The signal to the driver will be from the PWM output signal (of 3.3V) at 98kHz from a microcontroller. Simple question: where do I connect the DC ground to this AC circuit, so that I can have a good reference for the gate signal, so that the FETS will operate properly? I expect that the DC ground from the driver circuit should be connected at the ground point between CY1 and CY2; but I'm not sure. I feel that if If I connect the DC ground to the neutral wire of the AC circuit - the whole thing will blow up. I also cant afford to blow circuit components up as I have a limited amount of resources. I'm hoping that you guys might be able to help me prevent these catastrophic failures.

Also, should I drive the gates directly from the output of the MOSFET driver, or should there be some resistors inline? I'm following the typical installation diagram of the TC4427 datasheet and so a 1nF pull-down capacitor will be attached the output of the driver.

I should probably mention that this is my first project using MOSFETS; so any input and advice will be greatly appreciated.

One final question; should I run the output of the microcontroller through an opto-coupler to isolate the microcontroller from the driver/AC circuit? Just trying to be cautious, and I'm terrified of high voltage and MOSFETS.

Thank you all!
 

Attachments

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
I would just like to reiterate that this is my first MOSFET project - so please, go easy on me. If you could please offer a simple explanation, accompanied by a diagram - it would be MOST appreciated. Thank you all!
 

AlbertHall

Joined Jun 4, 2014
10,908
To control the MOSFETs correctly the voltage between the gates and sources should be controlled and this means that the 'ground' of the gate control circuit should be connected to the sources of the MOSFETs. This means that all that circuitry will mains live...
 

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
upload_2019-8-7_9-5-16.png

Is this correct, in terms of your suggestion? This seems extremely dangerous. If this is the case, what should the rating be on the components, specifically the opto-coupler and the MOSFET?
 

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
To control the MOSFETs correctly the voltage between the gates and sources should be controlled and this means that the 'ground' of the gate control circuit should be connected to the sources of the MOSFETs. This means that all that circuitry will mains live...
Is this correct, in terms of your suggestion? This seems extremely dangerous. If this is the case, what should the rating be on the components, specifically the opto-coupler and the MOSFET?
 

DickCappels

Joined Aug 21, 2008
6,961
If I may, I have two comments.

1. Listen to AlbertHall's advice in post #3. Do not try to connect any part of the line operated circuit to earth. This is a very poor practice and can easily end up hurting somebody or some equipment. You should note that most if not all electrical codes required that the current from the Line return through Neutral. Only fault currents are to return through ground, and at that only for short periods. (Vdd of your MOSFET driver is connected to the earth-referenced 15VDC.)

2. You can probably do this much more simply, economically, and reliably by using a triac in place of the MOSFETs, and it would probably create a lot less EMI.
 

AlbertHall

Joined Jun 4, 2014
10,908
Is this correct, in terms of your suggestion? This seems extremely dangerous. If this is the case, what should the rating be on the components, specifically the opto-coupler and the MOSFET?
I put 'ground' like that to indicate that I do not mean a connection to mains earth - that would be disastrous.
So you would need an isolated power supply to feed the circuit which drives the MOSFET gates. It would need to be as isolated supply so it can be connected to the MOSFET sources which (from time to time will be at mains live potential)
Then you will need an optoisolator fed from the microcontroller to control the MOSFET drive circuit. This allows the microcontroller to be at ground potential while controlling the live MOSFET drive circuit.
 

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
Is there any chance you would be willing to draw a rough sketch of the connections? I really don't want to misinterpret the information you have so generously supplied me with. I really don't want to make a mistake and end up hurting myself or my equipment. As I said - I am an absolute beginner and so I apologize if is seems that I'm asking to be spoon fed. I don't have access to a current controlled variac of any sort, so I can't slowly work my way up to mains. I will need to build the circuit and switch it onto mains immediately, so I would like to get it right on the first try - if at all possible.
 

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
Thank you very much for sharing that very interesting content. Unfortunately, I have already specified the two series MOSFETs as my dimmer design and cannot switch over to a triac at this stage (in place of the MOSFET design). I have attached the paper that inspired this topology. The problem, however, is that they give no description of the gate drive circuitry. Hence why I have approached this forum.

I need to get the system running off two MOSFETS as described in my first post. I have a PIC24 microcontroller producing the 3.3V gate signal. I have a TC4427 MOSFET driver as described in the second diagram. How do I get it working in this topology? I can get more components to make it work if needed. I just need (and would very much appreciate) a basic diagram explaining how to connect the circuit.

I really appreciate the input and I look forward to your response
 

Attachments

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
I need to establish whether or not I understand the concept and so I would Just like to confirm:

You are suggesting that the pins of the TC4427 driver circuit need to be:

IN A = 230Vac + 3.3Vdc (signal on)
= 230Vac (signal off)
GND = 230Vac (connected to the source of the MOSFET)
VDD = 230Vac + 15Vdc
IN B = 230Vac
OUT A = 230Vac + 15Vdc (signal on)
= 230Vac (signal off)
 

cmartinez

Joined Jan 17, 2007
7,243
A Mosfet based dimmer is far better than a phase driven triac in that the former has a much better performance than the latter.

A mosfet dimmer can control current to extremely low levels, making an impressive display especially when working with incandescent lamps. Whereas Triacs suffer from hysteresis and a minimum amount current is necessary for them to work. This has the drawback of current suddenly jumping from zero to a given value when turning them on.

The only drawback with using pwm'd mosfets instead of triacs (other than their being more expensive and needing more components) is the generation of EMI, but I see you've already taken measures to properly filter it.

I've built a circuit with your exact specifications in the past by using a floating dc-dc converter connected to an optoisolator.

Check this post and pay close attention to the circuit described in it.

I'll be back later with more specific info on the dc-dc converter that I used.
 
Last edited:

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
THANK YOU SO VERY MUCH!!! That's far closer to what I had in mind.

I have some concerns/questions though. I'm posting the circuit diagram here for quick reference - I hope you don't mind? If you do, I will remove it immediately. I'm very new to the forum and so I am not sure what the rules are about using other peoples pictures...

upload_2019-8-8_12-11-31.png

1. Let's start by addressing the elephant in the room - the red line drawn in the diagram. You connected line voltage to ground of the DC-DC converter... HOW??? In your case I think the line was at 12VAC, in my case it will be 230VAC. Seems dangerous, how did you get this right?

2. I'm assuming that any MOSFET driver can be used in place of the MC34151. Does it HAVE to be an MC34151?

3. I'm assuming that pins 1 and 2 of the H11L2 were connected directly to the microcontroller or PWM DC ground referenced signal. Did you go straight from the output pin of the uC through 1 straight to DC GND on pin 2, or was there a resistor placed in series somewhere there?

4. The two noise filtering caps - electrolytic or ceramic? 10uF looks electrolytic - won't it pop?

Once again - I can't thank you enough!
 

cmartinez

Joined Jan 17, 2007
7,243
I'm posting the circuit diagram here for quick reference - I hope you don't mind?
I don't mind at all... but in fact, that diagram was not made by me, but rather by @JDT, who hasn't been around for at least four years. But I'm sure he won't mind either, as long as we give him credit for it.

1. Let's start by addressing the elephant in the room - the red line drawn in the diagram. You connected line voltage to ground of the DC-DC converter... HOW??? In your case I think the line was at 12VAC, in my case it will be 230VAC. Seems dangerous, how did you get this right?
You have to understand something about DC-DC converters... as their name implies, they convert a DC voltage to another DC voltage, which could be of a different value, but which could also be of the very same value. For instance, there are dc-dc converters out there, such as the CME0512S3C (which is the one I used) that convert 5VDC to 12VDC. The characteristic that makes them extremely useful is the fact that the input ground is not connected to the output ground. That is, the output voltage is entirely independent and completely "floating" from the input voltage. It's like a tiny transformer in that respect. Of course, you could connect both grounds together for certain applications, but in this case it's best we keep them apart.

2. I'm assuming that any MOSFET driver can be used in place of the MC34151. Does it HAVE to be an MC34151?
Certainly. Just make sure that whatever driver you choose is the proper one for the gate voltages and PWM frequency that you're planning to use. In my case, I'm using exactly that one because it is a dual driver. So with a single chip I'm driving both NFets at the same time.

3. I'm assuming that pins 1 and 2 of the H11L2 were connected directly to the microcontroller or PWM DC ground referenced signal. Did you go straight from the output pin of the uC through 1 straight to DC GND on pin 2, or was there a resistor placed in series somewhere there?
Yes, pins 1 and 2 of the H11L2 are connected to the uC. But a series resistor is placed on either pin to limit the amount of current that will flow through the internal diode. For instance, the H11L2 datasheet says that a maximum of 60ma and a minimum of 10ma (the turn on threshold) should be used. Let's say we choose to drive it with a 15 ma current, to be on the safe side. If your MCU works at 5V, and knowing that the H11L2 internal diode has a 1.15V forward voltage, the best resistor value that we could use would be (5 - 1.15)/0.015 = 257 ohms. But you could safely use a 220 ohm resistor, which is a more standard value than the 257 ohm one.

4. The two noise filtering caps - electrolytic or ceramic? 10uF looks electrolytic - won't it pop?
The output of the dc-dc converter is 12VDC, and remember that it is "floating", so the capacitor will only "feel" those 12VDC, and not a higher voltage. So yes, it is perfectly safe to use a 10uF electrolytic cap in this case.

Once again - I can't thank you enough!
You're very much welcome. I once was where you are, and it's a pleasure to help others tread the path I've already taken. :)
 
Last edited:

AlbertHall

Joined Jun 4, 2014
10,908
Of course, you could connect both grounds together for certain applications, but in this case it's best we keep them apart.
In fact it is vital, in this case, that they are not connected.
Also you need to make very sure that the DC-DC converter is isolated and can withstand mains voltage between the input and output. They are not all isolated.
 

Thread Starter

SheldonNyce

Joined Aug 6, 2019
26
This is absolutely spectacular content. I would like to use the same DC-DC converter that you used, but I see that it's rated to 0.75W. Will that be enough to drive the MOSFET circuitry? Also, have you perhaps written any literature pertaining to this topology and method for which I can cite your work as a reference for the paper that I am writing about this design? I would like to give you credit for your work.
 

cmartinez

Joined Jan 17, 2007
7,243
This is absolutely spectacular content. I would like to use the same DC-DC converter that you used, but I see that it's rated to 0.75W. Will that be enough to drive the MOSFET circuitry? Also, have you perhaps written any literature pertaining to this topology and method for which I can cite your work as a reference for the paper that I am writing about this design? I would like to give you credit for your work.
Yes, 0.75W is more than enough to drive those NFets. And Albert's right, it is not only best to keep the grounds apart, but vital. You can certainly cite me, if you like. But I'm not an expert, I'm only an advanced level amateur. Although I'm quite sure I've got everything right in this design. As a side note, think of a floating DC-DC converter as one that generates a voltage that rides on top of whatever voltage it is that your circuit is connected to. In this case, it's 230VAC. In the configuration described in post #14 (and assuming that voltage is 230V peak-to-peak, that is it alternates between +230V and -230V), the red trace would "see" a voltage to the VAC ground that is +242V to -218V. But, and here's the important part, the NFet's will always see 12VDC between their gates and their sources when you trigger the driver.
 
Last edited:
Top