0

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?

David
  • 4,504
  • 2
  • 25
  • 44
  • possible duplicate of [What determines how much current can flow through a 2N2222 A?](http://electronics.stackexchange.com/questions/104354/what-determines-how-much-current-can-flow-through-a-2n2222-a) – Ignacio Vazquez-Abrams Nov 29 '14 at 15:04
  • A picture really does paint 1000 words, a schematic would help here. – David Nov 29 '14 at 15:18
  • Have you connected the grounds together? – Majenko Nov 29 '14 at 15:23
  • 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). – Russell McMahon Nov 29 '14 at 16:06
  • Can you make any reliable statements about the signal from the PWM pin? – Kitana Nov 29 '14 at 23:40

1 Answers1

0

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.

paul
  • 46
  • 1