Servomotors are special position motors. They are often used in RC airplanes, RC cars and robots, where a precise position is required. You can easily find them in a RC specialized store.

A typical servomotor consists in a DC motor connected with a control circuit and a gear box. The gear box converts the DC motor into torque. The control circuit has a potentiometer for feedback, so it can read the current position and adjust it automatically. A servomotor can't do a complete turn, they go up to 90 or 180 degress.

A servomotor has 3 wires: red (V+), black (GND) and white or yellow (SIGNAL). The red and black are the power supply wires and the third is for control.

To control a servomotor, power it with 5V and supply the control wire with a voltage from 0 to V+, the position will be proportional to the Signal voltage. To test it, connect it like this:

Sketch 1

#include span style="color: #cc6600;">Servo.h> Servo motor; 
void setup()
{
motor.attach(3);
}
void loop ()
{
motor.write(45);
delay(1000);
motor.write(125);
delay(1000);
}

Sketch 2

#include span style="color: #cc6600;">Servo.h>Servo motor;
void setup()
{
motor.attach(3);
}
void loop ()
{
int i;
for(i=0;i<180;i++){
motor.write(i);
delay(10);
}
delay(1000);
for(i=180;i>0;i--){
motor.write(i);
delay(10);
}
delay(1000);
}

References:
http://arduino.cc/playground/
http://www.sparkfun.com/products/9065

Views: 7816

Tags: arduino, servomotor

Comment by antonio herrera on April 9, 2012 at 9:57am

the 7805 ci and  the L7805cv are  ther the same?

Comment by Fernando Gil on April 10, 2012 at 6:18am

Yes, you can use any 7805 regulator.

Comment by mandatorybs on July 19, 2012 at 2:00am

Can five of these be used in parallel safely & would the ICs require a heatsink?

Comment by Nick Porter on April 23, 2013 at 10:46am

Can you plug the servo dir to the pins at the end of the arduino?

 

Comment by Danny Vigo on May 18, 2013 at 11:40pm

Why would you want to connect them in parallel? Are you trying to increase the current? Perhaps to run big steppers?

Comment

You need to be a member of GarageLab (arduino, electronics, robotics, hacking) to add comments!

Join GarageLab (arduino, electronics, robotics, hacking)

Latest Activity

Profile IconElectric and Adderall, Ishmael Muhammad, Yuval kob and 3 more joined GarageLab (arduino, electronics, robotics, hacking)
Wednesday
Jesse Howards updated their profile
Jan 29
Profile Iconsuneet, Augustin Aziankou and Ayinde Adetunji joined GarageLab (arduino, electronics, robotics, hacking)
Jan 29
Augustin Aziankou updated their profile
Jan 28
Profile IconTom Evans, said, Ghenam houssam and 15 more joined GarageLab (arduino, electronics, robotics, hacking)
Jan 25
Kenny Sims is now a member of GarageLab (arduino, electronics, robotics, hacking)
Jan 11
Paulo Trindade is now a member of GarageLab (arduino, electronics, robotics, hacking)
Jan 7
Profile Iconyashwita suvarna, António Gonçalves, Thurman Gillespy and 6 more joined GarageLab (arduino, electronics, robotics, hacking)
Jan 4
Profile IconMehmet Emin Örs, Andrew Myers, Ruban Venkatesh and 1 more joined GarageLab (arduino, electronics, robotics, hacking)
Dec 28, 2015
stephen smith is now a member of GarageLab (arduino, electronics, robotics, hacking)
Dec 22, 2015
Profile Iconlantoniaina bruce, Manoel Pereira, Ben and 1 more joined GarageLab (arduino, electronics, robotics, hacking)
Dec 21, 2015
GarageLab replied to GarageLab's discussion Serious claims against BeagleBone's manufacturer CircuitCo
"Hello guys, New facts to the CircuitCo case. But until now, the didn't refund us or send the…"
Dec 21, 2015
michae coley left a comment for RITIU TRAIAN
"what project have you done?"
Dec 15, 2015
Profile Iconshalini amarnani, Philipp Schmid, Jesse Howards and 4 more joined GarageLab (arduino, electronics, robotics, hacking)
Dec 14, 2015
Profile IconAbador and Dara joined GarageLab (arduino, electronics, robotics, hacking)
Dec 9, 2015
GarageLab posted a blog post

Sodium Ions Rechargeable Battery Prototype

A joint of French science institutions just publish an article that claim they produced a…See More
Dec 7, 2015
Jay Rocket is now a member of GarageLab (arduino, electronics, robotics, hacking)
Dec 7, 2015
GarageLab posted a blog post

Eye Controlled wheelchair

Patrick Joyce has a disease called Amyotrophic Lateral Sclerosis (ALS), the same disease from…See More
Dec 4, 2015
Nathan Ronald O'Connell is now a member of GarageLab (arduino, electronics, robotics, hacking)
Dec 4, 2015
GarageLab posted a discussion

Claims against BeagleBone's manufacturer CircuitCo

Dear Members,We would like to inform you that, unfortunately, the manufacturer of BeagleBone…See More
Dec 4, 2015

© 2016   Created by Marcelo Rodrigues.   Powered by

Badges  |  Report an Issue  |  Terms of Service