Whining PWM motor control

R

Robert Latest

Guest
Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.

Before I start redesigning the circuit to employ a less direct form of
feedback (not using the instant motor current itself to create the PWM
ramp) I'd like to ask if this problem is common, and how it is usually
dealt with. I've looked at data sheets of several PWM controller ICs and
found pretty much the very same circuit I'm using.

What are the fine points I have missed?

I know that a certain "singing" of PWM controlled inductances such as
stepper motors is common and hard to avoid. I'd just like to limit the
noise to a tolerable level.

Thanks,
robert
 
Robert Latest wrote:

Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.
Apparently the current takes longer to rise than the though 50us.
When the voltage is low the risetime to the current is longer.


Before I start redesigning the circuit to employ a less direct form of
feedback (not using the instant motor current itself to create the PWM
ramp) I'd like to ask if this problem is common, and how it is usually
dealt with. I've looked at data sheets of several PWM controller ICs and
found pretty much the very same circuit I'm using.

What are the fine points I have missed?
Do you have a diode over the motor ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
 
Rene Tschaggelar wrote:
Robert Latest wrote:

Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.

Apparently the current takes longer to rise than the though 50us.
When the voltage is low the risetime to the current is longer.



Before I start redesigning the circuit to employ a less direct form of
feedback (not using the instant motor current itself to create the PWM
ramp) I'd like to ask if this problem is common, and how it is usually
dealt with. I've looked at data sheets of several PWM controller ICs and
found pretty much the very same circuit I'm using.

What are the fine points I have missed?

Do you have a diode over the motor ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Exactly it's whinning because of the frequency modulation technique
method which you've employed is dropping the frequency well into the
audible range. In order to lessen the frequency modulation you could
make your reference a function of the output.

Alternatively is there any reason why you couldn't use a 100Khz clock
and let it drop?
 
On Thu, 18 Aug 2005 11:21:11 +0200,
Rene Tschaggelar <none@none.net> wrote
in Msg. <4304533d$0$1164$5402220f@news.sunrise.ch>

Apparently the current takes longer to rise than the though 50us.
When the voltage is low the risetime to the current is longer.
Initially of course, but once the current is up it shouldn't drop so
much. The motor has 5mH, supply voltage is 27V (which means it takes 4
PWM periods to take the motor from 0 to 1 A).

Do you have a diode over the motor ?
I do, and as much as I hate to admit it, it's a 4001. Can this alone
kill the freewheel current in 50 us? The diode is going to be replaced
with an appropriate one as soon as I place my next order for parts.

Thanks,
robert
 
On 18 Aug 2005 08:08:23 GMT, Robert Latest <boblatest@yahoo.com>
wrote:

Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.

Before I start redesigning the circuit to employ a less direct form of
feedback (not using the instant motor current itself to create the PWM
ramp) I'd like to ask if this problem is common, and how it is usually
dealt with. I've looked at data sheets of several PWM controller ICs and
found pretty much the very same circuit I'm using.

What are the fine points I have missed?

I know that a certain "singing" of PWM controlled inductances such as
stepper motors is common and hard to avoid. I'd just like to limit the
noise to a tolerable level.

Thanks,
robert
Use a clock, so that it runs constant frequency, then PWM.

The whine is probably the pole pieces flexing. I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
On 18 Aug 2005 02:37:51 -0700,
c_bielek@hotmail.com <c_bielek@hotmail.com> wrote
in Msg. <1124357870.835033.76590@g47g2000cwa.googlegroups.com>

Exactly it's whinning because of the frequency modulation technique
method which you've employed is dropping the frequency well into the
audible range.
I'm actually using a fixed frequency; it's my circuit that made the
decision to lowering the frequency at will.

In order to lessen the frequency modulation you could
make your reference a function of the output.
Yeah, I guess that's what they mean by "voltage mode PWM".

Alternatively is there any reason why you couldn't use a 100Khz clock
and let it drop?
Yes -- that it makes no sense. The time constant, given by supply
voltage and motor inductance, stays the same.

robert
 
Robert Latest <boblatest@yahoo.com> wrote:

Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.
Is your control loop hunting?
Could the load of the motor be pulling the reference voltage down?


OR (a bit of a long shot)
Is something oscillating above 20 Kc/s and giving an audible beat note
with the clock?


--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk
 
Robert Latest <boblatest@yahoo.com> wrote:
[...]
Yes it is common and a side effect of this method of control. ICs suffer as
well so it's not some trivial construction aspect. Annoying thing is that
the stepper IC datasheets make scant mention that this will happen, showing
instead textbook chopper current profiles which have bugger all relation to
reality.
Depending on supply voltage/motor/current, the current 'ramps' are quite
happy to flip down (sometimes quite stably) into various integer, 'sub
ramp' rates. An acceptable level of ramp skipping will give a 'rustling'
motor noise, longer term skips can be occasionally musical. Bad cases result
in harsh fluctuating wideband noise as the the ramps flip from one ramp rate
to another on a random cycle basis. Plays havoc with the motor ripple
currents.
It's vital that the those current sensing ramps are as free as possible from
hf spikes, noise and the cross coupled switching noise from the other coil.
A real cure can be interestingly convoluted.
regards
john
 
