This is a basic question but I would appreciate help. I have:
- An Arduino
- A 4.5V DC motor
- 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?