Maker Pro
Maker Pro

pwm to control a dc motor

the load of my motor will be maximun0.3A,but when the motor will move slowly,i think that this value will be smaller

so in the data sheet which i saw on internet the transistor 2n2222 has gain 40,then 0.3/40=0,0075A minimum to be in saturation

but i am not 100%sure that the gain is 40 because i saw another values too in the data sheet but i don´t understand the datasheet so good!! so maybe i could be bigger

i will need at least gain 0.3/0.002=150 to get it,i saw in the data sheet that the transistor could be this gain but i don´t understand exactly how to do it
 
i will need at least gain 0.3/0.002=150 to get it,i saw in the data sheet that the transistor could be this gain but i don´t understand exactly how to do it

AFAIK, gain has everything to do with collector current. that is why I stated it had a gain of 40, because this is the min gain available according to the datasheet that is at a collector current that is greater then your load would consume.

But the datasheet is always just a best estimate, the transistor you use may have slightly less/slightly more, this is why you double the base current to make sure the transistor is in saturation to provide max collector current with the least amount of loses(heat) in the transistor.


do you think i could do a pair Darlington to get more gain ?

I know you could, some have a gain of nearly a 1000. But there are disadvantages, mostly more dissipated power which means more heat generation. Not exactly good if you need to conserve power.
They also have slow switching speeds. But on the other hand, mosfets need a good amount of current to charge the base capacitance of the gate/source junction for fast switching.

This is a really good article on DP transistor.
http://en.wikipedia.org/wiki/Darlington_transistor

If it was me I think I would use some thing other then the ni9401, but maybe you are forced to use that chip.
 
Last edited:
yes,i am forced to use ni9401,so i will look for another transistor with gain aprox 150, do you know some?

and one question about the circuit with ni9401
the supply voltage which i am giving to the circuit is 3V as you can see in the picture, but if i would up this value for example to 6V
will it affect to the work of my motor?
or it won´t affect because the voltage which read my motor just depends about the amplitud of the pwm signal and its duty cycle,which give me ni9401?
 
ok,about the circuit with the 555,i am having the problem that the transistor is so hot and i don´t know why
my Vcc is 7V,then i have 6V at the 555 output

so if i have 6V/540ohm=0,011A at the base,why the transistor get so hot and the motor turn slow?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Are you sure it's 540 ohms? that's an odd value.

Try reducing the base resistor to 220 ohms. See if that improves things at all.

You may have damaged the transistor though.

