Questions tagged [servo]

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

115 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
160 views

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....
DSdavidDS's user avatar
3 votes
0 answers
453 views

PCA9685 - Hardware problem with diode?

I'm working on a project, where I need to run several high-torque servos. For that I bought come of these PCA9685 boards. I hooked everything up with my arduino and connected an external 5V - max 3A ...
Ai4l2s's user avatar
  • 161
3 votes
0 answers
315 views

Help to understand multiple PWM working together

I'm very new to arduino related stuff so this question might be really easy to answer. I don't understand how multiple PWM outputs are supposed to work. Look at the pic. In the first(1) case we are ...
user3081123's user avatar
3 votes
1 answer
418 views

Multiple servos noise

I'm building an application that uses 20 servo motors, and i control then with an Arduino Mega. The servos are having some instability, to the point where they make small random swings. Im powering ...
Pedro Nadolny's user avatar
2 votes
0 answers
43 views

I am trying to control 4 servos with a joystick, but after a few seconds, they start spinning and don't stop until the power source is cut

Here's my code. I don't know if the issue is the power source though. I only have access to my computer for a power source. #include <Servo.h> Servo servo1; Servo servo2; Servo servo3; Servo ...
PokemonsterBlue2's user avatar
2 votes
0 answers
106 views

ESP & Servo not communicating well

