Maker Pro
Maker Pro

PWM with low side MOSFET drive for DC motor (coast or brake whenoff?)

B

Brandon

Jan 1, 1970
0
I need to correct my understanding of a low side MOSFET switching for
a DC motor. I have a DC motor in parallel with a diode connected to
the drain of an n-channel MOSFET on one side (anode side of the diode)
and the motor supply voltage on the other. When the MOSFET is
switched on, the motor runs, and when it is switched on the motor
coasts. However, I was under the impression that when the MOSFET is
off the flyaway diode should provide a short circuit current loop for
the still spinning motor, thus braking it. I have a load with a very
little friction, so having the motor coast instead of brake makes it
almost impossible to control via unidirectional PWM. So question #1
is: "Is it supposed to be coasting?" and question #2 is: "If so, is
there a standard/easy way to alter the circuit so the motor will brake
when PWM is off?". Thanks in advance.
 
B

Brandon

Jan 1, 1970
0
I should probably add that the motor is braked in the opposite
direction that it is driven (i.e. resists turning backward).
 
P

Phil Allison

Jan 1, 1970
0
"Brandon"
I need to correct my understanding of a low side MOSFET switching for
a DC motor. I have a DC motor in parallel with a diode connected to
the drain of an n-channel MOSFET on one side (anode side of the diode)
and the motor supply voltage on the other. When the MOSFET is
switched on, the motor runs, and when it is switched on the motor
coasts. However, I was under the impression that when the MOSFET is
off the flyaway diode should provide a short circuit current loop for
the still spinning motor, thus braking it.


** Nonsense.

That diode shorts the back emf after each pulse of current fom the PWM
drive - ie it keeps the current flowing in the same direction in the motor.
I have a load with a very
little friction, so having the motor coast instead of brake makes it
almost impossible to control via unidirectional PWM. So question #1
is: "Is it supposed to be coasting?" and question #2 is: "If so, is
there a standard/easy way to alter the circuit so the motor will brake
when PWM is off?".


** Yon can add breaking with a second MOSFET wired to short the motor
whenever there is no PWM drive.

Pulls it up real quick.



.......... Phil
 
J

Jon Slaughter

Jan 1, 1970
0
Brandon said:
I need to correct my understanding of a low side MOSFET switching for
a DC motor. I have a DC motor in parallel with a diode connected to
the drain of an n-channel MOSFET on one side (anode side of the diode)
and the motor supply voltage on the other. When the MOSFET is
switched on, the motor runs, and when it is switched on the motor
coasts. However, I was under the impression that when the MOSFET is
off the flyaway diode should provide a short circuit current loop for
the still spinning motor, thus braking it. I have a load with a very
little friction, so having the motor coast instead of brake makes it
almost impossible to control via unidirectional PWM. So question #1
is: "Is it supposed to be coasting?" and question #2 is: "If so, is
there a standard/easy way to alter the circuit so the motor will brake
when PWM is off?". Thanks in advance.

When you switch off the power to the motor there is no reason the motor
should stop unless it has an internal brake that brakes when there is no
power. I have a motor that has seperate power for the brake that you power
to turn off the brake.

The motor itself has inertia and essentially acts like a generator when
there is no power. So if its spinning it will continue to spin unless there
is some mechanism to stop it. (it will, of course, gradually slow down due
to friction and load)

My guess is that since you are saying it has a built in brake and it works
"one way" that you need to change the "polarity" of the motor.

The diode only provides current flow for the back emf to reduce the voltage
spike when turning off the mosfet.

I do not believe it is possible to brake a motor without some built in brake
system or "reversing" direction. I mean this w.r.t to modifying the PWM.

In fact, its logical to assume it would be a bad idea. With PWM you are
turning off the power to the motor and if it braked then you would
drastically cut your efficiency. (although a smoothing cap would void that
so I suppos it still could work with the right motor)


If the motor itself does not have a built in brake(or one in the right
direction, which would simply say that you have it hooked up backwards) then
you can use an H-Bridge to run the motor bidirectionally and simply slow the
motor down by reversing the polarity. In this case you will need to monitor
the motor's back emf to know "how much" to slow it down.

