Questions tagged [servo]

A servo is a type of motor which uses a feedback mechanism for precise control of speed and position.

A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity and acceleration.

It consists of a suitable motor coupled to a sensor for position feedback. It also requires a relatively sophisticated controller, often a dedicated module designed specifically for use with servomotors.

From Wikipedia

530 questions
8
votes
7 answers

What is commonly done to stop a servo after reaching desired position?

When I started Arduino, I did not expect that everything must be contained in an infinite loop. I thought I could just write something like: motor start -> motor stop. But in actuality, what I get is motor start -> motor stop -> motor start -> ...…
Fraïssé
  • 895
  • 5
  • 13
  • 16
5
votes
0 answers

Why does arduino use a PWM range of 544 to 2400?

I learned in school that typical servos use a simple PWM system to control a servo. To do this, we would generate a 1000ms pulse to put the servo at 0 degrees and 2000ms pulse to set it at 180 degrees. Simple basics, right? I recently tried…
DSdavidDS
  • 51
  • 1
5
votes
5 answers

Is Arduino stable enough to use it for a door lock?

I want to replace my door lock with an one made with an Arduino and a servo, but I'm not sure if the platform is stable enough to use it for something like this. If I do everything right (code, connections, constant power), could I trust in this?
IAmJulianAcosta
  • 163
  • 1
  • 6
3
votes
3 answers

Sweeping servo 90 degrees

#include Servo myservo; // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0; // variable to store the servo position void setup() { myservo.attach(9); // attaches the servo…
hehexd
  • 73
  • 1
  • 1
  • 6
3
votes
3 answers

Why does my Arduino freezes when i turn a servo

I have a Servo Motor and an Arduino Uno. I used the Arduino to run a servo motor. The code was very simple. It was to just Turn it 90 Deg Anti-Clockwise when a switch is pressed and Turn back to its original position (90 Deg Clockwise). The servo…
Bryan
  • 67
  • 7
3
votes
2 answers

Servo Keeps Trying to Turn

I currently have a servo wired to my Arduino and have imported the Servo.h. Here is my sketch: #include Servo s1; Servo s2; void setup() { Serial.begin(9600); s1.attach(8); s2.attach(9); } int pos = 0; void loop() { pos = 0; …
user3376886
  • 103
  • 4
2
votes
0 answers

Servo Issues with Arduino

I am trying to execute the sweep program but all the servo does is go back and forth in one step. When I tried changing the delay, It behaves erratically. Servo Specs: Required Pulse: 3-5 Volt Peak to Peak Square Wave Operating Voltage: 4.8-7.2…
iBot
  • 21
  • 1
2
votes
1 answer

External Power for MicroServo (SG92R)

Why won't my MicroServo run at external 5v power supply? , I've tested my power supply and can light up 1 LED and also run the servo mainly on arduino and it works just fine. Im currently using a computer power supply using the red wire(5v). I'm not…
Exes
  • 31
  • 2
2
votes
3 answers

how to run 2 different servo (continuous rotation and regular servo) in parallel, not run one after other?

I need to control 2 servos in parallel, whereas one is of continuous rotation and another is of regular positioning control (angle) on arduino IDE. I tried but it works one after another, not parallel. How can I do that, please suggest. Thanks.
Emlinux
  • 43
  • 4
2
votes
0 answers

servo acting weirdly

I have bought two original TowerPro MG966R 360 degree continuos rotation Hi-torq digital servos. Expected results : 90 deg -- no rotation 90 - 0 deg -- speeding up to one side 90 - 180 deg -- speeding up to the other side Real results…
2
votes
2 answers

How to determine minimum and maximum angle for cheap servos?

I have some cheap KY66 (seems to be SG90 clone) servos. When I turn them to 0°, the servo tries moving and moving, without actually getting to 0°. I read that they are reaching the endpoint but the built-in potentiometer does give a reading of 0.…
Thomas Weller
  • 983
  • 6
  • 20
2
votes
0 answers

How can I reset servo position?

When I do myServo.write(0) It isn't straight, I want it to be straight but it is at about a 45 degree angle anyone know how to reset the position with arduino to make other positions 0 and making everything relative to where that zero is?
PixelStar
  • 21
  • 1
  • 2
2
votes
1 answer

Why does it say "Servo" does not name a type

#define pingTrig 6 #define pingEcho 7 #include Servo myservo; void setup() { pinMode(pingTrig, OUTPUT); pinMode(pingEcho, INPUT); myservo.attach(9); } void loop() { long duration, inches, cm; digitalWrite(pingTrig,…
Stavro Isho
  • 21
  • 1
  • 1
  • 3
2
votes
1 answer

unexpected primary-expression before ';' token

I'm new to the Arduino world and am working on a sketch to run a servo up and down with a spdt switch. My code is : include #include int pos = 0; Servo myservo; void setup() { pinMode(2, INPUT); pinMode(3, INPUT); …
C Snyder
  • 21
  • 1
2
votes
2 answers

Coding problem (gesture sensor)

Hi I am using an Arduino Mega 2560 with two sparkfun zx gesture sensors, two servos, 4 rgb leds strips and 4 light switches. With the sensor, the code relies on interrupts, which interfere with the bahaviour of the servo and leds. My knowledge of…
w.saulwick
1
2 3 4 5