DC-Motor current-fall when connected via PWM and PNP transistor

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

Hi

I try to run DC-motor by PWM. I generate the PWM signal by ATTINY85 MCU and connect the PWM output pin to the base of PNP transistor(B772) through 220Ohm resistor

My working-voltage (for both motor and MCU) is 5V from my PC USB

I connect the transistor emmiter to the Vcc of the USB, the collector to one side of the motor, and the another side to the USB Gnd

The motor playing buzzing sound, and runs very very very slow. the multimeter says the current is 0A

 

I tried to connect the transistor base to the usb Gnd(still through the resistor) instead of to the PWM OP. the motor worked and the current was 0.5A

When I tried to replace the motor with LED,  and connect the transistor base to usb Gnd the LED worked and current was 160mA

When I tried to replace the motor with LED,  and connect the transistor base to PWM OP the LED worked and current was 80mA(my PWM is 50%)

I have no offical details about the motor, but it originally was connect to 3.7V battery, and the multimeter says it's 3.5Ohm

 

I failed to check the LED resistance(don't know why) and can't understand why the current is only 160mA, and I can't understand why the motor current is only 0.5A when according to my calculation it's should be 1.4A

 

But my biggest problem it why the motor doesn't work with PWM? If someone know, please explain me

Thnx

 

 

This topic has a solution.

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

You can't pull 1.4 A from a PC USB port.  In most cases it's 100 mA or 500 mA, unless the connected device negotiates with the PC host port for more.

 

Transistor CE junctions will exhibit a voltage drop which will reduce the voltage seen by the motor.  Try a P-channel MOSFET instead.

 

What is your PWM frequency.  If it's too high the field strength in the motor's coils won't have time to reach full strength.

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Hi

First, thanx for the fast and helpfull answer

I worked with defult frequency(I think it's 1Mhz) without prescaling

I change it to 1024 prescaling and now its work correctly(0.5A when connect directly to usb Vcc, 0.25-0.45A when via transistor an PWM) and the motor run in +-50% speed

 

But I don't understand some things:

A. You said I can't pull 1.4A from a PC USB, but when I check the current between Vcc and GND of the USB it was 2.8A

B. I understand why when the PWM frequency was high the motor doesn't run. but why the multimeter show 0A? I think it's because untill the current 'arrived' to the motor, the voltage fall to 0 and the current change direction. Am I right?

C. Why I can't measure a LED resistance?

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

C. Why I can't measure a LED resistance?

An LED isn't a "linear" device.

It is a diode, which happens to emit light when forward biased.

 

Ohm's Law, V=IR, (or in this case: R=V/I), works great for a resistor, and gives a linear line if one plots the I vs V curve.

The resistor's resistance is constant.  So double the voltage gives double the current.

 

A forward biased diode's "resistance" increases as the applied voltage is increased.

Once the applied voltage reaches the diode's forward voltage, the current through it will increase, but the voltage across it is almost constant.

 

The graph of current vs voltage for a LED is shown below, (from Wiki LED).

 

In a typical circuit, one has a voltage source driving a resistor in series with an LED.

If the voltage source is a little bit higher than the forward voltage of the diode, one can calculate how large a resistor is needed for a given current flow, or vice versa.

 

If one has a 3 V power supply, and the forward voltage of the LED is 1.2 V, then there will be 3 - 1.2 = 1.8 volts across the series resistor.

R=V/I  If one wanted 10 mA to flow through the resistor and the LED then R = 1.8 / 10mA = 180 ohms.

 

The forward voltage of the LED is either obtained from the data sheet for the LED, or one can measure it on the bench.

 

The "resistance" of the LED isn't usually important, unless it happens to be a laser diode.  But that's a different topic.

 

JC 

 

 

Last Edited: Sun. Nov 16, 2014 - 02:55 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

yoni013p wrote:
A. You said I can't pull 1.4A from a PC USB, but when I check the current between Vcc and GND of the USB it was 2.8A
How are you determining that?  Just placing an ammeter across Vcc and GND?  If so that's a bad idea.  You're just shorting out Vcc.  When you measured this current, did you also measure the voltage drop across Vcc and GND?

 

Is this actually a USB port on a computer?  Or is is a port on a powered hub, or just a 5V USB wall charger?

 

If this is a port on a computer, I'd have to say that it's unusual to be able to pull 2.8 A directly without a device first negotiating with the host to permit it.  The USB standard only has to provide 100 mA to 'dumb' devices.  More than that and most ports require that the connected device negotiate over the data connection for permission to draw more.  Most versions of the standard stipulate 1.5 A or 1.8 A as a maximum current.  There is a Battery Charging Specification which allows for as much as 5 A.  Have a look at the chart here.

 

What exactly is plugged into this USB port?  Are you just pulling power from it?  Or do you have a device plugged in to it and you are tapping into the 5V on the device?

 

More importantly, how did you arrive at an expected value of 1.4A for your motor?  Did you just measure the resistance of the motor?  If you found that it was 3.5 ohms, that might lead you to believe that the motor would draw 1.4 amps from 5 volts (ohms law), but that would be the current if the motor was stalled.  A free-running motor will draw much less current than the resistance of its coils might lead you to suspect.  The rapidly rising and falling fields in the coil greatly increase the impedance such that the current drawn is less.  If you apply a mechanical load to the motor it will slow down, the impedance will drop, and the current drawn will increase (as will the torque).

 

 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]