DC motor works first time Only

Hello All.

I am using an Arduino UNO to write to a DC motor from Pin (~3). The first time I run the program, the motor works, but when I stop the program and turn it ON again, the motor does not work.


330 Ohm resister
PN2222 transistor

Also, when I running the program, the transistor is heating up. I attached a picture of the circuit. Please ignore the other parts of the picture. I just have the issue with the motor.

By the way, I using LabView as software.

Please help with explanation.

Thank you in advance.

Moved here as it had nothing to do with website.

Please READ THIS first.
It will help you get the best out of the forum.


Post your code.

How big is the motor? Running it off the same power supply as the Uno is asking for trouble; motors are noisy and can draw fairly large currents (even small ones), especially when they're stalled or loaded.

Transistor is wired backward. Is base resistor 1k or 10k?

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

OPs circuit;

Tom... :slight_smile:

Check the pinout of the PN2222, there are more than one configuration.

What motor are you using, can you post spec/data please?

Tom..... :slight_smile: