PWM Speed control issues

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does anyone have any good docs or tips on PWM speed controlling of large motors?

well i have a 250watt motor, 3krpm and 15amp full load current.

im trying to speed control the motor with the AVR's PWM timer.

i got the PWM part working, at around 2 or 3khz.

the problem is, the motor just dont want to get going. i have to push it a little, and it runs very slow. even when the timer value is FF, and thats when the only time it wants to go. unless im doing somethign wrong in the circuit, i just cant get it to go.

of course if i hook the 12v streight up to the motor, it goes EXTREMELY fast. but the PWM just dont wanna get it going.

any ideas? basic schematic of the circuit:

sorry if its crude, but i did it in paint. lol

Edit: oops forgot attachment

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you looked with an oscilloscope how the voltage behaves at the drain or gate?

It will take for ever for the FET to turn on with 100k pull-up. Besides, there's the 100k pull-down on the diode, so when the AVR powers up, the FET gate pin will float around mid voltage for some time.

FETs like pushing or pulling very rigidly, with an IO pin or in some cases there is a need for a buffer amplifier or level tranlating before the FET gate.

I hope you don't blow anything up with that. Without changing any components, you should check out if your hardware works better with say 100Hz or 10Hz PWM than with few kHz PWM.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i had an LED on the port pin. i removed LED, its working fine now.

the only problem is, i shorted the FET out the first go round, i dont wanna do it again.

any suggestions on what changes to make? the 2 diodes and 100k pul-up is supposed to be an AND gate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the 100k pull down is there on purpose. in case the enable pin goes open circuit, or high impedence, the motor wont run on its own, as the PWM constantly runs while the chip has power. :)

as the board is a module, and if i pull the board out to reprogram it for a differnet software, both diodes go open circuit and the motor runs on its own. thats what the pulldown is for. to stop that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Umm, but wouldn't it be wise anyway to turn off power before unplugging and replugging things?

Well I would connect the PWM output directly to the FET gate, maybe with a 10R resistor or something to limit the gate peak current (FET gate is capacitive). And put a 10k or 100k pull-down from the FET gate to ground.

Of course then you would not have the diode anding feature. But at least it might work better :)

Do you know if the FET fully turns on with whatever voltage the AVR gives it? So are you sure you don't need bigger gate voltage than the AVR supplies, because then you need a level translator between AVR and FET gate.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it fully turns on at about 4.8v puts it into saturation according to this datasheet im looking at.

so i dont need a buffer stage.

but then i dont have the ability to cut OFF the motor because the PWM runs all the time, unless i use a relay circuit. hehe.

in case your wondering, its the circuit to the blade motor on my RC lawnmower.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

it fully turns on at about 4.8v puts it into saturation according to this datasheet im looking at.

4.8 volts at what current?

i had this problem when i first started out with pwm, as i wasn't driving the fet with enough current to 'fully turn it on'

you need a o-scope to check it out...

a simple buffer current amplifier did the trick for me.

is this your problem? i wonder

just a guess, as your schematic isn't clear in your post

not a rookie anymore, still learning tho

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

right click my schematic and click View image. it will open a new window and view at full resolution.

anyway, i dont know if i need a buffer transistor, not sure.

anyone have an example of how a buffer is wired?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mbates14 wrote:

but then i dont have the ability to cut OFF the motor because the PWM runs all the time, unless i use a relay circuit. hehe.

PWM runs all the time only if you want to.

You can also cut off the PWM in software if you want to.

Or just turn the PWM pulse width to smallest.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

how do you stop OC1A without affecting OC1B, and vice versa? im using fast PWM 8 bit.

becuase i woudl like to cut the blade off, but still be able to drive it, as OC1A is used for the blade, and 0C1B is used for the rear drive motors. see what im saying? the only way i know of is to set OC1A to 00 while 0C1B is still running.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

how do you stop OC1A without affecting OC1B

"Disconnect" the pin from the timer, and then set it low/high as desired. COM1A1/COM1A0. See datasheet.

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.