Pages: [1]   Go Down
Author Topic: Interfacing servos and DC motors with adruino  (Read 706 times)
0 Members and 1 Guest are viewing this topic.
India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey guyz..
am new to adruino as i have been a picaxe user before..

so i know nothing about adruino except the outputs and inputs shown on the main board..

so i want to know how to connect hobby servos and dc geared motors to adruino uno without using any kind of shield ?..

thanks in advance
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46090
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any servo can be commanded by the Arduino, with no shield required. Connect the control wire to a digital pin, and the ground wire to the ground pin. Connect the + wire to a battery, and connect the ground to the battery, too.

Only the tiniest (and I do mean teeny-tiny) motors can be directly connected to the Arduino. For anything that actually accomplishes anything, you need a motor driver circuit. You can build your own, if you know how, or you can use a shield that someone that DOES know how has built, tested, and validated.
Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 5
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

well a sheild is not compulsary to run a dc motor use a h bridge ic or build one yourself they are pretty easy to use (if everything is connected in the right manner) and make sure you have seperate power supply
coming to servos they are even easier to use just the connect the +ve and -ve to the battery  and the signal wire to the arduino
*corrected on richard's advice :exclamation
« Last Edit: October 09, 2010, 11:57:53 am by newman » Logged

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

Quote
coming to servos they are even easier to use just the connect the +ve and -ve and the signal wire to the arduino
No!
[glow]ALWAYS[/glow][/b] use a separate power supply for servos.

The only bit newbie got right there was to make sure you connect the grounds together, and to connect the signal wire to an output.
« Last Edit: October 09, 2010, 10:48:05 am by AWOL » 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.

Hyderabad , India
Offline Offline
God Member
*****
Karma: 5
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

hmm yeah true but what  i really mean +ve and -ve to the battery but i guess i just omitted it in typing  smiley-razz
Logged

Hyderabad , India
Offline Offline
God Member
*****
Karma: 5
Posts: 621
can't help not to think arduinaizing something !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oh i really didnt think it that way but anyways i corrected it ! :-[
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks guyzz..

see i connected the control wire(generally white) to the digital input pin and the red wire i.e Vcc to the Vcc pin on adruino and the black wire(ground) to the ground pin on board..

will it work ?..
Logged

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

Quote
to the digital input pin
I'd make that an output.
Quote
red wire i.e Vcc to the Vcc pin on adruino
No, make that an external power supply.
See reply #3.
« Last Edit: October 09, 2010, 01:15:22 pm by AWOL » 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.

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8928
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so i want to know how to connect hobby servos and dc geared motors to adruino uno without using any kind of shield ?..

For servos, you  use the servo library to get the required *PPM* signal, and use an external power supply for the servo. For motors, you can use a *PWM* signal going to a motor driver (transistor, h-bridge, etc) which will control the external power supply to the motor. Note that **>EXTERNAL POWER SUPPLY<** is generally critical for success with motors and servos.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1]   Go Up
Jump to: