We are going to tackle spinning a motor. This requires the use of a transistor, which can switch a larger amount of current than the Arduino can. When using a transistor, you just need to make sure its maximum specs are high enough for your use. The transistor we are using for this circuit is rated at 40V max and 200 milliamps max – perfect for our toy motor!When the motor is spinning and suddenly turned off, the magnetic eld inside it collapses, generating a voltage spike. This can damage the transistor. To prevent this, we use a "flyback diode", which diverts the voltage spikearound the transistor.

REQD. Components:

 

01) Arduino UNO or Simillar

02) Solderless Breadboard

03) DC Motor (4.5 VDC)

04) Diode 1N4148

05) npn Transistor P2N2222A

06) Jumper Wires

07) Resistor 330 Ohm or 220 Ohm

08) USB Printer Cable for Arduino