# pwm to control a dc motor

Discussion in 'Sensors and Actuators' started by mariomoskis, Mar 14, 2012.

1. ### jackorocko

1,284
1
Apr 4, 2010

Yes, that makes perfect sense and .1 Ohm resistor wouldn't effect the rest of the circuit that much. Thanks for the explaining that, learned something new today.

2. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
It's more about heuristics than math (unfortunately)

You want an emitter resistor that will drop a voltage larger than the expected range of Vce's seen across the transistors.

The larger you make them, the more perfect the current sharing will be, but the more power they will waste.

The sharing will never be perfect, and you may want to measure the voltage across these resistors under full load to confirm that the transistors are sharing current well (the voltages should be almost identical).

Beware that resistor tolerances will cause some imbalance, so it is probably a good idea to measure each resistor to confirm for yourself that they are within spec (and preferably much better)

3. ### mariomoskis

82
0
Mar 13, 2012
and what about the new transistor BD153 which i am using with more current at its colector 1.5A.
why the motor consumes more than 0.3A when i supply the circuit with more than 3.5V?

4. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
This is what I get for responding to a post and assuming what it was about (and not reading it because I was in a hurry)

Those small value emitter resistors are generally only required where you parallel several BJTs to increase their current capacity.

You could do that here, but frankly, it's not worth the effort.

5. ### mariomoskis

82
0
Mar 13, 2012
don´t worry
nono,i am using the next circuit but with a new transistor BD135,not 2n2222a as you said me
http://imageshack.us/photo/my-images/705/sinttulo2mn.jpg/

no resistor at the emitter,and when i try to increase the supply voltage more than 3.5V,the motor consumes more than 0.3A,i don´t know why.

6. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
it's a 3V motor. If you supply it with a higher voltage it will draw a higher current.

That's why I've told you that you have to limit the duty cycle when you use a higher voltage.

What duty cycle are you using?

7. ### mariomoskis

82
0
Mar 13, 2012
yes,i know that the duty cycle won´t be more than 60%,
i have duty cycle 50%,so it should work,yes?

8. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
OK, reduce the duty cycle and make sure that the average current falls as you do so.

What duty cycle results in an average current of about 300mA?

Do you have *any* load on the motor at all?

9. ### mariomoskis

82
0
Mar 13, 2012
no,i don´t have load on the motor,
ok,i will try it later about duty cycle later and i will say you
but with this transistor it should work?

and i have one question,when i calculate the resistor at the base,which voltage i must use,to be sure about saturation
4V because it is the 555 output
or 4-0.7 because i must consider that in saturation i will have Vbe=0.7??

i red that if i use a zener diode or normal diode with 2V at the emitter,i will be sure to have 3V across my motor with duty cycle 100% and supply voltage 5V,is it correct?

10. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
So you're saying that your 3V motor, which is quoted as drawing 300mA under no-load is drawing 1.5A when driven from 5V via that BD153? That sounds like way too much. Either the specs are wrong, or something is going on with that motor.

Sure you can use some diodes to add a voltage drop. It will increase power dissipation and reduce torque, but it's OK

11. ### mariomoskis

82
0
Mar 13, 2012
if you remember when i use the 2n2222a,the transistor get so hot because the colector current max was 0.8A,
and now i am using the BD135 because you said me that i needed a transistor with more current at its colector,so this new transistor has 1.5A

12. ### mariomoskis

82
0
Mar 13, 2012
this was the cause about the new transistor

13. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
Do you mean the new transistor is rated at 1.5A?

When I looked it up it seemed to be rated for a higher current. What package is it in. 1.5A is still marginal,but it should work as long as the motor is unloaded.

Or were you measuring 1.5A somewhere?

14. ### twister

172
7
Feb 12, 2012
I learned a new word. I do a lot of heuristics!

15. ### mariomoskis

82
0
Mar 13, 2012
yes,new transistor BD135 can have until 1.5A in its colector,not 0.8A as we had before with the 2n2222a,i don´t have load at the motor!so i won´t measure 1.5A anywhere

I think that the first problem is that the transistor doesn´t get satutared,but i calculated it to be inside that range:

if load is 0.3A,i must have 0.3/25(gain)=0,012A minimum at the base to get saturation
then the resistor at the base must be maximum:
(voltage at the output 555-voltage base emitter)/current calculated before to get saturation:
(4-0.7)/0,012=275ohm, and i am using 100ohm so it should be in saturation,right??

and i still don´t understand why when the supply voltage is 2.5V the motor consumes 0.3A,with this new transistor,why can it happen?

16. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
OK, lets start at the beginning.

Connect your motor to a source of about 3V and measure the current.

Tell us what it is.

17. ### mariomoskis

82
0
Mar 13, 2012
3V motor consumes 0.3A

18. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
OK, so consuming near 0.3A from a slightly lower voltage seems OK.

Is that what you're saying? When you connect the motor in series with the transistor, the motor draws 0.3A (with the transistor turned on presumably)?

And I presume it spins at pretty much the same speed?

19. ### mariomoskis

82
0
Mar 13, 2012
for the transistor BD135(max 1.5A collector) when i have supply 2.5V, the motor consumes 0.3A

and Rb=100ohm

20. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,361
2,756
Jan 21, 2010
OK, that sounds fine (other than the fact that you didn't answer one of my questions.

I would connect it up to your 555, set it to the **MINIMUM** duty cycle, and place an ammeter in series with the motor.

Slowly turn up the duty cycle until the motor starts spinning. Note the duty cycle (or the resistance of the pot) and write it down as the MINIMUM duty cycle.

Continue to slowly turn up the duty cycle until the ammeter reads 0.3A. Note the duty cycle (or the potentiometer's resistance) and record this value as the MAXIMUM duty cycle.

Then modify the circuit to limit the duty cycles to the ones noted.

I would advise placing a small heatsink on that transistor.