Rotation of a dc motor

I am a beginner and I have been trying to simply rotate the dc motor using arduino uno, a PN2222A transistor and a diode. It is not working irrespective of the fact that the entire model has been simulated using proteus software. Plz provide some suggestions how to achieve solution.

Let me google that for you.

I expect there's something wrong with the circuit or the wiring or the way you're powering it or the code. If I had any details of any of them I could probably be a bit more definite.


You also need a motor power supply (NOT the Arduino) and to connect all the grounds. Post a hand drawn circuit diagram.

Yes, my linked image is no good, if your motor needs more amps and volts.

I am attaching the schematic which I have used in proteus and also the code in IDE. The power supply and ground in the circuit are provided from the Arduino board

The circuit is OK, your choice of motor power supply is not OK.

What is the stall current of the motor? Look it up on the motor data sheet or the motor manufacturer's site, or use your multimeter to determine the winding resistance.

Both the transistor and the motor power supply must be able to handle/supply that current.

According to the data sheet of the motor, the stall current is 2.2A. The collector current limit of transistor is 600mA. Can you suggest a npn which can work with the current scenario?

More homework!

Use a logic level MOSFET instead. Google “arduino mosfet motor” for lots of ideas.

Basic output circuits: