Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [servo]

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

0
votes
1answer
27 views

Attach() resets servo's angle

I'm working on code that will control micro servo. I use generic servo and built-in library for controling servo. Microcontroller is generic STM32. Controlling servo Works as expected. But I don't ...
0
votes
1answer
31 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 ...
1
vote
1answer
58 views

How to execute operation once till a condition then restart it from start [closed]

I am making a project using IR sensor,servomotor and Push button. I am not able write code for the logic as stated: it will execute the operation when it reads the digital value of IR high and rotates ...
1
vote
1answer
48 views

Hold button / press button/ push button

I want to control a servo motor in a way that if you push the button, you can control it by potentiometer a if you push double time, you can control servo with infrared if you hold button step ...
0
votes
0answers
21 views

Servo doesn't move with fingerprint

I've a project which i need to make a door open and close using the fingerprint. I've successfully made fingerprint works just fine it reads and confirm the fingerprints stored in it but the servo ...
0
votes
1answer
29 views

Servo Motors PWM pins, Arduino Uno

I wanted to understand how people are connecting a servo motor to pins without PWM, so I went searching and I read that the Servo library uses the timer1 of pin 9 and pin 10 to be able to use other ...
0
votes
0answers
14 views

Will this power supply work with a MG-996R Servo?

I'm trying to power a tower MG-996R servo with this universal AC power adapter for an arduino uno project. The adapter can output: 3V/4.5V/5V/6V/7.5V/9V/12V.Output current:1.2A, also has a USB port:5V ...
0
votes
1answer
28 views

Code causing Servo motor not to work!

My sketch is compiling and loading, but when the program runs, the Servo motor does not work. The buttons work, the LED light works, Piezo buzzer plays the melody, the Stepper motor works but not ...
0
votes
2answers
18 views

Servo starts to shake when I added SIM900.begin(19200);

Hello I'm working on this mini project. This project works this way, Whenever someone type wrong password, LCD will display "Access Denied" and send an alert to sms using GSM module. I used 2 ...
0
votes
0answers
14 views

Cannot access a servo library with my program

