Pages: [1]   Go Down
Author Topic: Controlling a DC motor from an arduino  (Read 302 times)
0 Members and 1 Guest are viewing this topic.
New Zealand
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Greeting Traveler
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, so after buying an uno and thinking what i should do with it for a few days, i decided to make a remote controlled car work with a TV remote. I was wondering why plugging the motor straight to the 5v pin made it work great but when i put it in a digital pin (say 3) and set it to high, it goes very slow.

I thought the digital pins on the arduino outputted 5v but why does the motor work significantly better when used on the other pin? i don't get it.
Logged

Pottstown, PA
Offline Offline
Sr. Member
****
Karma: 5
Posts: 323
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ouch! Stop doing that! Pins of the Arduino cannot supply enough power to drive your motor. You may have already damaged any pins that you attempted to use. Go to the Hardware page of this site and read about your Arduino. The motor must be have its power supplied by another device such as a suitable transistor; with proper circuitry, the transistor is controlled by an Arduino pin. - Scotty
« Last Edit: March 14, 2012, 05:46:47 am by scottyjr » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 309
Posts: 26497
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
hy does the motor work significantly better when used on the other pin
It's not about voltage, it's about current, and your output pins can't provide very much of it.
Even a tiny vibra motor from a mobile could draw more than twice the safe amount of current you could draw from an AVR's pin.
The 5V pin supplies current direct from the regulator which has a much higher current rating than the digital pins.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: