Questions tagged [servo]
A servo is a type of motor which uses a feedback mechanism for precise control of speed and position.
520
questions
0
votes
1
answer
29
views
I'm trying to control 12 servo SG90 with an arduino UNO [closed]
I'm trying to control 12 servo SG90 with an arduino UNO to make a 4 legged arthropod robot, I intend to power it with 4 AAA batteries, which would give me 6V, but i think the amperage might be too low....
0
votes
0
answers
42
views
Servos keep failing after some time
so, I keep having trouble with figuring out my servos.
I'm trying to do a project with 8 Servos pressing buttons in a certain sequence in a loop.
Servos are small metal gear ones off of amazon around ...
2
votes
1
answer
112
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 ...
0
votes
1
answer
107
views
Possible to have different torque levels on MG966R servo with Rotary Potentiometer?
I want to apologise first and foremost, and say that I am very new to Arduinos!
I wanted to control the torque on a MG966R servo so that I can separate it into 4 different torque levels. I read that ...
0
votes
1
answer
658
views
Sending servo position data from one Arduino to another
I'm trying to take the position data generated from this servo sweep, and send over serial to another Arduino. The position data is stored as pos in the code I included, what would be the best method ...
0
votes
2
answers
106
views
How to determine the minimum time for a servo to reach its destination?
We all know servos don't move instantly, which is why it is common to put a delay or a millis() loop whenever you issue a servo.write() command to give it time to reach its target before moving on to ...
1
vote
1
answer
65
views
Pca9685 & WS2818B, 1 Nano
Arduino n00b here. I currently have an Arduino Nano set up to run 6 servos from a PCA9685 board. I'm looking to add 6 switches and 6 LED indicators to switch servo positions. What I'm curious about is ...
-1
votes
1
answer
175
views
Controlling a servo without the servo library
I am trying to control a servo without the "Servo.h" library.I am sending using analogWrite() some values to the servo.I know the servo takes input a continuous time signal however I dont ...
0
votes
1
answer
87
views
Servos jitter when powered by power module
I need 48 sg90 servos to move to a specific position each minute. Now I am using two arduino mega boards to power everything through 6 bread boards but it seems I need more power because some servos ...
2
votes
0
answers
34
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 ...
1
vote
0
answers
555
views
Servo motor rotates back to 0 after reaching destination
I am using a XMG-996R servo motor. It is controlled by and Arduino Uno board. The problem is when I tell it to go to a certain angle, it will rotate to the desired position but then return to 0. The ...
3
votes
2
answers
16k
views
Sweeping servo 90 degrees
#include <Servo.h>
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 ...
1
vote
1
answer
616
views
Random Servo Movement with Arduino Uno
Recently, I have been working on a project involving 8 Tower Pro sg90 servos and an Arduino Uno. The issue I am running into is that the servos will randomly move when connected, without even ...
1
vote
0
answers
67
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(...
-1
votes
2
answers
57
views
How do I control the rotation of my servo? [duplicate]
#include <Servo.h> // servo library
Servo servo;
int trigPin = 5;
int echoPin = 6;
int servoPin = 7;
int led= 10;
long duration, dist, average;
long aver[3]; //array for average
...
1
vote
1
answer
143
views
Servo keeps rotating
I use a 360° servo with a program I made on an Arduino Uno.
The program was meant to control two separate servos with two potentiometers on a breadboard.
When I used 180° and 90° servos, it worked ...
0
votes
1
answer
172
views
Smart Servo Shield: How to upload code to AtMega8
I recently bought a Smart Servo Shield controller from DFrobot to use with my new AX-12A Dynamixel servos. The shield is attached to an Arduino Uno. The shield itself works fine, but it does not ...
0
votes
1
answer
424
views
No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)
This was supposed to be the code for automatic pet feeder
Got it from here1
The problem is that I always got a "No matching function for call to'DS3231 (const uint8_t &, const uint8_t &)&...
0
votes
3
answers
81
views
Voltage drop when power from AA batteries
I am using a Arduino MKR 1010 Wifi board to control 4 servo (PS-1109MG). All the circuit is powered by 4 AA rechargeable batteries (1.2V * 4). Arduino is powered through the Vin port.
Below is a ...
-1
votes
1
answer
150
views
How to correctly set PWM to control servo angle in AVR?
I've stumbled upon timer configuration to handle my sg-90 servo and my Arduino UNO.
What I did:
Set the prescaler to 64 and mode to fast PWM of 16-bit timer.
The frequency is 50hz so the ICR1 is set ...
-1
votes
1
answer
218
views
Arduino bluetooth HC-05 servo control
I am using HC-05 Bluetooth module to control two servos. I use Bluetooth terminal in my android phone to control them.
Problem is that myServo1 is moving like I want but I can't control myServo2. ...
-1
votes
1
answer
36
views
Servo retaining its position every time I send some value
I wanted to control my servo with a Bluetooth module.
I gave certain values for rotating it. When I press those values the servo rotates, but then retains its original position and the PC also makes ...
4
votes
2
answers
2k
views
How to move a servo quickly and without delay function
Im trying to move a servo from one place to another while using the typical for loop you find in the servo's library example:
int lightON = 180;
int lightOFF = 90;
for (pos1 = lightOFF; pos1 <= ...
-1
votes
1
answer
49
views
How to control 1 servo with 2 potentiometer?
I have been building a RC plane completely from scratch using an arduino but I am fairly new to this.
Essentially I have been able to make my two arduinos communicate with each other so that when one ...
1
vote
3
answers
172
views
LM7805 gets very hot with four servo motors
I'm making a robotic arm using three SG90s and one Futaba s3003 servo motors and an ESP32 dev_kit_V4.
The problem is when I am controlling the arm, the voltage regulator gets so hot that I can't touch ...
1
vote
2
answers
142
views
Two servos for robot (head & chest) movement at different speeds at once
I have an Arduino Uno and two Hi-tec servos (HS-40 & 5055 digital) that I'm using for a basic robot build. I'm trying to have one servo(HS-40) turn the head back and forth (left to right) slightly ...
-1
votes
1
answer
660
views
Wemos mini pro switch power from servo with mosfet bs170
I got a servo connected to a wemos/arduino with a capacitor(470uf). Before I didn`t use a cap.
Now with the cap the device use to much power while sleeping(capacitor on the servo). I want to switch ...
2
votes
1
answer
121
views
Code is not running, servo does not even spin
I am trying to run a program which works as follows:
An LDR is integrated in a box. A block is placed on top. This box can be rotated by a servo. The program is supposed to make the box turn until the ...
2
votes
2
answers
500
views
Can't stop SG90 spinning
I have a SG90. I just want it to spin 360° and stop, that's about it. This seems impossible.
I have tried the sweep example:
by BARRAGAN <http://barraganstudio.com>
This example code is in the ...
0
votes
1
answer
108
views
Servo not moving with PIR motion sensor
I am working on this code to turn a servo when the PIR motion sensor detects no motion, but it is not working.
Some symptoms include:
Servo is turning extremely slowly
PIR is not turning the servo
...
-1
votes
1
answer
157
views
Using Arduino to allow continuous servo to go in the opposite direction
For my project I am using 6 continuous servos connected to an Adafruit Servo Shield. To run them I use
pwm.setPWM(0, 0, 1000)
and then set a delay to run them for how long i’d like to, then run
pwm....
0
votes
6
answers
3k
views
Using MCP23017 to control Servos
Using Servo.h it is possible to run a servo from just about any pin.....obviously the more pins the more servos...hence the question
" how can I do this with a MCP23017 ? ".
I have searched the web a ...
1
vote
1
answer
197
views
How to make motors start when pressing a button, and then go through a cycle with a specific motor order?
I'm very new to arduino and have to work on a project for school. We have connected 3 motors (Servo, Stepper (180 degrees) and a DC motor) to an Arduino Uno, Adafruit motorshield and a pcb. With the ...
1
vote
1
answer
74
views
Why does my delay get inaccurate after one minute ? It makes my servo vibrate
I have a fancy setup to cool my beer at a controlled temperature (you can find details and a photo here if you want). The input of my system is a temperature, the output is a servo position.
Long ...
2
votes
1
answer
363
views
Wanted to control 2 servos with serial read [closed]
I want to use 2nd servo only when 1st is in up state by asking user whether he wants to fire or not.(code in bold is not working )
#include <Servo.h>
Servo myservo;
Servo trigervo;
...
-2
votes
2
answers
110
views
Emulate Joystick
I am trying to automate a existing system that uses Joystick as its input to move the Motors in x&y directions. I actually want to emulate arduino to exactly do what the joystick is doing by just ...
1
vote
0
answers
46
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, ...
0
votes
1
answer
109
views
external power supply for servo motor attached to redboard arduino
I'm new to this page but I was hoping to get some advice on a servo motor arduino project I'm currently working on.
I have a HS-815BB servo motor (4.8~6V, max stall current draw 6,000mA) and a Spark ...
3
votes
1
answer
73
views
Simulating a button press using the Serial Monitor to run a Servo
I'm kind of new to Arduino and C, and I was having trouble with this sketch. I'm working on a project to control 6 servos using virtual buttons. When I hold down the button, the servo moves forward ...
1
vote
1
answer
208
views
Servo keeps resetting position when there is no difference in received value?
So I'm working on a code that basically receives x and y coordinates and stores them in a variable. Whenever a coordinate is received, it goes through a conditional statement to store them in a ...
2
votes
1
answer
74
views
How to combine servo shield with peristaltic pump?
I am creating a project where I need 16+ (possibly up to 20) servos to open/close liquid flow through tubing, which in turn will be controlled by a peristaltic liquid pump (https://www.adafruit.com/...
-3
votes
2
answers
68
views
I need to run 2 for() loops simultaneously but I cant seem to do it without one executing, then the other after it [closed]
I'm controlling 2 servo motors but would like to adjust their variables separately, specifically their upper and lower values, and their speeds. This code is one that I had found online then ...
1
vote
4
answers
5k
views
Why a servo doesn`t move to angles properly
I've got to do a project which uses a servo to drive a turntable.
How much I adjusted the angle, the servo seemed to shift every time it spinned. For instance, the 0 degree angle was getting a bit ...
-1
votes
1
answer
123
views
atTiny85 5V and servo usage
I have an AtTiny85 that I would like to move a servo on I/O "4" for this project.
I can't seem to get it to work, no matter what I do. I had tons of issues getting it to program, but I've ...
1
vote
1
answer
52
views
Mixed SHARP IR Sensor Readings
I'm using the GP2Y0A21YK Sharp IR Sensor in a ball and beam system where I'm trying to balance the ball in the center of the beam using the IR Sensor as a distance locator and a servo motor to tilt ...
1
vote
0
answers
31
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 ...
3
votes
2
answers
162
views
How to move a servo with a function
Im currently moving a servo from one side to another by using the typical for loop like this:
int lightON = 180;
int lightOFF = 90;
if (buttonState == HIGH) {
digitalWrite(LED, HIGH);
for (pos1 =...
0
votes
2
answers
761
views
Trouble understanding min and max parameters for the Servo motor
This picture is from arduino.cc . Could someone please help me understand these parameters min and max? I was using TinkerCad taking input for the angle using a potentiometer (having mapped correctly ...
-1
votes
3
answers
1k
views
Programming Servo How To Get -90 Degrees
as the question title states, how will I go about turning the servo opposite of 90 degrees?
I have written my code as such;
// Turn servo to the right
if(x > 520 && y < 510 &&...
1
vote
1
answer
102
views
Brushless Motor "twitches" on its own when connected to battery
I've been trying to make a Bluetooth slider app that can control the spin speed of a brushless motor. The transmitter I am using is Arduino Mega. The problem I'm having is that my motor will start ...