"john jardine" <john@jjdesigns.fsnet.co.uk> wrote in message
news:de30p0$o3c$1@news8.svr.pol.co.uk...
Robert Latest <boblatest@yahoo.com> wrote:
[...]
Yes it is common and a side effect of this method of control. ICs suffer
as
well so it's not some trivial construction aspect. Annoying thing is that
the stepper IC datasheets make scant mention that this will happen,
showing
instead textbook chopper current profiles which have bugger all relation
to
reality.
Depending on supply voltage/motor/current, the current 'ramps' are quite
happy to flip down (sometimes quite stably) into various integer, 'sub
ramp' rates. An acceptable level of ramp skipping will give a 'rustling'
motor noise, longer term skips can be occasionally musical. Bad cases
result
in harsh fluctuating wideband noise as the the ramps flip from one ramp
rate
to another on a random cycle basis. Plays havoc with the motor ripple
currents.
It's vital that the those current sensing ramps are as free as possible
from
hf spikes, noise and the cross coupled switching noise from the other
coil.
A real cure can be interestingly convoluted.
regards
john

Belay that.
There was no mention of a stepper. I must be fixated with the damned things.
Sod it.
 
john jardine wrote:
Robert Latest <boblatest@yahoo.com> wrote:

[...]
Yes it is common and a side effect of this method of control. ICs suffer as
well so it's not some trivial construction aspect. Annoying thing is that
the stepper IC datasheets make scant mention that this will happen, showing
instead textbook chopper current profiles which have bugger all relation to
reality.
Depending on supply voltage/motor/current, the current 'ramps' are quite
happy to flip down (sometimes quite stably) into various integer, 'sub
ramp' rates. An acceptable level of ramp skipping will give a 'rustling'
motor noise, longer term skips can be occasionally musical. Bad cases result
in harsh fluctuating wideband noise as the the ramps flip from one ramp rate
to another on a random cycle basis. Plays havoc with the motor ripple
currents.
It's vital that the those current sensing ramps are as free as possible from
hf spikes, noise and the cross coupled switching noise from the other coil.
A real cure can be interestingly convoluted.
regards
john
I had this problem with a current controlled stepper motor drive,
based on an integrated driver. The motor inductance was large enough
that the current wouldn't fall below the current trip hysteresis in
the next clock cycle. So the control skipped cycles and made noise.
My solution was to add some of the clock circuit triangle wave to the
current trip threshold, so that the difference of that and the current
shunt voltage crossed each other (well more than the comparator
hysteresis) twice each cycle, even though the current was essentially
constant throughout the cycle. Instant silence.
 
Hello Robert,

As Jim already said a fixed frequency is better. What I usually do if it
has to be cheap (or in your case the parts should already be flying
around in your garage): Take a Schmitt trigger such as the 74HC14 or
CD40106, build an oscillator and then quench that with a FET or
transistor that is controlled from the feedback point. IOW if the motor
current wants to exceed your limit it throttles the oscillator's "on"
period but not its frequency too much. Actually the frequency changes a
bit but not a lot.

If you want absolutly constant frequency you can build that oscillator
and follow with a one-shot that can also be made from a Schmitt gate.
Then quench that one-shot instead. There are six in a chip so you have
plenty.

Regards, Joerg

http://www.analogconsultants.com
 
Hello Jim,

The whine is probably the pole pieces flexing. I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)
They can be picky. This wasn't Daimler Benz but a big guy of a major
automotive mfg was looking at a similar issue. Comment on one version:
"Es macht ein unedles Geraeusch". You can't really translate that but
roughly it would be "It makes a noise that is not noble".

Regards, Joerg

http://www.analogconsultants.com
 
Hello John,

I had this problem with a current controlled stepper motor drive, based
on an integrated driver. The motor inductance was large enough that the
current wouldn't fall below the current trip hysteresis in the next
clock cycle. So the control skipped cycles and made noise. My solution
was to add some of the clock circuit triangle wave to the current trip
threshold, so that the difference of that and the current shunt voltage
crossed each other (well more than the comparator hysteresis) twice each
cycle, even though the current was essentially constant throughout the
cycle. Instant silence.
Have you ever done the opposite, like using the processor to accompany
with the sound of a Harley sans muffler? That made quite an impression
when doing the first demo.

Regards, Joerg

http://www.analogconsultants.com
 
On Fri, 19 Aug 2005 00:30:10 GMT, Joerg
<notthisjoergsch@removethispacbell.net> wrote:

Hello Jim,

The whine is probably the pole pieces flexing. I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)

They can be picky. This wasn't Daimler Benz but a big guy of a major
automotive mfg was looking at a similar issue. Comment on one version:
"Es macht ein unedles Geraeusch". You can't really translate that but
roughly it would be "It makes a noise that is not noble".

