Voltage drop irf540 with optocoupler pwm motor driver

Hi, i make circuit for motor dc driver. My motor is 12v powered with battery 12v. My problem is when i run motor with high pwm (255) the output voltage is only 7,23 V. Anyone know why my voltage drop is high? i use mosfet irf540

What current does your motor take?

Your circuit shows Vcc being connected to Arduino 5V and to V+ on the motor - is that what you are really doing?

What PWM frequency are you using?

The IRF540 requires at least 10V drive, so I'll assume your circuit as drawn is wrong and Arduino 5V is not connected to Vmotor!

Optocoupler may be losing you a volt or two, as does your 1k resistor.

I think you may be running out of drive current to the gate with that opto-coupler circuit - at high PWM rates you need to push 50mA or more into/outof the gate to switch it fast enough (it has 72nC of total gate charge, which you probably want to shunt about in 1us or so timescale).

[ Personally I'd just use a MIC4422 or similar MOSFET driver chip, lose the opto coupler, and have full bandwidth switching from the MOSFET - and pick a more suitable rated MOSFET, ie 30V, 10 milliohm ]

Oh, that 100nF cap should go across the motor terminals on the motor itself, so RF doesn't leak out along the wires.

There is so much wrong… IRF540 is the wrong part, as stated… it needs WAY more than 5V at the gate to fully turn on and this fully explains your results.

On possible fix… the VCC that is tied to the Collector of the OPTO should be 12V not 5V…

Hi,

In the circuit i see the collector of the opto is connected to +12v.

The input resistance of a mosfet is very high and that resistance needs very little current to allow the mosfet to turn on. It also has input capacitance however so if you want to switch it fast you need a decent amount of drive current as well as the correct voltage. It looks like you are switching at around 5kHz so that's not too bad, but you may want to check that anyway. You should look to see that the mosfet turns fully on when it is 'on' and that it turns on and off fast.

You should also check the 'on' resistance of the mosfet drain to source to see if the resistance when 'on' is high enough to drop a large voltage when the motor is running. This would be a problem if the motor draws a significant current compared to the resistance of the mosfet. The stated 'on' resistance is around 0.08 ohms so if we figure 0.1 ohms at 10 amps that means about 1v drop for example, and will increase as the device heats up.

It is also bad practice to connect any capacitor across a motor that is being driven with PWM. That means the cap is stressed too much if the mosfet turns on and off fast and/or the mosfet is stressed too much because it has to charge and discharge that cap over and over. If you want to add a snubber, then add a snubber, which at the very least is a low value resistor in series with a capacitor. That helps reduce the stress to both parts, the mosfet and capacitor while still eating up part of the energy contained within the spike.

Many opto couplers are very very slow so you should also check that. You might mention what part number you are using. They also have a very wide range of current transfer ratio which also depends on the part number.

MrAl: The input resistance of a mosfet is very high and that resistance needs very little current to allow the mosfet to turn on.

Alas that's only at DC - for PWM the reverse is the case, a large current is needed to charge / discharge the gate fast enough to prevent switching losses dominating the function.

For fast PWM you'd be thinking 100 to 500mA of gate current perhaps.

Sorry, its my fault on picture, its not connected 5v arduino but 12v battery..

MarkT: Alas that's only at DC - for PWM the reverse is the case, a large current is needed to charge / discharge the gate fast enough to prevent switching losses dominating the function.

For fast PWM you'd be thinking 100 to 500mA of gate current perhaps.

Hello there Mark,

Strictly speaking, the input resistance is very large, on the order of 100Megohms or more. The input impedance might be small, but the resistive part of that is very large. That's why i talked about the resistance separate from the capacitance which if you noticed i also mentioned requires a larger current.

Most dedicated gate drivers can do 1 amp or more on peak current. Someone i know just ordered a bunch of drivers capable of 6 amps peak.

I know this is sometimes a little confusing, but when someone says 'resistance' and not 'impedance' they may be talking about the DC characteristic not the AC side of things. This comes up now and then probably because we call them both "Ohms".

So to word it differently, to force a fast change in drive voltage we have to have a large peak current, but once that voltage is where we want it to be, we can use a small current to keep it at that level, but only once all the changes (including those on the source and drain) have died down.