Transistor to run 5v motor.


I bought a transistor bag (yeah I know I'm a real optemist) and have trouble to use transistors that came with the bag and it's my first time trying to use transistors.

I have connected them as this guide but nothing happends and the motor works when I connect it at the 5v on the Arduino and it's connected to USB on my computer.

I have tryed at first the 3A transistor BD233 And it diddent work, tryed another of the BD233 same problem, tryed also to change to a smaller one as the 1A BC638 and still nothing happends.

I have also smaller transistor to use as 500mA but I don't know if they are to small, anyone who is the transistor king or queen that wanna help me with this?

I have also tryed to disconnect the diode and also the resistor and tryed analogwrite with lower PWM to see if it could be that but still same problem.

I have changed the motor pin to digital output 5(it's the PWM) and also tryed the 3rd digital pin.

Hope someone can help me with this, the 500mA pin is 2N1711 NPN transistor the others are PNP.

The dc motor works great when i connect it to the 5v output on arduino but through the transistor or an digital output pin it don't work.

Thanks for a great answer.
Best regards Fredrik.

Please supply a circuit diagram. Hand drawn and photographed will do.


Please supply a circuit diagram.

And while you’re at it, the code…

Hey guys!

It’s the same circuit diagram and code as in the link, the only difference is that I use the pin 5 that is a PWM pin at my board, also using 1k resistor.

I saved the circuit diagram picture and at attached it to this forum so you can see it directly.

int motorPin = 5;
void setup() {

pinMode(motorPin, OUTPUT);
void loop() {
digitalWrite(motorPin, HIGH);
digitalWrite(motorPin, LOW);


Thanks for the response.
Best regards Fredrik.


Change the 1k (2k2 in the diagram) to 150 ohms and you might have better results.

BJTs need lots of base current to saturate, typically 5 to 10% of collector current.

Your 2N1711 is only rated for 0.5A, this is very probably less than your motor needs anyway.

So what is the stall current of your motor?

Never power a motor from the Arduino 5V rail - that is a logic supply and needs to be clean,
not corrupted with spikes and drop-outs from your motor. Separate 6V supply for your motor,
and a logic-level n-channel MOSFET to drive it are what I would recommend. Choose a logic level
MOSFET with an on resistance of 0.1 ohms of less.

Let's repeat that, many people don't get this right. Logic level, n-channel.