## How to engineer a PWM motor driver.

17 posts / 0 new
Author
Message

Permanent magnet DC motor with commutators.

Motor rated for a max of "i" amps continuous at max of "e" volts. Stall current is "is." Switching frequency is f. Mosfets rated for 1.5 * e and 2 * i. Driver intends to detect a current higher than "i" and stop the drive pulses somewhere between "i" and "is."

Of course, whenever the mosfet turns off, the motor will try to drive its current back through the circuit until the coil is out of energy. Usually you put some diodes in to dissipate this power and keep this kick voltage to about 0.7v. How many watts do these diodes need to dissipate? I suppose it would be something less than 0.7 * "i."

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

Last Edited: Sun. Apr 19, 2015 - 12:16 PM

It depends on the amount of energy stored in the motor inductance. Thus you would need to know the inductance of the motor and the current.

When building inverters its a good idea to use a power device with an integral diode for IGBT's these are known as co-packs

MOSFETS have the diode in there and there is nothing you can do, sure you can add extra snubbers across the power switches which for big drives would probably be essential but IME I have done just fine with the body diode, I have blown a lot of power devices in my time but never bescause of switching transients, I have an inverter that has switched 325VDC 24/7 for about two years now and its still going strong, the bearing has started to whine lately and I think its common mode related (no filter) but I don't care

Power/rectifier diodes drop much more than the standard 0.7V, its current related but 2V is more realistic, which means at moderate/high currents you need to heat sink rectifiers and the like

Last Edited: Mon. Apr 20, 2015 - 06:51 AM

Energy per coil is 1/2 LI^2, similar to energy in a cap 1/2 CV^2. I think?

1/2 LI^2 (one not eye)

Beats me where the extra I came from.... bg

Imagecraft compiler user

Last Edited: Tue. Apr 21, 2015 - 03:23 PM

I think you're right. A coil is kindof the opposite of a cap, or at least that's how I thought of it in "Multiple time constants" class.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

So whats the L of your coil and max amps when you shut it off? You get a Big Spike but it doesnt last long.

Imagecraft compiler user

Have no idea. Manufacturers of toy trains don't spec such things so I'll have to figure out how to measure a few on a budget of 0.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

I have a meter that reads L and C (great for building passive crossovers. You should change your hobby to audio). You can resonate the L of a pole piece against a known C. Got a signal generator? Plan B is just pump a square wave into it thru a 1K R and measure the time to decay. Thats 5 time constants. tau =R/L  I think.

Imagecraft compiler user

Last Edited: Tue. Apr 21, 2015 - 03:26 PM

The R and a square wave is probably the easiest.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

So just what IS the R and L of a 3 pole Mabuchi motor? (I did slot cars in the 60s...) Inquiring minds want to know....

Imagecraft compiler user

bobgardner wrote:
You get a Big Spike but it doesnt last long.

Just long enough to kill your FET .

Another thing you should think about: when you are decelerating the motor and you are doing current control in an H-bridge the energy is fed back into the DC-bus cap so the voltage rises.   Either make the cap big enough or put in a bleed resisistor that is switched on when the voltage goes too high.

edit: sorry, did not read everything properly.   With a small train motor you won't have to worry about energy coming back.   I was thinking fast servo drives....

Power is Vd x I x (1 - duty cycle) where Vd is the diode drop, I the current flowing and duty cycle what you are switching at the moment.    So for example with Vd = 0.7V, I = 4A and 30% transistor on time you would get 1.96W.

Last Edited: Fri. Apr 24, 2015 - 08:55 PM

bobgardner wrote:

So just what IS the R and L of a 3 pole Mabuchi motor? (I did slot cars in the 60s...) Inquiring minds want to know....

I'll let you know when I have a chance to figure it out. Been a little busy. Modern trains have fancy 5 pole Mabuchi can motors. Impressive, eh?

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

Using the method from http://www.dos4ever.com/inductor... I get an inductance between .45 and .91 uH.

4.57 / 50,000 = 91.4 uH

4.57 / 100,000 = 4.57 uH

Using Bob Gardner's method with a 100 ohm resistor, I get a decay of about 40uS which might be 5*R*L. L = 40uS/5R for .08uH. Hmm. Not much agreement in the two methods. On second thought, maybe that's about 20uS decay or .04uH.

Maybe my first figure is off by a factor of 10?

I'd try it with my gabotron for a signal generator except I don't remember how to set the frequency.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

Last Edited: Tue. Dec 13, 2016 - 08:40 PM

except I don't remember how to set the frequency

Gabriel has all of his product manuals on line, on his web site: http://www.gabotronics.com/

Look at the column on the left side, under the Articles heading.

JC

bobgardner wrote:
So just what IS the R and L of a 3 pole Mabuchi motor? (I did slot cars in the 60s...) Inquiring minds want to know....

Coming across the [old] mentions of slot cars made me guess that the aficionados would have stuff on the Web.  And "slot car motor inductance" into Google gave all kinds of interesting reading.

The short answer seemd to be "a couple/few millihenries per turn", as e.g. http://www.slotcartalk.com/slotc...

09-23-2006, 08:34 PM

Well, without getting too windy, measure the armature from comm segment to comm segment. The reading for every wind, arm blank, and fullness of the arm with wire is different. A 12 turn will read between 18 and 19 uH's or microhenrys. Every wind will go up or down by approximately 3uh. In other words, a 13 turn will read about 22-23uH. An 11 turn will read 15-16uH.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Quote:
Well, without getting too windy, measure the armature from comm segment to comm segment. The reading for every wind, arm blank, and fullness of the arm with wire is different. A 12 turn will read between 18 and 19 uH's or microhenrys. Every wind will go up or down by approximately 3uh. In other words, a 13 turn will read about 22-23uH. An 11 turn will read 15-16uH.

Hmm. I may be in the ballpark then.

I found how to adjust the frequency of the gabotron's AWG output : slowly! It goes up 4 or 5 hz per second while you hold the button. At 801Hz now... Going to take too long to get to 20KHz or so.

Retrying Bob's method. With a 1v positive step through a 100 ohm resistor ... Maybe I need to buy some more through-hole parts, I have scads of SMD 1K resistors ... The voltage across the coil falls to zero in about 50uS. That comes to 50uS/100*5 or .1uH. Oh! Duh. Time constant t is L/R so L =(R * Time)/5 or 1mH.

Let's try it with a known coil! Now I have about 2 1/2 uS, so our formula would give us 100*2.5uS/5 or 50uH. According to API Delevan, this is a 47uH coil. So it seems our figuring is about right.

What do you think?

As motors go, I think this would be pretty big for a slot car, so I would anticipate more inductance than a slot car's motor.

The motor. I disconnected the capacitor just to be sure it wasn't confusing things.

The SMD coil is too small to get a clear picture.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead.

Last Edited: Wed. Dec 14, 2016 - 04:10 PM