PWM not causing motor to turn until 50%

Setix's picture

I built a Pulse Width Modulator to control the speed of a 12V DC motor, but the motor doesnt even turn until the potentiometer is at 50%. How can i fix this?

 

Let me give more background. I took apart a Skil 12VDC 1 Amp Drill and removed the motor, gearbox, transmission, and chuck all in a single unit, and wanted to control that motor much like the trigger on the drill did...slow to fast, at full torque.

So I built a PWM to do it...  I got it from here....http://www.bakatronics.com/shop/item.aspx?itemid=383

The PWM turns the motor but not until the pot resistance has been reduced by 50% or so...if I leave it at 50% the motor turns slowly at first then gains speed...this was not the control level I was looking for...

can anyone help me figure out what is going wrong? 

jklug80's picture

It sounds like the motor

It sounds like the motor isnt gettign enough voltage. Use a multimeter to see what it is getting at various positions. You could add more voltage (could fry the motor at the highest setting), or let the microcontroller receive a value from the pot and control the motor depending on the setting.

Of course I can't tell you how to work out option 2, but I'm sure it can be done fairly easily with additional parts.

"Perfect for making a hand

"Perfect for making a hand held throttle for model railroad switch where extremly slow motion is required. With a little modification, it will fit into the FB02 box and make a great little hand held throttle. "  I pulled this quote off of the description for the product.  It may be salvagable if you get a pot with a max resistance that is slightly more than what you're getting at 50% on your current pot.  It seems that your current pot starts at too high of a resistance for your motor. Also make sure the minimum resistance on your new pot is low enough that you get plenty of power.
RascalRobot's picture

This is how it was explained to me

A motor requires POWER to turn. Power is volts times current. So, if your PWM is at 50% duty cycle (on half the time and off the other half), then you are getting half the voltage and half the current. Mathematically speaking, the power is the square of the duty cycle. So a 50% duty cycle gives you 0.25 the power ( 0.5 x 0.5 ). If you want half the power, take the square root to figure out what the duty cycle should be.

sqrt( 0.5 )  = 70.7% duty cycle. Half power is almost 3/4 duty cycle.

Also, if the motor hasn't started turning, you need to apply more power to "get it moving". There are small friction forces inside the motor that must be overcome before it will turn freely. Once it starts moving you can back off on the power to control the speed. Think of it like a wagon full of bricks. Once you get the wagon moving it doesn't require as much "power" to keep it moving.

Setix's picture

I thought the purpose of the

I thought the purpose of the PWM was to provide full voltage and amperage but change the frequency of the duty cycle.

It is possible that I'm experiencing a drop in voltage since I have a 12V 1.5amp AC to DC transformer. So in the course of using the PWM I'm getting voltage drop due to the transistor prior to my load terminals for the motor. of course thats assuming my 12v transformer puts out 12 volts...I checked on my meter and got 13.4 Volts

 

RascalRobot's picture

Sort of ...

PWM does supply full voltage and current, but only part of the time. A duty cycle of 10% means you only get voltage and current for 10% of the cycle. The frequency, while important, only describes how often the pulse happens per second.

So let's assume you have a frequency of 1000 hertz. That means there will be 1000 pulses per second. The duty cycle tells you how much of each pulse will be "on" and giving voltage/currrent to your motor. Each "pulse" is 1 millisecond. A 50% duty cycle will be on for 1/2 millisecond, then off for 1/2 millisecond.  A 30% duty cycle will be on for 0.3 milliseconds and off for 0.7 milliseconds.

mx-io1.gif

Google for "PWM tutorial", there are websites that can explain it better than me.

Setix's picture

Right. Operating under those

Right. Operating under those assumptions, lets assume the at 0 resistance with the pot the motor is at 99% cycle, and at maximum speed. wouldnt the case hold true for being at 90% resistance of the pot, thus we have 9% cycle, the motor should still turn just at a much slower speed. However it doesnt, not until the pot is at about 50%, which leads me to assume that the voltage isnt sufficient at the load terminals to turn the motor.
BaseOverApex's picture

