Questions tagged [servo]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
60 views

Arduino stops working when servo makes a few rotations

The sketch rotates servo back and forth with buttons. When I rotate servo MG 995/996R 2-4 times Arduino stops working. Its voltage step-down transformer switches from ~9V to ~3.7V which is not enough ...
0
votes
1answer
29 views

How can I make a Parallax Servomotor move a water tap correctly and prevent from vibrations?

I am using Arduino Mega 2560 I have built an structure with plastic 3D pieces to move this water tap.: I am using the "Servomotor Parallax Inc 140 mA, 4 6 V" to rotate the tap: Some more images to ...
0
votes
1answer
76 views

Switch Control Between Two Different Techniques

I have implemented PID control of a generator governor to maintain a constant RPM using an Arduino Uno. It works pretty well, but there is a tradeoff between stabilty and response time. Using PID ...
0
votes
2answers
23 views

How to stop program while Servo is rotating

If I code like this: motor.write(0); Serial.println("Before"); motor.write(180); Serial.println("After"); Both "Before" and "After" is instantly printed, while the motor is still rotating. I want "...
0
votes
1answer
37 views

Running a robot with 2 front-facing sensors, but it's stuttering

Here's the run down: I have a small robot with four continuous servo motors and two ultrasonic sensors. It's run by and UNO board with a Sensor Shield V5 on top. My goal is to program the front right ...
0
votes
2answers
66 views

I can't seem to get my code to work? (I'm not a programmer)

EDITED READ DOWNSTAIRS So, I'm trying to make a moisture checker for plants (with some tinkering to go it's supposed to work on 4 different plants) and the idea is that when I push the button it goes ...
0
votes
0answers
12 views

Arduino Mega with Makerfire BLHeli_S ESC strange shaking and shorks

I'm trying to use Arduino to control brushless motors with Makerfire BLHeli_S ESC through Servo library. However, I've encountered the following issue. First, when the Mega board was updating ESC ...
0
votes
0answers
20 views

How to specify pin in Servo library?

Here's what caused the original confusion. As one know, Arduino nano and UNO use analog pin as PWM pins, while Arduino Mega use digital pin output as the PWM pins, which this webpage ignored to ...
0
votes
1answer
34 views

make servo stay at the current position when attach() is called

I use a small SG90 servo with arduino. When I call attach() servo moves to its default position or whatever I set with write() before it. I’d like to make servo stay at the current position when I ...
0
votes
2answers
137 views

Slow speed with stepping motor

I am currently working on a project where i need a stepping motor and a servo running at the same time, the servo turns fine and the speed is ok, but the stepping motors speed is very slow and as a ...
1
vote
1answer
3k views

Why is the loop() stopping?

I would like to move my servo motor (SM-S2309S) between random angles. In order to do so, I used this simple code: #include <Servo.h> Servo servoMain; // Define our Servo // SM-S2309S angular ...
0
votes
1answer
31 views

Servo Program Questions

Hi programming in arduino, I am trying to get a nested for loop inside a for loop with industrial servo which used PUL +- DIR+- (bought motor off amazon). My goal is to get the puls delay to increase....
2
votes
2answers
50 views

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 ...
0
votes
1answer
64 views

servo starts rotating whenever it is plugged

I am making a fish feeder using an Arduino Mega 2560, servo motor SG90 and RTC DS3231. I want to make it rotate twice a day, i.e. morning and 9 o'clock evening. Whenever I plug my Arduino board to ...
1
vote
2answers
353 views

PCA9685: how “unset” PWM signal?

I use my Arduino with Adafruit PCA9685 servo controller. To set PWM signals I use the provided library: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library It allows easily set PMM signal ...
-1
votes
2answers
365 views

Servo can be moved only in steps of couple degree

I have Feetech FS5323M servo, with Sweep example code from Arduino site, it works fine, it rotates from 0 to 180 degree and back as expected. The problem comes when I try to set servo position. I've ...
0
votes
1answer
89 views

Question regarding Servo including Serial monitor display

I tried to make code following your instruction about mills, and it looks like this. Unfortunately, it is not working. Is there problem with my code? Here is my code: #include <LiquidCrystal.h&...
0
votes
0answers
24 views

How to run my servo until an input is recieved?

I am VERY new to this so please excuse any silly questions. I am trying to run an FS90 micro servo in a sweeping motion until I receive a certain value from my Adafruit TCS34725 colour sensor. I ...
2
votes
1answer
25 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
1answer
50 views

Function to control servos

I'm trying to control 6 servos while writing a lean code. I think the function call isn't correctly yet and I think that the variables (pos_n, open_n, servo_1) in the for loop do not get inserted, but ...
0
votes
1answer
25 views

PWM using timer3 for servo control won't generate any output

I'm making a program for a small robot arm controlled by four servos. Problem: I need for PWM outputs, timer1 has three so i need to use timer3 for the last one The main program and the timer1 ...
0
votes
2answers
94 views

Help - Atmega328p, converting a PWM servo code from pin9 to pin6

I found a working code that uses pin9 (PB1) on my Arduino for controlling a Servo, but in my project, an ultrasonic sensor is already using that pin/timer. I want to convert the code to use pin6 (PD6),...
-1
votes
1answer
75 views

How to manage button state

Extreme Newbie here ...I am using an Arduino Uno and a PCA9685 16 Ch. Driver board to control servos using a push button and LED feedback. When I pust the button, the servo move but when I release ...
0
votes
0answers
22 views

FlexiTimer giving errors in servo motion