I have a mystery I was unable to solve and would greatly appreciate it if anyone could shed some light on this. I have a servo DSS-M15S 270 which I managed to run perfectly fine with Arduino Uno (code ...
Shay Lavi's user avatar
2 votes
0 answers
152 views

Simulink resets arduino

I am working on servo motors control through serial communication protocol, I am sending data from Simulink to arduino and vice versa, The problem I am getting is that once I open Simulink Servo ...
HDne's user avatar
  • 21
2 votes
0 answers
80 views

Servo wont work with LED code!

I'm basically trying to combine my servo code and my LED code but whenever I add my servo code the LED refuses to turn on at all. I am super new to arduino sorry if this doesn't make any sense! Servo ...
lilnutss's user avatar
2 votes
0 answers
480 views

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 -- ...
Jirka Justra's user avatar
2 votes
0 answers
369 views

SG 90 servos randomly spinning

I started one project where i need 4 servos to control 4 grabbers jaws. i use STM32F103C8T6 with arduino IDE for programming it. The motor TZT Micro Servo 9g SG 90. First, I was playing with stepper ...
Петар Варга's user avatar
2 votes
1 answer
146 views

feather 32u4 servo

I am attempting a project where I use a feather 32u4 to control a servo. It is controlled using the buttons on an attached oled featherwing to set the servo to 3 different values. The code that was ...
Duke9236's user avatar
2 votes
0 answers
7k views

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 ...
PixelStar's user avatar
2 votes
0 answers
473 views

This is a flood sensor. Moisture sensor and servo working together but it shows different errors

Sometimes the servo moves unnecessarily without moisture sensor giving out any readings. Another problem is that the servo moves very slowly. Is there a way to counter this problem? const int ...
user39307's user avatar
2 votes
0 answers
563 views

Serial Monitor Stops Working

I am using a DIY colour sensor (RGB LED and LDR) and a servo to make a skittles sorter. I am testing out just the colour detection now and printing the RGB values to serial. It worked fine until I ...
Bruno's user avatar
  • 121
2 votes
0 answers
1k views

Servo motor and the servotimer2

I posted this a few days ago Servomotor and music shield and now I moving my servo motor and my musicshield (seeduino musicshield v2.0) together with and Arduino uno, in my other post they told me to ...
Egm's user avatar
  • 65
2 votes
0 answers
166 views

IR sensor not detecting light or dark sufaces

I wrote code for the vibrating motors to vibrate when an IR sensor detects a darker surface. I have 4 vibration motors for corresponding 4 IR sensors. My program is not able to read the values from ...
Rebekah's user avatar
  • 33
2 votes
0 answers
147 views

What kind of control method in my code will allow me to control multiple servos with phase shifts

I am building a quadruped robot, and I need to keep all four legs moving continuously and out of phase with respect to each other to produce a smooth gait and to prevent falling over. I wish to ...
Skipher's user avatar
  • 169
2 votes
0 answers
119 views

How can I call the variable **Servo::write** in Arduino for my 360 servo?

I'm trying to control a Servo with a push button and to help me watching if it is working I am using a LED but I'm not sure if I'm doing it well the Servo::write so I need you to tell me what am I ...
BassMaster's user avatar
2 votes
0 answers
823 views

ATtiny Mapping PPM Inputs to Move Servo Issue

Short Version: Not able to get a servo to move to mapped input from RC remote control PPM signal. Detailed Verison: I am trying to take an input signal from a hobby RC radio (D4RII receiver ppm ...
Brad's user avatar
  • 35
2 votes
0 answers
594 views

Controlling 20 servo motors independently with a single Arduino

I am wondering if I can control 20 different servo motors with only a single Arduino Uno board. My motors must be able to rotate in both directions and I also should be able to define the speed for ...
user avatar
2 votes
0 answers
407 views

Adding a kill switch for servos with states - blink without delay code

I have many LEDs and two servos connected to one Arduino Uno, and the servos are programmed to move randomly indefinitely. However, I would like to install a kill switch for the servos by reading a ...
2plus2is5's user avatar
2 votes
0 answers
36 views

is it possible to code microservo automatically stop when the speed of rotation getting slower?

my group is doing a project which call automatic bed maker. we want to use a servomotor to pull the sheet of the bed. can we possibly make the servomotor stop rotate when the speed of rotation ...
Azim Zakwan's user avatar
2 votes
0 answers
2k views

How to reverse BLDC motor using programming arduino?

I bought ESC from here but it rotates motor in one direction only. Is there any program which will control direction of rotation clockwise or anticlockwise with same wire configuration.
Vivekanand Dhakane's user avatar
2 votes
0 answers
1k views

Unexpected Timer Conflicts (Uno)

I've been working on a project (Arduino Uno: Atmega328) that implements a gyroscope (which is used with the LSM9DS0 spark-fun library) that is communicated with through I2C and uses a Servo library. ...
Sock314's user avatar
  • 153
2 votes
0 answers
2k views

Servotimer2.h is not recognised as a library by arduino uno

I'm doing a project for school with an arduino uno. I want to control a motor using a RF-module as remote control. I need the library Virtualwire.h to use the RF-module and the library Servo.h to ...
loran's user avatar
  • 21
2 votes
0 answers
350 views

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 ...
iBot's user avatar
  • 21
2 votes
0 answers
3k views

Which Timer can I use to control a servo with Arduino Uno

I would like to control 2 motors using Timer2 @ 200Hz. The frequency of the timer is printed in the main loop every second. I'm using an Arduino Uno with two interrupt used for the encoders connected ...
UserK's user avatar
  • 559
2 votes
0 answers
898 views

Motor Shield with 4 DC motors + small servo, which battery is suitable?

I am building my first 4wd vehicle with Adafruit motor shield with one Ultrasonic sensor and one small servo to move sensor. I am facing some problems. Bought 4 motors (2 GM9 and 2 GM3), found the ...
Builder's user avatar
  • 195
2 votes
0 answers
920 views

Using an ultrasonic sensor to act as a potentiometer for a Servo?

I would just like to start off by saying that I am new to Arduino so my code and approach to the wanted outcome are probably not the best. Anyway, I had the idea of using an ultrasonic sensor and my ...
Luke Wood's user avatar
2 votes
0 answers
1k views

Galileo - servo motor moves only in one direction and it doesn't turn back

I have an Intel Galileo (1st gen) and a servo motor (Tower Pro SG90). My problem: my servo moves only in one direction and it doesn't turn back. I want to perform a movement from 0° to 90° and then ...
Kurtis92's user avatar
  • 121
2 votes
0 answers
127 views

Can I use the SVG headers on the SainSmart Uno to drive servos?

I am working with a Sainsmart Uno with SVG header pins. This header is really convenient for hooking a servo to directly, so I have two servos connected to it on D9 and D10 and a 9v battery supplying ...
Brian Genisio's user avatar
1 vote
0 answers
36 views

PCA9685 servo not working

I am working on a project where I want to connect 12 servos together. I got: Arduino Nano Every PCA9685 16-channel, 12-bit PWM/servo shield Power supply 5 V, 10 A I got a PCA9685 16-channel, 12-bit ...
Mario Avila's user avatar
1 vote
1 answer
50 views

6v High Torque Servo Won't Function On Motor Shield?

I have only ever been able to get this servo to “somewhat” work when connected to 5v pin on the shield, the ground on the shield, and the signal line attached to whatever pin. But 5v is not enough and ...
ConnorC's user avatar
  • 11
1 vote
0 answers
79 views

Unable to use RF M4 Receiver with servo motor

I am trying to control a servo motor with the following code: #include <Servo.h> Servo servo; int const inputPin = 3; void setup() { Serial.begin(9600); servo.attach(9); pinMode(...
A P's user avatar
  • 11
1 vote
0 answers
55 views

Simulink Legacy Code Tool - custom Arduino servo write block problem

I'm trying to create my own servo.write block in Simulink for Arduino DUE deployment (and External Mode). Before you ask why if there is one available inside the Simulink Arduino Support Package, ...
Multiplexer's user avatar
1 vote
0 answers
35 views

Problem regarding on HC-SR04 sonar with an additional stepper and SG90 servo motor

I'm making a project based on HC-SR04 ultrasonic sensor with a stepper motor and an SG90 servo motor. I have done some conditions for my stepper motor that is given below. Now I want to include my ...
Toufiq's user avatar
  • 11
1 vote
0 answers
30 views

servos act strangely instead of stopping/starting

I am trying to make it so that my robot rolls straight when pin 8 is high and stop when pin 8 is low, the 2 servos is constant rotation servos. instead the servos spin when the wire touches it pin ...
Nate's user avatar
  • 11
1 vote
0 answers
503 views

Arduino UNO and PCA9685 - Problem with external power supply

I am totally desperate and hope you can help me. I've been building a project for a while where I have to control several servos. For this I bought some MG996R servos and a PCA9685 16-Channel Servo ...
Ai4l2s's user avatar
  • 161
1 vote
0 answers
282 views

Arduino and PCA9685 - Suddenly stopped working

I'm using an Arduino Uno and a PCA9685 board to run 4 servos (of type MG996R). For that, I set up the following connections: SCL -> SCL SDA -> SDA Ground -> GT VCC -> 3.3V As the servos ...
pte's user avatar
  • 11
1 vote
0 answers
79 views

What external battery do I need?

For a school project I need to connect an Arduino with an accelerometer gyroscope sensor and 2 mini servo motors. Of course I need a battery for this. However, I don’t know what battery I need for ...
Jim's user avatar
  • 11
1 vote
0 answers
224 views

Servos "jump to fixed position" at startup when powered by external power supply only, but not by board

My question is about something that is happening ONLY when I use external power supply. When I use the power from the Arduino Mega directly, there is no problem. However, I need to use an external ...
delrocco's user avatar
  • 119
1 vote
0 answers
89 views

1.) How do I delay a servo motor from turning in a loop? 2.) How do I make a servo motor's change in position dependent on temperature?