As I tried an new exercise, I came to an other problem. although I put an include in my system (#include ), the program will not acknowledge (Servo myservo); and again a problem? Any help?
0
votes
1answer
36 views

Trying to power multiple servos at once using a Arduino Mega

Recently I have been trying to do a project for my end of year project, it involved making a humanoid arm. I am still a newbie at these things, I usually have my friend do the wiring, but since he ...
4
votes
4answers
155 views

How do I make a Servo Stop if it Hits Resistance?

I am trying to make a device which will turn a turn key with a servo. However, I want it to stop turning the turn key if the resistance is too great (meaning it is locked and will not ever turn). ...
0
votes
0answers
25 views

Question about controlling servos with PWM while being able to accurately read the current from a sensor

Hi I am hoping to design a custom board ATMEGA32u4 with practically a Arduino leonardo bootloader. I plan to control up to 12 servos while being able to read back the current sensor voltage of an ...
0
votes
1answer
40 views

Newbie question: Set servo at certain degrees when something happens

I am trying to set my servo at f.e. 90 degrees when the friendlyValue of the soil sensor is < 50%. The servo isn't moving at all, is it because the code is running too fast and the servo doesn't ...
0
votes
1answer
26 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 ...
0
votes
3answers
55 views

NEED Help With Servo motor

I have just bought a MG90s tower pro servo for my school project and there is a problem. As soon as I connect my servo to the cnc shield or directly arduino, the whole arduino board turns off. I ...
0
votes
3answers
67 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 ...
0
votes
0answers
50 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 ...
0
votes
1answer
155 views

How to use map function

if(pin10==HIGH) val=analog.read (potpin); val=map(val,0,1023,0,180); servowrite(val); else val=map(0,1023,0,90); ...
0
votes
1answer
32 views

Intermittent jittering servo

I'm controlling a Hitech HS-625MG servo from a 10k slider via a Nano. For a while the motion tracks the slider position even when moved quickly. Then, for no reason I can find, it will stop following ...
0
votes
1answer
32 views

ATMEGA 328P Standalone on 3.3v controlling a servo

I'd like to use an ATMEGA 328P on standalone mode powered by a 3.3V supply source to control a servo (which is powered by 4 AA batteries, resulting in 6V). My question is: do I have to convert the PWM ...
1
vote
2answers
138 views

Can't drive servo

I purchased a 20KG Digital Servo, DS3218MG with a Control Angle of 270° . I am trying to get it to rotate with the following code: #include <Servo.h> Servo myservo; // create servo object to ...
0
votes
1answer
44 views

The servo sweep library code - “delay” versus “in steps of”

This is a pretty basic question - essentially I want to know the difference between adjusting the basic sweep code (from the library) in terms of the "delay" instruction and the "pos += 1" (in steps ...
-1
votes
1answer
103 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
103 views

Does SoftwareSerial and the servo library produce interrupt conflicts?

I'm planning a project that will involve multiple serial ports and the Arduino servo library. I have heard that this may cause interrupt conflicts. Are there any simple solutions to this
0
votes
2answers
279 views

Connecting an Arduino to a servo with an external power supply

I have purchased an MG995 servo (4.8-7.2V operating voltage, 170MA no load operating current draw) and will power this using a 5V, 2A mains plug pack. Do I need a breadboard to connect this with my ...
0
votes
2answers
34 views

Connecting a servo motor to an Arduino

I currently have a push solenoid connected to my standard Arduino board. The Arduino is powered via its USB cable, while the solenoid is powered using a 12V Huawei adapter (in conjunction with a ...
0
votes
1answer
126 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
283 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
35 views

Servo going up to the limit as soon as attached

I have a Futaba S148 servo (https://servodatabase.com/servo/futaba/s148) connected to an Arduino Uno. As soon as the script attaches the servo, it rotates to its limit and gets stuck. I've tried ...
0
votes
1answer
57 views

Question regarding Servo including Serial monitor display

I tried to make code following your instruction about millis, 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
1answer
286 views

PCA9685 servo shield not working

Im working on a project where I want to connect 32 servos together. I got: -Arduino uno -2 PCA9685 16-Channel 12-bit PWM/Servo Shield -power supply 5v 10 A -All wiring is to the right pins (I have ...
1
vote
1answer
126 views

Flickering LED when servo moves

I just got to play around with Arduino lately so I'm really new on this stuff and sorry for the grammar error. I got a work where I need to turn the LED on all the time, my plan is to add a slow fade ...
0
votes
1answer
56 views

Making simple on/off IR servo movement.

I'm new to Arduinos and programming. I'm getting into a project and one of my tasks was to learn how to incorporate servos into Arduino and learn about sensors. I wanted to combine both, but I'm ...
0
votes
1answer
55 views

How to connect Mg995 and arduino nano since nano can only output 40mA at max?

Datasheet for Mg995 shows: Current draw at idle 10MA No load operating current draw 170MA Stall current draw 1200MA Maximum current that an arduino nano can output is 40mA. So, what ...
0
votes
4answers
110 views

How to repeat the code

I want to make my biped robot keep walking, but it only move for twice, this biped robot project is important for my Capstone project. The code below is the code that I used #include <Servo.h> ...
0
votes
1answer
36 views

Rc car which returns to middle when left or right button is not pressed

Hi i am currently working on a school project , my only problem is that i want my RC car to return to middle direction (which i have set to 66 in the servo motor) when the left or right button is not ...
0
votes
2answers
98 views

How to move Servo in between three positions

I want my tower pro 9g servo to start from pos=0, wait there for 1 second, then reach pos=90 wait for 1 second, then reach pos=180 and wait for 1 second. Now it goes back to pos=0 and repeats this ...
0
votes
0answers
117 views

Servo.h and ServoTimer2.h difference

So i'm trying to code a servo motor to turn left when a button is pressed and turn right if another button is pressed i already have a code for it on the servo.h library but it has a problem with the ...
1
vote
1answer
376 views

Rc car controller using the RC-switch library

simulate this circuit – Schematic created using CircuitLab (Newbie in arduino) Hi so i have a project which involves creating an rc car which uses the 433Mhz rf module and an arduino nano with ...
0
votes
2answers
108 views

Do I need an external power supply for the SG90 micro servo?

I have a Uno R3 and although I can add an external power supply for the SG90 micro servo it would make the project more complicated. Can I power the servo using the 5v pin of the Uno R3? I measured ...
1
vote
2answers
58 views

Writing to serial LCD seems to interfere with servos

I have an OBD-based Arduino project (OBD adapter link below) which uses two servos and a serial LCD from Sparkfun (link below). My problem: writing to the LCD seems to interfere with the servos. ...
1
vote
4answers
702 views

9x servo on Arduino Nano?

I saw this project with multiple servos: In Servo We Trust! Let's control 135 servos with a single Arduino! I wanted to miniaturize this project. BUT instead of triangles i will use SQUARES. :EDIT: ...
0
votes
0answers
149 views

Is it possible to attach more than two Servos to an Adafruit V2 Motor Shield?

The Adafruit Motor Shield V2 allows two servos to be attached to 3-pronged headers. While the screw-in block terminals enable the use of 4 DC Hobby Motors or 2 Steppers, which are powered by an ...
1
vote
1answer
545 views

Controlling motors and servo with L298N

I'm using an L298N to control the two motors of a robot car, and I also have a servo controlling the HC-SR04. The motors and sensor work fine together, and the servo and sensor work fine together. But ...
2
votes
1answer
84 views

Servos not working properly with joystick

So, I was working with a project in which I used a joystick module to control two servos at the same time. The joystick controls the servos in a way that when the joystick is moved along x-axis, both ...
0
votes
1answer
86 views

Make system with ultrasonic sensor and servo

I want to create a system where the servo will make the ultrasonic sensor move and detect the area in front of it. I have made the program but when run the ultrasonic sensor can not detect as usual. ...
0
votes
2answers
217 views

How can I power a servo and Arduino from the same power supply?

I have an ESP8266 NodeMCU which I'm using for an automatic blinds project. The NodeMCU struggles to power the servo on its own, so at the moment I am using a 5 V supply for the servo and a USB ...
0
votes
0answers
34 views

How to achieve smooth motion for my servo motor? [duplicate]

I'm trying to control the MG995 servo motor with an Arduino Uno, but the motion achieved by the motor is kind of erratic. The servo motor is externally powered from a 2200mAh 7.4V 30C LiPo battery ...
0
votes
0answers
56 views

Servo Motors Fidgeting [via potentiometers, sent thru Bluetooth]

I need help :( I have this robotic arm project and I am using standard potentiometers attached to a "controller assembly" to detect the movement of the human arm. I have monitored the values of my ...