Logarithmic

rik's picture

the purpose of pwm

You are right about pwm. Keep using it the way you describe. I suspect your power source. But did you check whether it is stabilized? Some transformers put out an oscillating direct current. You may need to correct that with a big electrolytic capacitor.

How is this source performing under load? You say the "transformer" puts out 13.4V. Does it still provide 12V when you pull more than 1.0 A? Or does it collapse? Can your meter measure currents that high? That would be great.

Setix's picture

Well my meter is supposed to

Well my meter is supposed to read up to 10 Amps, however every time I plug the lead into the 10 Amp fuse the meter continually beeps at me, its a Radioshack 22-812, and no one can explain why its beeping at me and doesnt give me a reading. I've replaced all the fuses and batteries.

I'm not sure where it is putting out osicllating current or not, but when I get home tonight I will check. 

rik's picture

beeping beeper

Sounds like you are doing it right. from the manual, page 12:

Connecting the Test
Leads
The meter sounds a
warning tone when you set
it to measure anything
except current and you
connect a test lead to +10A
MAX. This reminds you not
to touch the circuit with the
test leads.

Setix's picture

So it seems like I could

So it seems like I could measure the amperage at the load, while the motor is on, then remove the motor, and measure the voltage with a load under the 400mA fuse(( ( a 12v LED or some such) for measuring DC Voltage...So I'll have numbers in a few hours

 

BaseOverApex's picture

Nope

If you modulate the frequency, you have frequency modulation (FM). If you modulate the width of the pulse, you have pulse width modulation (PWM).

Some PWM controllers also modulate the frequency as a cheap filter to irritating audiable frequencies.

You're right in that you get full voltage/current, but only for brief pulses so that the average is representative of the mark to space ratio (the highs vs. the lows).

Question: are there any remnants of the orignal drill controller electronics, or do you have your new controller wired directly to the motor?

Possibility: is the pot linear or logarithmic? Most (inexpensive) ones are logarithmic.

 

Setix's picture

I did indeed hook up the

I did indeed hook up the original speed controller to the drill and to a 12V 1.5 Amp power supply. It didnt have enough juice to break the friction from the planetary gears in the transmission. 

Short Answer...not enough Amps...the battery supplies enough amperage. However the battery is only a 1AmpHr battery...and I need sustained Amperage for up to 30 minutes.

So the hunt is on for a better PWM and a 250W power supply 

robologist's picture

Dual failure?

The PWM drive mentioned doesn't appear to tell what PWM frequncy is being used, so only an oscilloscope (or a special multimeter) might be able to discern that.Might or might not be important.

The motors it typically drives appear to be model train motor, which are probably in the low amp range fit for this driver. The Skil drill on the other hand should draw substantially more current, as well as being a different inductance (hard to measure) than train motors. I would guess that there is a combination failure of the power supply cutting out, saving the PWM speed control from getting over-currented and smoking. The power supply cuts out as the system approachs or passes 1.5 A and the PWM driver is not even able to supply much voltage (since power is down) until the motor is turning (making the current draw less). As the inertia of the motor allows it to draw less, the supply can stay on longer, and the PWM starts working so the motor can turn at a spped appropriate to the duty cycle. 

I have some Harbor Freight 9.6 volt drill motors that have a rated stall current of 41 A, which is why I think the Skil drill motor draws a bit more than 1 A just starting out.

Setix's picture

I took some readings and...

It seems that either the PWM is not functioning as predicted, or my multimeter averages values. I first hooked up the motor and decreased pot resistance until the motor started to turn. It read roughly around 1 amp, then raise the resistance and the amperage dropped, lowered resistance and the amperage increased enough to spark the leads of the meter.

Unhooked the motor and hooked up a 12v led, at maximum pot resistance. The volts were reading about .6 and it increases all the way up to around 13 or so at 1% resistance.

So as I said, either the PWM doesnt behave as intended, or my meter reads in averages.

I also tried to hook up the power source ( 1 amp 12VDC ) to the original motor controller from the drill and have the motor be the load. It barely, and I mean barely had enough power to break the planetary gear friction. Some how the battery was providing alot more power to the motor than my power source. How could it do that without burning out the motor.

 

Should I try a battery pack instead of a wall mounted transformer, will that burn out the PWM, its only rated at 12VDC and 2 Amps

 

so I might need to build the 12V >10 Amp PWM that I have seen online.

rik's picture

measuring averages

The behavior of your meter is to be expected. At minimum duty cycle (you describe that as max pot resistance), the pwm controller puts out very short bursts of 12V. Your meter is not an oscilloscope, so it can only present you one reading: an average voltage of 0.6V.

Both controller and meter are functioning as predicted.

It sure looks like your motor needs at least 1.0A to start turning. After that you can throttle down a bit for slower RPMs.

Chris the Carpenter's picture

And here comes the smoke...

Well my friend,

To be honest, I can't answer this problem, but I can give you another. I have a couple 12v dewalt drill motor/ trans assemblies I have been playing with. One thing I have found is that these drills pull SERIOUS amps! You can probably get the motor to turn (unloaded on a workbench) but I can assure you as soon as you apply a load and start sucking amps that little PWM is going to be toast. --I have seen such smoke on more than a few prototypes I have made. I do however have (maybe) a solution... I have been looking at, but not tried, some R/C motor controllers. It seems that these controllers handle massive power and are recognized by the PIC as a standard servo. --I'll make you a deal: You go buy one, test it and if it works, tell me! Then I can buy one myself! :)

BaseOverApex's picture

Doo-Hickeys

These Doo-Hickeys are designed to be plugged into the receiver of an RC car in place of a regular servo, so if you buy one that advertises itself as for this purpose, then you can send it a srandard servo pulse from your picaxe (or other servo controller).

Setix's picture

12VDC >10AMP PWM

I found a schematic for a 12VDC-24VDC >10 Amp PWM, do your 12V DeWalts pull more than 24 Amps?

Here is the link for the schematic...

http://solorb.com/elect/pwm/pwm1/

perhaps this is the PWM that I should be using

 

Append: After more research some of the 12VDC drill motors I've seen have outputs of 250 Watts or higher, meaning almost 21 Amps at max load. It would seem that I would need to use a power supply for a computer to run this motor....surely that cant be correct...I would be better of with a battery pack that is rechargable. 

robologist's picture

Current in a box

Many Battlebots guys use NiCad packs that can dump current at a higher rate many wall power supplies. Lead Acid does very well too. A controller that can handle that much current is really needed as well. Innovation First, Robot Power, Vantec, Robot Solutions all have various devices that can run pretty high current for a price. If speed control is all you need (not direction), paralleling a number of FETs could get you to the current handling needed, but a FET driver woulld be needed too.

 

voodoobot's picture

Nicads were awesome back in

Nicads were awesome back in the day and still are. the newer type cells nimh and li-ion have better charging and less memory issues but cost more. You can pull quite a few amps from the nicads...I know some of the folks were pulling something wickid 30+Ah or so for the rc drag cars...I think 18 sub C cells around 24 volts and a 9 turn motor....ahh the days...  :)