I'm not sure if thats a good idea but it would probably work.. at least for
a while.
 
B

Brandon

Jan 1, 1970
0
In fact, its logical to assume it would be a bad idea. With PWM you are
turning off the power to the motor and if it braked then you would
drastically cut your efficiency. (although a smoothing cap would void that
so I suppos it still could work with the right motor)

Control is more important than efficiency for me here, and with with
If the motor itself does not have a built in brake(or one in the right
direction, which would simply say that you have it hooked up backwards) then
you can use an H-Bridge to run the motor bidirectionally and simply slow the
motor down by reversing the polarity. In this case you will need to monitor
the motor's back emf to know "how much" to slow it down.

I was using an H-bridge before (an NJM2670) but it seemed like
overkill considering that I only need to run the motor in one
direction and for the project I'm working on the less space I take up
on my circuit board the better. It did work like I wanted it to,
though: it braked when both inputs were the same and so running PWM to
one of them gave me the results I wanted (i.e. a 50% PWM duty cycle
ran the motor as if half the supply voltage was applied).

I like the idea of using another MOSFET to short the motor during the
off part of the duty cycle, but at the moment I don't see how to add
it to the circuit so that I can turn it on and off with a logic
signal. Perhaps I am missing the obvious as I haven't done much with
circuits in awhile.
 
P

Phil Allison

Jan 1, 1970
0
"Brandon"
I like the idea of using another MOSFET to short the motor during the
off part of the duty cycle,


** Who's dumb idea was that ??

Not mine.

Do learn to read.




....... Phil
 
J

Jamie

Jan 1, 1970
0
Brandon said:
I should probably add that the motor is braked in the opposite
direction that it is driven (i.e. resists turning backward).
you need a dynamic brake circuit added..
use a high side Mosfet (P channel) to short the motor leads with a
series load resistor when you want to do a DB .
 
D

Dave

Jan 1, 1970
0
Brandon said:
Control is more important than efficiency for me here, and with with


I was using an H-bridge before (an NJM2670) but it seemed like
overkill considering that I only need to run the motor in one
direction and for the project I'm working on the less space I take up
on my circuit board the better. It did work like I wanted it to,
though: it braked when both inputs were the same and so running PWM to
one of them gave me the results I wanted (i.e. a 50% PWM duty cycle
ran the motor as if half the supply voltage was applied).

I like the idea of using another MOSFET to short the motor during the
off part of the duty cycle, but at the moment I don't see how to add
it to the circuit so that I can turn it on and off with a logic
signal. Perhaps I am missing the obvious as I haven't done much with
circuits in awhile.



Brandon, you need to read up on 4 quadrant control so that you can actively
brake the motor, that is to say actively take energy out of the motor and
return it to your source; this will need an H-bridge. When you switch a
resistor into the circuit this will brake the motor effectively but the
energy is lost as heat into the resistor. This can cause problems if you
have a lot of energy in the motor and load as the resistor will get very hot
and can fail without sufficient cooling. On top of this its damn
inefficient and the resistor may have to be quite large.

The act of applying the voltage supply in the opposite polarity in order to
brake the motor is called plugging and whilst effective results in massive
heating in the motor. If it's something you do rarely then maybe it's ok
but if you are braking and/or changing motor direction regularly then you
will cause the motor windings to heat up and ultimately fail. Also if you
reverse the polarity how do you know when to turn off before the motor
starts rotating in the opposite direction?

Don't short the motor with a MOSFET, you will get a huge current in the
MOSFET and it will fail very quickly and with nice big flames and the room
will stink for a week!

When taking energy out of the motor (regenerating) you need somewhere to put
it. If the whole system is operating from just a battery then it can go
back in there. If it's a d.c. power supply then there will be some
capacitance available, but this may not be enough and when the capacitors
become fully charged you will start driving up the d.c. rail so what you
thought was a 12V supply could end up with much larger voltages and cause
failure in the d.c. supply. Adding more capacitance may resolve this, or a
battery. Alternatively if it's powered from the a.c. mains then you could
put it back there but this is a whole other area of pain, literally if you
come into contact with the high voltage!!! HAZARD!!!

I hope this helps a bit.