Also, do you have a reverse biased diode across the motor? (make sure it's reverse biased and not forward biased -- the stripe should be closest to your +V supply).
 
yes, and i just try it with 270 ohms with a new transistor and the same problem!!

yes,the diode is conected well with the stripe closest to my supply +V

that is so extrange, what can i do?
 
but if the 555 output has 6V and i need al least 7.5mA at the base of my transistor to be in saturation i need 6/7.5mA=800 omhs maximum to get the minimum current possible,so can i try with this value to down the current at the base? but i get the same
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
I suspect that the peak current drawn by the motor exceeds that which the transistor can supply.

I would recommend that you get an N channel logic level mosfet capable of switching several amps (at least), or wire the existing transistor up to another higher powered transistor in a darlington arrangement.

The increased voltage drop across the darlington is not going to be a huge concern.

If you had an oscilloscope I'd recommend that you look at the waveform across the CE of the transistor. I suspect it's not going into saturation (or the current through it is too high)
 
ok i will try about the 2 transistors toguether and i will say you the results
and could you say me what is this because is the first time i listen it :
I would recommend that you get an N channel logic level mosfet capable of switching several amps (at least)???
 
If you had an oscilloscope I'd recommend that you look at the waveform across the CE of the transistor. I suspect it's not going into saturation (or the current through it is too high)

I know an oscilloscope would be the best option, but couldn't you just apply a 6v source to the base of the transistor with the load attached and take a voltage measurement across the C-E junction to check if the transistor was in saturation?
 
and i tried about darling with 2 transistors, the trnasistors don´t get hot but when i have a supply voltage of 5V,then 4V at the output of my 555,the motor consumes the maximum current let=0.3A
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
and i tried about darling with 2 transistors, the trnasistors don´t get hot but when i have a supply voltage of 5V,then 4V at the output of my 555,the motor consumes the maximum current let=0.3A

So that sounds right then.

When the 555 output falls to ground the motor should be off.

This will allow the 555 to switch the motor on and off very rapidly, giving you PWM control of it.

The base resistor can probably be increased in value again. If you're using 220 ohms now it is too low, but it won't really hurt.
 
yes,but the value of R which i calculated was for Vcc=7,not 5V! and i should get 7V but the current consumed is higher than the maxium allowed

and why am i watching the voltage at the colector like that, it is impossible to know if the transistor is saturated or not. it is like the frequency is so big and the response isn´t good

what happen if i put a diode or resistor at the emisor to maybe solve the problem of the current?

and one question more:
i have Vcc=7,but at the 555 output i have 6V,so when i want 3V on my motor which duty cycle should i take? 3/7=42% or 3/6=50% ??

the datasheet of the motor is the next,maybe it could help:
http://imageshack.us/photo/my-images/401/motordc.png/
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
If you keep the transistor turned on, of course excessive current will flow.

The idea is to turn it on only part of the time so that the average current in 0.3A maximum.

The voltage drop across the darlington is possibly going to be in the order of 1.2V, so the max mark space ratio is now going to be:

(100 * Vm) / (V+ - 1.2).

In your case this works out as... (100 * 3) / (7 - 1.2) = 52%

The output voltage of the 555 is (almost) irrelevant as all it has to do is supply a small amount of current to the base of the transistor.

I note that the maximum current for your motor is *NOT* 0.3A (that's pretty much the minimum). No wonder the little transistor got so hot.
 
the voltage drop across the darlington will be 1.4V,like 2 diodes. but shouldn´t this voltage affect only in the saturation zone? not in cut-off?

and as we can see in the datasheet the peak efficiency the current is 1.05A,so should i calculate a new value of R to get saturation like this: 1.05A/160(gain)=0.0065A 7V/0.026A=1076 ohms maximum value ??
or the current that i must use to calculate this must be I=0.3A not I=1.05A

yes i understand now why the transistor get so hot,it is cause of: i have a 7V supply so the power is 7V at 1.05A = > 7 Watts.

how could i be sure that the transistor is saturated?because if i don´t get it,i will have always the problem that the transistor get so hot
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
the voltage drop across the darlington will be 1.4V,like 2 diodes. but shouldn´t this voltage affect only in the saturation zone? not in cut-off?

Yep

and as we can see in the datasheet the peak efficiency the current is 1.05A,so should i calculate a new value of R to get saturation like this: 1.05A/160(gain)=0.0065A 7V/0.026A=1076 ohms maximum value ??
or the current that i must use to calculate this must be I=0.3A not I=1.05A

The current could be much higher if the motor is stalled -- and this is not given.

Also remember that we're talking about current at 3V, or average current at around 6V and 50% duty cycle, so the peak current will be about twice that..

ALSO... that calculation simply allows a collector current that high, it doesn't say anything about the Vce, to reduce that, you want to increase the base current still higher.

I'm a bit limited in not knowing what transistor(s) you're currently using, but your figures above actually indicate that a base resistor of 220 ohms would be justifiable!

yes i understand now why the transistor get so hot,it is cause of: i have a 7V supply so the power is 7V at 1.05A = > 7 Watts.

No, not unless you have a load on the motor -- remember that we're hoping to have (say) 1.5V across the transistor and an average current of just over an amp, so a dissipation of just a little over 1.5W -- still enough to make a TO-220 device quite warm without a heatsink. If your base drive is insufficient it will dissipate more.

how could i be sure that the transistor is saturated?because if i don´t get it,i will have always the problem that the transistor get so hot

By supplying sufficient base current.

At the currents you're expecting, a power mosfet might be a better option because it has somewhat simplified drive requirements and lower losses.
 
Top