seems a bit much for a robot though....

Setix's picture

Options

So it seems to me as I have few options: I would like opinions since I'm fairly new at this. Keep in mind what i'm after is speed control at max torque without that initial jump in speed due to the stall current. My bot is about 5 lbs or so and only has the one drive motor (designed that way) and I would like my rpm range to be 20-80.

I can either wire up a battery pack with some serious amps with a power controller, or use a PC 300W power supply to power my drill motor and use a heavy duty PWM to control the speed.

Or I can use a different Motor all together, much like this one http://www.robotmarketplace.com/products/0-BPK51.html and use a smaller power supply and still use the PWM.

I'm sure there are more options and i would love to hear them. Can anyone recommend some good literature on this type of work?

As a side note it doesnt matter if the system is tethered or not. 

robologist's picture

Motor overkill?

Guess it depends on the application of the robot. The PK51 motor at Robot Marketplace is for Battlebots, where the device is supposed have enough extra speed and torque to run into and push around another robot of similar size. If your robot is travelling on a flat area (hard floor) then you'd only need a motor to have a torque of maybe a tenth of the weight times the radius of the wheel being used. So a 5 pound robot with 4 inch wheels would need 0.5 x 2 = 1 pound-in or 16 oz-in to move. Motors show stall torque as a figure, so the motor with 16 oz-in would stall trying to move a 5 lb robot, but one with 17 oz-in would just get it to move, slowly. One with 32 oz-in stall torque would get the robot to move near half the no-load or free-run speed. I guess what it boils down to is that a lot less motor can be used to move your robot than either the drill motor or the PK51. Unless you are building a Battlebot. There are some motors at Jameco for around $22 that might work too, for moving. Is the motor supposed to reverse too, or just control speed in one direction?
Setix's picture