I'm super new to the c++ programming world (currently taking the class now) and I'm in need of some assistance with some coding that's way beyond my knowledge at the moment. I have to write a code for ...
Erin Trolinger's user avatar
1 vote
0 answers
391 views

How to control multiple servo motors simultaneously using protothreading?

So I'm trying to control 4 servo motors simultaneously using the Protothreads library by Ben Artin, but I am starting with 2 just to see if it works. I have succeeded in getting two LEDs to blink at ...
H. M's user avatar
  • 31
1 vote
0 answers
67 views

ATTINY13A, Servo only makes half a sweep

I have been trying to get a servo to sweep using an attiny13A. And i managed to get the servo to (kindoff) work by the help of a previous thread. But i'm now getting an issue. The servo only goes to ...
Earthbound Ruben's user avatar
1 vote
0 answers
274 views

Using 4x1 MUX to control a servo

I was supposed to first create a 4x1 MUX using AND and NOT gates. The 4 input data lines (io,i1,i2,i3) were 4 PWM pins from the arduino (3,5,6,9), with analogWrite() values as 100,150,200,250 ...
satan 29's user avatar
  • 169
1 vote
0 answers
211 views

How can I control 2 servos separately using a joystick on an ATTiny85?

Prelude I haven't done a lot of work in programming chips. The ATTiny85 is the first chip I've programmed, and I have the hang of the basics I think, but I don't have an in-depth understanding of it's ...
Devin Carpenter's user avatar
1 vote
0 answers
54 views

Hello, help with CODE servo mechanism and DS1307

I am trying to make a auto feeder for birds!, I can't setup my code, the aim is to move servo when the certain time comes, My commend if doesnt work, what else commend can I use? #include <Wire.h&...
matitanix's user avatar
1 vote
1 answer
129 views

Servo starts spinning 360 degrees after a few minutes

I'm using my ESP8266 as a web server to tilt a camera with the servo Tower Pro Micro Servo 9G. #include <Servo.h> #include <ESP8266WiFi.h> const char* ssid = "SSID"; const ...
hornymonkey's user avatar
1 vote
0 answers
60 views

Servo make partial rotation and stop working automatically

I'm using this board in my robotic arm project: Adafruit PCA9685 16-Channel Servo Driver ( https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library) I've connected all of my ...
elp's user avatar
  • 111
1 vote
0 answers
28 views

SG 90 not working

I have tried almost everything but the servo is not moving at all here is my schematics https://create.arduino.cc/projecthub/arcaegecengiz/how-to-use-servo-motors-with-arduino-b02bed Here is my code #...
ali haider's user avatar