driving a 5v motor

I have tried three different but simple circuits to drive a 5 volt motor, through pin9 of an Arduino UNO, under different routines (the circuits are given in Arduino for dummies).

The circuits involve simply a transistor, diode and resistor. Power supply is via the 5v Arduino pin.

In each case, the motor will not drive but when the motor is replaced by an led the sequences are followed exactly.

The motor will operate ok when connected directly to a power supply.

How can I get the motor to run?

How can I get the motor to run?

You need to use an external power supply for the motor, do not power from the arduino.

Hello

Thanks for your swift reply. I have tried an external power supply without success. I have tried various voltages up to 12 volts.

Which motor? How much current does it need?

May the diode be in the wrong direction? Did you try with leds including diode?