just  move the one

just  move the one direction. But I did some calculation and the negative force applied to the wheel, which has a radius of 3 inches is ~5 lbs, so multiply that by the radius and it has to overcome 1.25 ftlbs and with a max RPM of 90 

Ρ= ( (90rpm)x(2∏)x(1.25 ft/lb))/33000 = .021 hp

the PK51 motor stalls with 12VDC stalls at  396 oz-in convert that into ft-lbs

396 * .005208333 =  2.0624 ftlbs at stall.

So you can see that either the PK51 or the drill motor are pretty much what I need.

Question is how to power it. 

 

I suppose I could switch to use an AC motor 

robologist's picture

An untested circuit

Here's a possible driver, if you have a method of generating the PWM Note, this will invert the PWM signal, so 100% will have the motor off, 0% duty will be full on. Probably a bad design issue.

FETspeed.jpg

Parts list :

Vishay Schottky Rectifier, 20 A 20TQ045PBF  $1.59
http://www.mouser.com/search/ProductDetail.aspx?qs=MYVaeE1wThIt6euH0T6mt...

IRF N-chan MOSFET 60 v 50 A IRFZ44PBF  $1.30
http://www.mouser.com/Search/ProductDetail.aspx?qs=%2fRKvNCQzLu0R%252bpF...

On Semi GP transitor 75 v 600 mA P2N2222ARLG 0.27
http://www.mouser.com/Search/ProductDetail.aspx?qs=ZXBb0xZ9WeA2JhxpqSlwr...

Vishay Power resistor 39 ohm 3 watt 0.46
http://www.mouser.com/Search/ProductDetail.aspx?qs=LCMWAU1DZcyMDzF6dawms...

Xicon resistor 330 ohm 1/4 watt  0.10
http://www.mouser.com/Search/ProductDetail.aspx?qs=toAOiZ7FbseylIZzSFvRv...

Shipping might be more than the parts, and I haven't tried this, I have seen the IRFZ44 in a variable speed drill, and I think this might be an adequate digital interface circuit. Hopefully some folks can check this out, and if you feel comfortable soldering something together, give it a shot.  Have a fire extinguisher nearb=, just in case. :)

 

BaseOverApex's picture

Confirmed

IRFZ44 already has builtin flyback diode. On principle, though, this circuit WILL work. It's what we eventually came up with here.
robologist's picture

FET Flyback no worky

.. unless it's around the motor, giving a path for the motor coil current to go. That's why I added the schottky diode around the motor since the diode in the FET won't help the motor lose it's stored energy.
BaseOverApex's picture

I knew that

Of course. My application has a worm drive, so it doesn't need that type of brake. D'uh.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.