Questions tagged [servo]

A servo is a motor, commonly used in robotics projects. This tag is for questions about the servo motor when using it in robotics and other projects.

65 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
230 views

Is it possible to control servos in both directions on the RPi?

I have been working on controlling servos in one direction with PWM control via GPIO ports on my RPi 3. I've worked with motor controllers that use PWM before and it seems that I should be able to ...
frc_contributor's user avatar
2 votes
1 answer
758 views

PCA9685 Raspberry pi4B i2c errors

I am trying to get a raspberry pi 4 model B working with across IC2 to a PCA9685 servo motor controller board. I have followed various tutorials e.g: PCA9685 Tutorial Using the libraray : ...
Jamie Nicholl-Shelley's user avatar
2 votes
0 answers
44 views

pwmWrite() dosen't run

else if(strcmp(hyp,"MEDIUM") == 0) { system("espeak 'medium'"); printf("%s\n", hyp); digitalWrite(LIGHT1, HIGH); pwmWrite (PWM_pin1, 524) ; } i try to control ...
Karinaindrw's user avatar
2 votes
0 answers
371 views

Multiple servo motors with serial commands

I am trying to control multiple servo motors with a Raspberry Pi. I am using a USB to TTL cable for this. I am currently sending following serial commands for the movement. --> gpio -g mode 18 pwm --...
onedev's user avatar
  • 21
2 votes
0 answers
539 views

Servo Not Responding to Input Signal

I have a Raspberry Pi 3 (Model B). I'm trying to drive a servo motor (Tower Pro MG 995). I am using a 6V power supply (4 AA batteries) connected to power and ground of the servo motor. I attach the ...
Travis Vaught's user avatar
2 votes
0 answers
2k views

Raspberrypi and PCA9685 no bus detected

I'm trying to follow an adafruit servos tutorial to control servo motor from my raspberrypi. My PCA9685 seems on (the green led is power up) and i attached two servos to it. I cabled as in the ...
Lumy's user avatar
  • 121
2 votes
0 answers
560 views

How to connect a servo feedback potentiometer?

I've taken apart an old RC car and have been trying to get my Raspberry Pi to run the car. At this point, I'm able to control the rear drive motor. The motor is connected to a L298N H-Bridge module. ...
Ronald Wichhart's user avatar
2 votes
0 answers
662 views

Getting current servo angle with GPIO

Without using Occidentalis (which might not even work that way), is there any way to get the current angle of a servo? I know it has a potentiometer, I just have no idea how to go about getting that ...
alwade24's user avatar
1 vote
1 answer
158 views

controlling a continuous servo in both directions

I'm using a Fitec FS90R continuous servo with my Raspberry Pi Zero, and trying to make it turn slowly in either direction (it's controlling a small turntable with a display on it). My test script is ...
Lenny's user avatar
  • 11
1 vote
0 answers
46 views

Issue a custom command using pitunnel

I have a Pi 4 at home, which is wired in to some servos which, via a python script, make hands turn on a clock face, making them point to 'home', 'work', 'school' etc - I think you can see what this ...
dartacus's user avatar
  • 111
1 vote
1 answer
102 views

ServoMotor I2C module

I want to control a ServoMotor with THIS module: I asked a question before in THIS topic. And as you can see in the topic, they guided me perfectly. And they said I should use THIS code. But I have a ...
Reza Gholipour's user avatar
1 vote
0 answers
301 views

MG996R jittering

I'm working on a project of a camera connected to a robotic arm that moves when my face is about to get out of the frame. I'm using 3 Tower Pro MG996R servos and they are connected to my raspberry pi. ...
amit's user avatar
  • 11
1 vote
0 answers
185 views

How to power PCA9685

I am using the RP 4B and am trying to control a servo with the PCA9685. Unfortunatelly I am very new to all that and therefore I don't know which specific components I need to power it up. I bought a ...
Infomagier's user avatar
1 vote
0 answers
429 views

Powering a Servo with 12V Battery and Buck Converter

I wanna power my servo with the 12V terminal of a Mastercraft Nautilus battery pack (see here)(long story). The servo is a actuonix pq-12 micro linear servo (see here). I'm stepping the voltage down ...
gumby4231's user avatar
1 vote
0 answers
250 views

When i change the dutycycle on my PWM it doesnt move my servo

I am using an SG90 and the GPIO Pin #17 but it only sometimes turns when I run the code. It always works if I reset the Kernel everytime. I am connected to my Pi through putty and am running the code ...
whydoesntitwork's user avatar
1 vote
0 answers
78 views

Why my servo always blocks?

I try to control a servo with my Pi. Here is the python code I use : # Import libraries import RPi.GPIO as GPIO import time # Set GPIO numbering mode GPIO....
Rémy's user avatar
  • 111
1 vote
0 answers
703 views

Rpi python with a PCA9685 PWM controller stopping a digital servo motor problem