Dave.
 
P

Phil Allison

Jan 1, 1970
0
"Dave"
Don't short the motor with a MOSFET, you will get a huge current in the
MOSFET and it will fail very quickly and with nice big flames and the room
will stink for a week!


** That is a load of absolute SHIT.

Dave is a moron.



....... Phil
 
J

Jamie

Jan 1, 1970
0
Dave said:
Brandon, you need to read up on 4 quadrant control so that you can actively
brake the motor, that is to say actively take energy out of the motor and
return it to your source; this will need an H-bridge. When you switch a
resistor into the circuit this will brake the motor effectively but the
energy is lost as heat into the resistor. This can cause problems if you
have a lot of energy in the motor and load as the resistor will get very hot
and can fail without sufficient cooling. On top of this its damn
inefficient and the resistor may have to be quite large.

The act of applying the voltage supply in the opposite polarity in order to
brake the motor is called plugging and whilst effective results in massive
heating in the motor. If it's something you do rarely then maybe it's ok
but if you are braking and/or changing motor direction regularly then you
will cause the motor windings to heat up and ultimately fail. Also if you
reverse the polarity how do you know when to turn off before the motor
starts rotating in the opposite direction?

Don't short the motor with a MOSFET, you will get a huge current in the
MOSFET and it will fail very quickly and with nice big flames and the room
will stink for a week!
Never heard of DB resistors?
Its a standard, We've been doing it for years in the plant. No
problems with that method..
Using a 4Q drive is way over kill for the simple task at hand and the
stress on the motor to get maximum stall effect most likely is going to
be more stressful than just using DB resistors.
If the op wants instant stop, he'll need to use a locking clutch
when the motor is de energized.
In such applications, maybe he would be better off with a stepping
motor if the RPM's arn't to much.



http://webpages.charter.net/jamie_5"
 
J

Jon Slaughter

Jan 1, 1970
0
Brandon said:
Control is more important than efficiency for me here, and with with

Well, there might be a heating issue though.
I was using an H-bridge before (an NJM2670) but it seemed like
overkill considering that I only need to run the motor in one
direction and for the project I'm working on the less space I take up
on my circuit board the better. It did work like I wanted it to,
though: it braked when both inputs were the same and so running PWM to
one of them gave me the results I wanted (i.e. a 50% PWM duty cycle
ran the motor as if half the supply voltage was applied).

The H-Bridge isn't much larger than than the mosfet(ok, it is but shouldn't
matter too much I would imagine).
I like the idea of using another MOSFET to short the motor during the
off part of the duty cycle, but at the moment I don't see how to add
it to the circuit so that I can turn it on and off with a logic
signal. Perhaps I am missing the obvious as I haven't done much with
circuits in awhile.

This would probably work but I guess the only real way to know is to try.
You will need another logic pin and its essentially the same as the first
mosfet except you put a small resistor(for testing purposes... try different
values) between the mosfet and ground.

In your code you simply turn on the other mosfet after the first is turned
off(not during each cycle but when you want to brake it). This swithces in
the load to the motor and will slow it down.

Hopefully you are using a uC so it will be easy. If your using a PWM
IC(unless it has some controll pins for "braking") then its going to be a
little harder and not as perfect.

Essentially what you have to do is branch off the digital signal, filter it,
invert it, and then to the second mosfet. That way when the PWM is off it
will be get inverted to high and then turn on the secondary mosfet. You have
to filter it else it will do this once every cycle and be a bad thing. The
problem with the filtering is you have to have enough to get the PWM's
average value without much ripple(might not have to be all that great
actually but as long as it represents a high for your inverter) but also
have it drain enough so that it responds quickly when the PWM is shut off.
(you can invert then filter too)

Hopefully that makes sense and hopefully your using a uC as it is 100x
easier and cheaper.
 
D

Dave

Jan 1, 1970
0
Phil Allison said:
"Dave"



** That is a load of absolute SHIT.

Dave is a moron.

Phil,

Please don't be so disrespectful as I am trying to help the OP, if you
disagree then fine I can accept that but please also supply your argument.
 
D

Dave