I am working on a quadruped bot, spiderbot and I am trying to make a creep gait using Forward kinematics however, for some reason my code stops working after the execution of the line - [pwm.setPWM(...
2
votes
1answer
722 views

Powering Multiple Servos From One Battery- What is my circuit missing?

I'm working on a robotics project right now and my limited DIYer knowledge of electrical circuits is failing me. I need to power 7 Rage Standard Metal Gear Servos (RGRS104-16-6vm) and 4 RadioShack ...
-1
votes
1answer
173 views

How to control RC power switch with Arduino-/Adafruit-Board?

I want to control (switch on/off) a solenoid valve via an RC power switch and an Adafruit M0 Feather Bluefruit LE. The RC power switch is this one, and this is the Adafruit Board Pinout. My ...
0
votes
1answer
40 views

arduino uno freezes

Is there a reason why my Arduino Uno freezes after a few minutes of running with power coming from a usb cable connected to my pc? #include <GY6050.h> #include <Wire.h> #include <...
0
votes
1answer
455 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
3answers
6k views

Smooth servo control library

Is anyone aware of an Arduino library for smoothly controlling a servo? I have an especially fast servo, which is trivial to control using Arduino's built-in Servo library. However, the library doesn'...
0
votes
0answers
29 views

Servo MG996R - what is the maximum load for very long time?

I am working on a device which will have to periodically switch positions and keep the position for very long time, as accurate as possible, under tension. Never worked with servo motors before, but ...
-4
votes
1answer
36 views

expected '}' at end of input

hi i am getting this error, im guessing i have a bracket missing or one in the wrong place. any help is appreciate, still new at this. thank you (code bellow) #include <Wire.h> #include <...
1
vote
2answers
322 views

RFID stops working when I place the servo

I've successfully implemented Door Unlock system described in this tutorial. At first I used Arduino Uno and RFID RC522 Reader and MG90S Micro servo. When I used Arduino Uno with Arduino Pro Micro ...
-1
votes
1answer
545 views

How to change speed of multiple servos acting at the same time with PCA9685 module?

I'm using the PCA9685 module with its Adafruit library. In my code I have one object of the servodriver class that has 14 channels (controlling 14 servos basically). void Positioning(){ ServoDriver....
0
votes
1answer
1k views

Controlling a servo motor with a touch sensor

I want to modify my code to move a servo motor only for the duration of time that the sensor is touched and stop moving immediately when the sensor is no longer touched. The code I have moves the ...
0
votes
1answer
41 views

Continuous servo speed control with Arduino Uno controller and servo shield

It is very simple device, 2 continuous servos FS5113R, rotates continuously in one direction. Here is device original content, which is this servo shield it looks like russian, and here is library, I ...
0
votes
1answer
693 views

360 degree motion of servo with position control

Is there any way I can control the position of servo by changing the value of potentiometer for using it for 360 deg motion?
0
votes
1answer
624 views

Can't move servo with my Nano

I'm new to this kind of thing. My code works on my Uno without problem with two separate servos. I've ensured that it's not any faulty leads, having tried a few other circuits with LEDs, buttons and ...
0
votes
1answer
304 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 ...
0
votes
0answers
22 views

press button: servo move - hold X time - move back issue

Besides being a total noob I've been lurking and reading like mad over the last week to understand how to get my servo to move to X position when a button is pushed, have it wait Y time, and return to ...
3
votes
1answer
184 views

Useless box wiring and code

just want to give a back story first. So i saw this video on youtube about the useless box, and i thought that it would make a great gift for my 7 year old. So i went out and bought everything that ...
0
votes
0answers
30 views

How would i add PID control to this servo motor control program. potentiometer

I have installed an AutoPID library (by ryan downing version 1.0.3) to my arduino IDE, but im not sure which parts i will have remove to get the PID to control the servo angle. Thanks for the reply, ...
0
votes
0answers
24 views

Trying to get a servo motor to move to certain setpoints when a control potentiometer shows certain values

Here's my Code so far: void setup() { Serial.begin(9600); } void loop() { float a; float angle; int setpoint; a = analogRead(A1); angle = map(a, 0, 1023, 0, 180); if ( (angle>0) &...
-1
votes
1answer
154 views

Servo delay problems

So I had a test last week with the Arduino Uno starter kit. We got a task including the servo. I had to get the servo to go from 0 to 90 degrees and it was supposed to use 4 seconds to do so. Than ...
0
votes
2answers
26 views

multiple invdividual servo controll arduino

I want to declare 11 servo motors in my code. Is there a better way to do that than just declare everyone under each other. The reason is that i have a code that will set the rotation for one at a ...
0
votes
0answers
29 views

How to control servos on Arduino through Raspberry Pi

I have a couple of servos connected to an Arduino board, which is in turn connected to a Raspberry Pi (4) using an ethernet cable. Just wondering, in what ways can I control the servos on Raspian. ...
0
votes
1answer
28 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
2answers
168 views

Position Feedback for Stepper Motor

I want to rotate a gearwheel with a stepper motor. While Arduino is on everything is well. My gearwheel transfer its power to a gear worm. The worm will go 10th cm and back repeatedly. When I cut the ...
0
votes
0answers
53 views

Arduino cat feeder

My cat feeder works like that: LCD shows real time clock Press a push button LCD shows you to put the feeding time You put the feeding time through a matricial keyboard When feeding time is reached, ...
0
votes
2answers
57 views

Servo Motor in function

I have a project with 9 servo, I want to make a function to control each separate. Only that he is not accepting the servo as a parameter. Can someone tell me if it is possible to pass the servant as ...
0
votes
0answers
28 views

Controlling servo with L298N

I am entering a robot contest, and my bot requires 3 motors and 1 servo. I know I can control the motors with 2 L298N boards, and have an extra spot for a motor with the second board. I was wondering ...

1 2 3 4 5 9