I have several servos plugged into a PCA9685 board and controlling them with PCA9685.py, and at the end of the script at pwm.cancel() my SF3218MG (270 degree) and 6221MG (180 degree) servos turn off ...
pinkie pAI's user avatar
1 vote
0 answers
114 views

pigpio servo, stop command not reliable

import pigpio import math import RPi.GPIO as GPIO from gpiozero import Button import time GPIO_SERVO_PIN = 27 limit = 17 switch = Button(limit) GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN, ...
Kedd22's user avatar
  • 11
1 vote
0 answers
55 views

Conditional Servo Movement

I am currently working on getting a raspberry pi to drive a servo motor according to a set condition. In the final program I will have a sensor determining the level of water in a glass, when this ...
Liam Carrington's user avatar
1 vote
0 answers
132 views

Cord Tension sensor

I need to detect when the tension in a (micro) winch cord either exceeds or falls below maximum or minimum tension. The winch is powered by a stepper or servo motor and the intent is to back off when ...
Steve Dutky's user avatar
1 vote
0 answers
82 views

Adafruit ServoHat importing PWM object

I am following the Adafruit page regarding the ServoHat for the Raspberry Pi. I am unclear what module to import to get the PWM class. This is the page about using the PWM class: https://learn....
Richard Wessels's user avatar
1 vote
0 answers
380 views

Is it possible to connect a Raspberry Pi Camera Module V2 without any concern to the CSI Camera Connector?

I have recently tried to connect the Raspberry Pi Camera Module V2 to the CSI Camera Connector on the Pi. At first, it worked properly and we could capture pictures and record videos. As part of a ...
piuser010203's user avatar
1 vote
0 answers
1k views

How do I speed up MG995 servo motor using PCA9685 motor driver?

I am using PCA9685 to drive a MG995 servo motor. I am using the following code to control the servo motor. import time,Adafruit_PCA9685 def elbow(): pwm = Adafruit_PCA9685.PCA9685() pwm....
Boudhayan Dev's user avatar
1 vote
0 answers
368 views

Rpi python GPIO PWM Controlling Digital Servo JX 5521MG Problem

I ordered a digital servo JX 5521MG to use with my Pi but when I use the code below the servo does not move but there is a slight tick or twitch inside. gpio pwm-ms gpio pwmc 192 gpio pwmr 2000 ...
alkey's user avatar
  • 261
1 vote
0 answers
367 views

Combination of ServoBlaster and wiringPi won't work

I would like to control a servo and a dc motor. I want to control the dc motor's speed by using pwm with a frequency >= 1000 Hz. The servo on the other hand expects a pwm frequency of only 50 Hz. So ...
user49541's user avatar
1 vote
0 answers
934 views

Connect a servo to explorer hat

trying to get a servo controller from my raspberry pi with a piminori explorer hat and servoblaster. When I use one of the GPIO port which connect to the LEDs and touch with the yellow control wire of ...
rdmueller's user avatar
  • 277
1 vote
0 answers
2k views

Multiple servo control RPi

I have written the following script to set positions for a single servo. import RPi.GPIO as GPIO import time #set up pin 11 as an output GPIO.setmode (GPIO.BOARD) GPIO.setup (11, GPIO.OUT) ...
tanuj Jain's user avatar
1 vote
0 answers
678 views

Raspberry pi with PS3 Controller

Hi I have used the following code for a specific movement for the servos. In my project I have 3 servos per nacelle (2 nacelles) to control the motions for the bicopter. I want to control the inputs ...
tanuj Jain's user avatar
1 vote
0 answers
524 views

Raspberry Pi with ESC and PS3 Controller

I am new to coding and I am trying to control ESCs through a PS3 controller which will be coded on the Raspberry Pi B+. I think this can be done, but i have read in a lot of places that I need to use ...
tanuj Jain's user avatar
1 vote
0 answers
210 views

Ideas for limited camera pan and tilt

I have a number of Pis, each with a camera module attached. I've mounted the cameras on a flat board side by side, but have discovered that there are physical inconsistencies in the camera modules ...
CoderTim's user avatar
0 votes
2 answers
86 views

Raspberry Pi 5 Servo Jitter

I’m trying to control 2 MG996R servos with my Pi 5. I’m using gpiozero and python. I’m using GPIO12 and GPIO13. I have a separate 5v power supply to power the servos. The servos both move but jitter ...
Bri's user avatar
  • 1
0 votes
1 answer
83 views

Why did my servo motor break when controlling it from a raspberry pi?

I was trying to control a Tower Pro SG-5010 servo motor using a Raspberry Pi 4, with the python code below, but after working for a minute or so, the servo started not turning for some of the commands,...
guest1253's user avatar
0 votes
2 answers
115 views

Can’t control servo with Raspberry Pi 5

I’ve just recently bought my first Raspberry Pi and opted for a Pi 5 as it was the latest. I’ve had no luck getting gpiozero or gpiod working with Python and my MG996R servos yet. I don’t mind if it’s ...
Bri's user avatar
  • 1