Regards, Joerg

http://www.analogconsultants.com
"It makes a noise that is not noble".

Like a fart ?:)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
Hello Jim,

"It makes a noise that is not noble".

Like a fart ?:)
ROFL!

It was more one of those cheapy ratchet sounds like on a child's toy.
Not quite in line with the price category of the vehicles.

Regards, Joerg

http://www.analogconsultants.com
 
Jim Thompson wrote:
On 18 Aug 2005 08:08:23 GMT, Robert Latest <boblatest@yahoo.com
wrote:


Hi guys,

I built a very simple PWM circuit to maintain a contant, unidirectional
current through a small (24V/1A) DC motor from parts I had kicking
around.

The circuit consists of a low-side MOSFET switcher with .5R current
sense in the source leg. An LM393 comparator compares this voltage to an
externally set reference and asynchronously resets a flip flop when the
sense voltage is greater than the ref. The flip flop is clocked "on"
periodically by a 20kHz oscillator; its output drives the gate driver.

Well, it works fine, actually.

My problem is that the circuit doesn't switch at 20kHz but at much lower
frequencies, which are quite unstable and vary greatly depending on the
preset current limit and motor speeds, which of course creates
intolerable noise.

Before I start redesigning the circuit to employ a less direct form of
feedback (not using the instant motor current itself to create the PWM
ramp) I'd like to ask if this problem is common, and how it is usually
dealt with. I've looked at data sheets of several PWM controller ICs and
found pretty much the very same circuit I'm using.

What are the fine points I have missed?

I know that a certain "singing" of PWM controlled inductances such as
stepper motors is common and hard to avoid. I'd just like to limit the
noise to a tolerable level.

Thanks,
robert


Use a clock, so that it runs constant frequency, then PWM.

The whine is probably the pole pieces flexing. I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)

...Jim Thompson
I hope that when faced with a spec that says "whatever he likes" you
gave an estimate that said "however long I take".

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
 
On Fri, 19 Aug 2005 00:24:22 GMT,
Joerg <notthisjoergsch@removethispacbell.net> wrote
in Msg. <WE9Ne.554$zD3.534@newssvr29.news.prodigy.net>

If you want absolutly constant frequency you can build that oscillator
and follow with a one-shot that can also be made from a Schmitt gate.
Then quench that one-shot instead. There are six in a chip so you have
plenty.
Hmm, that sound exactly like what I'm doing already: I'm using a
constant-frequency oscillator to periodically set a flip flop to "on"
(the oscillator clocks a D-FF with D tied to High), and the comparator
resets the FF when the sense current exceeds the limit.

So I'm in fact running a constant frequency. The motor takes several
cycles to get up from zero to 1A of course (f=20kHz L=5mH V=27V), but I
had expected it to basically stay there via the freewheel diode and just
take an additional sip of current each cycle. All I can see on my old
analog scope is multiple-clock rising ramps all over the screen; I can't
see if the PWM drive takes longer breaks between ramps.

It all looks as if the motor loses too much current between pulses which
may be due to my KNOWINGLY poor choice of freewheel diode. I'd like to
put in a BYV28-100 but my supplier is out of them. Any better ideas for
a few-amps fast recovery diode?

Thanks,

robert
 
On Thu, 18 Aug 2005 08:00:46 -0700,
Jim Thompson <thegreatone@example.com> wrote
in Msg. <se89g1t4v46upamr0jmf7heivs3vb01ufo@4ax.com>

Use a clock, so that it runs constant frequency, then PWM.
That's what I'm alreay doing. See my more verbous reply to Joerg
elsethread.

The whine is probably the pole pieces flexing.
Whatever it is, it has to go into the inaudible range. These are small
motors, it should be doable.

I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)
My sister's boyfriend's job used to be the acoustics of auto gears. He's
moved on to motor acoustics now. They're really picky about what a car
sound like on the inside.

robert
 
On Thu, 18 Aug 2005 19:17:35 -0700, Tim Wescott <tim@seemywebsite.com>
wrote:

Jim Thompson wrote:
[snip]

Use a clock, so that it runs constant frequency, then PWM.

The whine is probably the pole pieces flexing. I did a controller
design for Bosch/Mercedes and passing the noise spec was the hardest
part... The director of engineering stuck his head in the air duct,
listened, and decided yes or no ;-)

...Jim Thompson

I hope that when faced with a spec that says "whatever he likes" you
gave an estimate that said "however long I take".
Of course. Also made about a dozen trips to Germany in Business
Class, once in First Class ;-)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
Robert Latest wrote:
(snip)
It all looks as if the motor loses too much current between pulses which
may be due to my KNOWINGLY poor choice of freewheel diode. I'd like to
put in a BYV28-100 but my supplier is out of them. Any better ideas for
a few-amps fast recovery diode?
At 27 volts, I would use a Schottky. They have a lot of capacitance,
so no larger than necessary would be good.
 

Welcome to EDABoard.com

Sponsor

Back
Top