0
\$\begingroup\$

This is a basic question but I would appreciate help. I have:

  1. An Arduino
  2. A 4.5V DC motor
  3. Various transistors, like BC337, 2N7000, 2N2222A

What I'm trying to do is very simple: control the motor with the Arduino. I want to control it with PWM, so I can change the speed.

This is what I tried:

Connect the motor between my 5V power supply (a 500 watt PC power supply) and transistor collector (with protection diode); connect PWM pin of the Arduino to the transistor base, with a 1Kohm resistor; connect the transistor emitter to ground.

The motor doesn't spin, it just makes a little noise! If I connect the motor direct to the power supply it spins.

What might I be doing wrong?

\$\endgroup\$
  • \$\begingroup\$ possible duplicate of What determines how much current can flow through a 2N2222 A? \$\endgroup\$ – Ignacio Vazquez-Abrams Nov 29 '14 at 15:04
  • \$\begingroup\$ A picture really does paint 1000 words, a schematic would help here. \$\endgroup\$ – David Nov 29 '14 at 15:18
  • \$\begingroup\$ Have you connected the grounds together? \$\endgroup\$ – Majenko Nov 29 '14 at 15:23
  • \$\begingroup\$ You don't say what the power or current rating of the motor is. BC337 is able to handle 500 mA+ but motor may want to take several amps at startup. Measure motor current with an ammeter (DMM on 10A range). \$\endgroup\$ – Russell McMahon Nov 29 '14 at 16:06
  • \$\begingroup\$ Can you make any reliable statements about the signal from the PWM pin? \$\endgroup\$ – Kitana Nov 29 '14 at 23:40
0
\$\begingroup\$

You might need a bigger transistor. For large motors google "darlington" to get more current gain. Also scope the output of your arduino to see if it really works. No scope: add a second 1kohm resistor feeding a capacitor (few uF) to the output of the arduino and measure with a DMM. At 100% dutycycle you should get close to supply voltage of the chip, at 50% half, etc. Check chip hardware and/or code to make sure you don't have inverted logic: ex 80% duty cycle is not 80% LOW and 20% HI as if driving a PNP transistor.

\$\endgroup\$
  • \$\begingroup\$ You are right, i tried with a tip120 and it worked, thanks! \$\endgroup\$ – user2104749 Nov 30 '14 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.