Control the power output

I have just connected a motor (DC) to the arduino uno. What kind of component should I use to control the power supply to the motor ? Thanks in advance. :)

Can you tell what kind of motor it is ? (brand, type, voltage, stall current, and so on).
The board to power a motor is called a “motor driver” or “motor driver board”.
Here are modern mosfet motor driver boards : Pololu - Brushed DC Motor Drivers

Sometimes a motor driver with old chips like the L293D or the L298 are still used, but those are old chips. They only work with certain voltages and certain motors.

This is probably the most versatile board : http://www.adafruit.com/products/1438

Dasaradh: I have just connected a motor (DC) to the arduino uno.

NEVER connect a motor directly to an Arduino. The Arduino cannot supply enough current and may be damaged.

...R

Robin2: NEVER connect a motor directly to an Arduino. The Arduino cannot supply enough current and may be damaged.

...R

Thanks a lot.. So how should I connect the motor ??

Will this code be useful ?


int motorPin = 3;

void setup()
{
pinMode(motorPin, OUTPUT);
}

void loop()
{

int speed = 200;
if (speed >= 0 && speed <= 255)
{
analogWrite(motorPin, speed);
}
}

Dasaradh: Thanks a lot.. So how should I connect the motor ??

As @Peter_n suggested in Reply #1

...R