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: 5716

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

GarageLab posted blog posts
7 hours ago
Joonas Karjalainen is now a member of GarageLab (arduino, electronics, robotics, hacking)
8 hours ago
Veritus posted photos
yesterday
Profile IconRajeevalochana U R, xavier, Jon Maguire and 1 more joined GarageLab (arduino, electronics, robotics, hacking)
yesterday
GarageLab posted a blog post

Homemade guitar looper with Arduino

Here is how to produce pedalboard for electric guitar. The idea is to connect pedals to the…See More
Friday
GarageLab posted a blog post

Next generation thrusters for marine robotics

Rustom Jehangir, Joe Spadola and Josh Villbrandt want to further the field of marine robotics. They…See More
Thursday
Profile IconCeline Buline Forma and Gilmar Barbosa joined GarageLab (arduino, electronics, robotics, hacking)
Wednesday
Gilmar Barbosa replied to GarageLab's discussion Show your lab!
Aug 27
GarageLab posted blog posts
Aug 27
Profile IconMichael Tria, Carl C Sartin and Oswaldo Machado joined GarageLab (arduino, electronics, robotics, hacking)
Aug 26
GarageLab posted a blog post

Pressure Gauge Modded to Measure Internet Usage

The appeal of having a 100 year old gauge on the wall that shows the current Internet usage is hard…See More
Aug 25
GarageLab posted blog posts
Aug 22
Profile IconAngelo Zanellato and Allan Byres joined GarageLab (arduino, electronics, robotics, hacking)
Aug 21
Shannon Bradley commented on GarageLab's blog post Company creates device that recharges smartphones ultrasound
" I have been having good results out too ten to twenty miles. I'm about to fix this…"
Aug 21
GarageLab posted blog posts
Aug 21
Marcelo Rodrigues commented on Marcelo Rodrigues's blog post Arduino generated VGA (color) signal - Complete!
"Jay, Here it is. Enjoy! "
Aug 20
Jay Curtis commented on Marcelo Rodrigues's blog post Arduino generated VGA (color) signal - Complete!
"Hey, great stuff! Found this site through searching for a solution to get VGA to work with LCD and…"
Aug 20
GarageLab posted a blog post

Omote uses light to project virtual makeup and real-time animations on your face

A team of artists and computer graphics designers have created a projection mapping system that you…See More
Aug 19
Jay Curtis is now a member of GarageLab (arduino, electronics, robotics, hacking)
Aug 19
GarageLab posted blog posts
Aug 18

© 2014   Created by Marcelo Rodrigues.

Badges  |  Report an Issue  |  Terms of Service