Jan 1, 1970
0
Jamie said:
Never heard of DB resistors?
Its a standard, We've been doing it for years in the plant. No problems
with that method..

Well DB resistors are exactly what I was talking about when saying they are
ineffecient as they release the energy as heat, as I said in my first
paragraph. Yes it works fine but it is inefficient and may result in a
large device depending on the amount of energy involved.
Using a 4Q drive is way over kill for the simple task at hand and the
stress on the motor to get maximum stall effect most likely is going to
be more stressful than just using DB resistors.

What stress on the motor?
If the op wants instant stop, he'll need to use a locking clutch
when the motor is de energized.

Yes, but it's an extra component as would an H-bridge and controller be.
In such applications, maybe he would be better off with a stepping motor
if the RPM's arn't to much.

Well maybe, but as you say, speed and loads on the motor will determine
this.
 
J

John Devereux

Jan 1, 1970
0
Phil Allison said:
"Dave"



** That is a load of absolute SHIT.

Why? That is what generally happens. I have done it :)

I suppose with a sufficiently large mosfet and a sufficiently small
motor it would work.
 
R

Robert Adsett

Jan 1, 1970
0
The diode only provides current flow for the back emf to reduce the voltage
spike when turning off the mosfet.

No, the diode conductive the current flow to prevent an inductive spike.
Back EMF opposes the flow of current in the motor. That's why current
decays as the motor speed up. The back EMF approaches the drive voltage
thus the effective voltage across the motor windings becomes small.
I do not believe it is possible to brake a motor without some built in brake
system or "reversing" direction. I mean this w.r.t to modifying the PWM.

Sure it is. You won't be able to grake to or near zero but you can get
quite high braing forces.
In fact, its logical to assume it would be a bad idea. With PWM you are
turning off the power to the motor and if it braked then you would
drastically cut your efficiency. (although a smoothing cap would void that
so I suppos it still could work with the right motor)

Or you can feed the energy back into the power bus. Such regen braking
is common on AC and PM motors on EVs.

Robert
 
R

Robert Adsett

Jan 1, 1970
0
I need to correct my understanding of a low side MOSFET switching for
a DC motor. I have a DC motor in parallel with a diode connected to
the drain of an n-channel MOSFET on one side (anode side of the diode)
and the motor supply voltage on the other. When the MOSFET is
switched on, the motor runs, and when it is switched on the motor
coasts. However, I was under the impression that when the MOSFET is
off the flyaway diode should provide a short circuit current loop for
the still spinning motor, thus braking it. I have a load with a very
little friction, so having the motor coast instead of brake makes it
almost impossible to control via unidirectional PWM. So question #1
is: "Is it supposed to be coasting?"

Yes.

The diode simply conducts the current that would otherwise cause an
inductive spike.

Back EMF opposes the the applied voltage and is thus blocked by the
diode. That's why the motor current decays as the motor reaches speed.
You need to short the motor to have braking due to the power control.
In the short term what happens in that case is the current decays from
the drive current and then reverses as the back emf is able to overcome
the inductance and start the motor generating.
and question #2 is: "If so, is
there a standard/easy way to alter the circuit so the motor will brake
when PWM is off?". Thanks in advance.

Look for the terms 1/2H and regen braking (and maybe breaking I've seen
a lot of misspellings of brake recently). Full H's have their place as
well. If driven correctly you get regen out of a 1/2H down to slow
speeds. If you don't have a supply bus that can tolerate regen you may
have to add a braking load to dissipate the energy. Or if you only go
from on to stop then you could simply short the motor through a
sufficiently large resistor.

Unless you have a full H the final brake to stop will involve friction
either in the load or as a separate mechanical brake (maybe both).

Robert
 
R

Robert Adsett

Jan 1, 1970
0
Robert Adsett said:
No, the diode conductive the current flow to prevent an inductive spike.
Conducts

Back EMF opposes the flow of current in the motor. That's why current
decays as the motor speed up. The back EMF approaches the drive voltage
thus the effective voltage across the motor windings becomes small.


Sure it is. You won't be able to grake to or near zero but you can get
quite high braing forces.

grake -> brake
braing -> braking

That was a particularly bad bought of typos.

Robert
 
Top