0 votes
2 answers
2k views

Problems connecting a servo to raspberry pi 5

I have recently tried to use a servo on a raspberry pi 5 using import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO.setup(17,GPIO.OUT) p = GPIO.PWM(17, 50) p....
laurits's user avatar
0 votes
0 answers
19 views

Synchronising with long-running activities

If this seems familiar, it's because this is a more-specific rework of a bad question. Currently coding with gpiozero, but I'm not wedded to it. If I have mixed activities, such as compute tasks and ...
RoUS's user avatar
  • 105
0 votes
0 answers
137 views

How would I connect and control this linear actuator to my raspberry pi 4 b+

So I have 2 questions for you guys, girls, or whatever you may be, this is the actuator I am planing on buying: https://www.robotshop.com/products/kitronik-linear-actuator-micro-servo-kit?...
Anthony Kercher's user avatar
0 votes
0 answers
37 views

Unable To Make MicroServo99 SG90 spin with raspberry pi

I am having an issue with my raspberry pi and making it spin a motor with python. I am currently using a battery connected to a PCA9685 16-Channel 12-bit PWM driver which connects my motor on channel ...
TheCrazyCreeper's user avatar
0 votes
0 answers
91 views

Continuous servo takes time to stop?

I am using a Raspberry Pi 3 to control a modified TowerPro SG90 servo, where I have removed the potentiometer to make a continuous rotation servo. Using the code below, the motor starts exactly when I ...
thecompassguy's user avatar
0 votes
1 answer
275 views

Controlling multiple servo motors on rpi 4

Do I need a hat module for my raspberry pi to control 6 servos? I’ll be using an external power source.
Bocian's user avatar
  • 9
0 votes
0 answers
93 views

Raspberry Pi does not register Servo on the I2C bus when connected via SparkFun auto pHat board

I just want to move the Servo motor through the I2C pins on spark fun's auto pHat board. I've been using the pi_servo_hat import and have been setting the motor through the initializer like this: test ...
Henry Keskitalo's user avatar
0 votes
0 answers
96 views

Which is the best dotnet core librery for controlling servo on Raspberry pi 4

Hello all I am doing research on the best library for controling servo motor on Rapberi pi 4 using C#. I tried some old ones. I will be grateful if you direct me to the best one for the purpose.
Darkk L's user avatar
  • 101
0 votes
1 answer
261 views

Raspberry pi controlling servo with dotnet

Hello all i am trying control servo motor usiun dotnet and Unosquare.RaspberryIO librery. This is my code and whatever I pass to the PayTonemethod the motor rotates only in one direction and one speed....
Darkk L's user avatar
  • 101
0 votes
1 answer
167 views

Control 2 steppers and 1 servo a the same time on a motor Hat

Basically, I have a raspberry pi 4 with a Motor Hat to control two stepper motors. The whole thing looks like this : https://i.stack.imgur.com/SIjzI.jpg Now I want to connect a servo motor, and I know ...
Tom's user avatar
  • 1
0 votes
0 answers
99 views

How to take out the noises of the servo motor?

I am using the 3b+ raspberry, while the accelerometer is acquiring data the servo is creating some noises which may give false readings. Does anyone have any idea how to get rid of these noises? I am ...
Mohamad Dabdoub's user avatar
0 votes
0 answers
136 views

Interrupt Servo once movement has initiated

I'm new to python and RPis. I'm building my own robot to learn. I manage to control my little robot and move it around, as well as moving the pan camera with my keyboard. While I was searching for a ...
Bernardo Belmar's user avatar
0 votes
0 answers
63 views

Why do my servos only work the first time

I Posted earlier about having problems with my servos that you guys helped me with and I'm really grateful for that. Now I'm facing an other issue with the servos: I have put them on my "robot" that ...
Kungbjucha's user avatar
0 votes
0 answers
312 views

Servo and DC/Stepper Motor Hats Together

I am creating a robot with my Raspberry Pi 3 B+. For my project, I wish to use 2x NEMA 17 stepper motors for moving around, and 2x SG90 servos for managing pan/tilt of the head. I already have an ...
Sid Kwakkel's user avatar
0 votes
0 answers
133 views

Adafruit_MotorHAT PI4

I am trying to run the following the code on PI4. from Adafruit_MotorHAT import Adafruit_MotorHAT # pylint: disable=import-error import RPi.GPIO as GPIO # pylint: disable=import-error import time ...
RAS's user avatar
  • 169
0 votes
0 answers
429 views

ServoBlaster on PI4

Could anyone make ServoBlaster work on Raspberry Pi 4? I was able to get it running on PI3 but the same code does not work on PI4.
RAS's user avatar
  • 169
0 votes
0 answers
49 views

PiGPIO inconsistent when using servo

so I will do the following command once and it will work and then the same sequence of commands never works again. Any help is appreciated, thanks! The commands are to first arm some ESCs then ...
David Teather's user avatar