Stack Exchange Network

Stack Exchange network consists of 174 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
26 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
88 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
10 views

Servomotor movement in random order [on hold]

I would like to turn to you with the help of a simple program, with arduino Im real beginner in arduino. I'm doing a bot from servomotors that are activated by a PIR sensor for my school project. But ...
0
votes
0answers
21 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
37 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
20 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
2answers
42 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
2answers
26 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
31 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
110 views

How to use map function

I want to know how to give if else statement in servo knob example. I want to control one servo motor, with one pot with various max angle, with respect to if else condition. I had try if(pin10==...
0
votes
1answer
29 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
19 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
votes
0answers
23 views

Motor keeps rotating (motor with ultrasonic sensor)

Why does my motor keep rotating with different speeds only? The idea is to make the motor move between 0 and 90 degrees only when the ultrasonic detect distance is 10 or less, but it keeps rotation ...
1
vote
2answers
63 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 ...
-1
votes
0answers
30 views

Controlling servo with RFID and force sensor

I'm doing my project which to open seat with RFID then force sensor activate. Then if force sensor is detected the seat will close but if not the seat if stay open. I'm using servo motor. I cannot ...
-1
votes
0answers
33 views

LDR with Arduino

I wish to know if it was somehow possible to stimulate a servo based on the count of times the LDR sensed a value below 500 within a time period of some seconds and the count resets after each ...
0
votes
1answer
23 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
56 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
53 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
92 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
31 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
55 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
96 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
52 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
144 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 ...
0
votes
0answers
23 views

How do I change a continuous servo speed based on the bend of a flex sensor?

The following code just has my servos running all the time nonstop. I want it to stay still until I enter 0 in the serial monitor at which point a program begins that, among other (here irrelevant) ...
-1
votes
0answers
35 views

Moving two servos from one accelerometer

I'm trying to make two servos move independently based on the angle of an accelorometer (One servo for X axis and one for Y axis) I'm fairly new to arduino and I'm not completely sure of the purpose ...
1
vote
1answer
67 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
30 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
26 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
70 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
30 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
68 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
81 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
244 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
1answer
63 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
45 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
324 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
118 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
293 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
59 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
59 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
156 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
31 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
43 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 ...
0
votes
1answer
215 views

How to achieve smooth motion with a servo motor?

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

Servo doesn't work in 'for' loop running under 'if' loop

This is my first StackExchange question. I'm relatively new to Arduino and I am trying to tinker with the components and functionality. I have a RGB LED coupled to my breadboard with a servo ...
-1
votes
1answer
659 views

How to make my servo slow down in it´s movement

I want to make my servo react on the data that my light sensor tells him by the amount of light that it is catching. I want the servo to go fast to the left when there is shadow/darkness and then I ...
0
votes
2answers
52 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),...