Motor not spinning

Hi,

It is probably my inexperience in programming, but I have a problem that the motor, supplied with the starters kit, is not spinning without helping it.

The setup is a simple program with 3 LEDS that light up one by one and when all have blinked, the motor starts. See photo.
The motor does spin well, when plugged in 5V directly though…

Can I solve this somehow? Thank you!

Gr Maarten

Can you show the circuit so we can see that switch?

Ah, I guess the problem is the resistor at the switch?

Where's the motor?

dannable: Where's the motor?

Looks to me it's the red and black going out to the right, since the red is on digital pin 6 via the yellow.

If you're not supplying external power to the motor and switching a transistor, it might not be getting enough current from the Arduino. Not a good idea to power a motor from the Arduino.

Also looks to me that the switch is on a pull down resistor so pin 2 will be low when the button isn't pushed, so the leds and motor will be active before the button is pushed and stop when it's pushed.

JimboZA: Looks to me it's the red and black going out to the right, since the red is on digital pin 6 via the yellow.

That was my concern!

Sorry, the motor is on the right. The 2 wires are going to the motor.... The normal tutorial was with 3 LEDs, to make them blink and I thought, well lets put a motor to it to make it more interesting.

I looked further in the project book and they apply a battery to the setup. So only the switching with the LEDs can be done by the arduino, but not the motor..

I guess I have to be just patience and wait until I get to the last chapters of the book ;)

Thanks for the replies! And have a nice weekend.

K8MV: lets put a motor to it to make it more interesting.

You need to look at tutorials like this one. Two problems you have introduced are that the motor might have been trying to pull too much current so that could cause damage, and also the reverse spike when the motor stops can be huge. That's what the diode in the tutorial is for.

K8MV: I looked further in the project book and they apply a battery to the setup. So only the switching with the LEDs can be done by the arduino, but not the motor..

No, not quite true. The Arduino will do the switching of the motor, but indirectly. It will switch a transistor, which in turn will switch on the supply from the eternal battery.

Thanks JimboZA!