Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes

How to make the motion of a servo motor smoother?

The most likely reason is be because you are using software timed servo pulses. Any variation in timing accuracy leads to jitter (servo trembling). I suggest you use hardware timed pulses to drive ...
joan's user avatar
  • 71.1k
6 votes

Is there a way to slow down servo movement speed?

This may work as an example, give it a start and end position, and the time(seconds) you want it to take to move there. It will break the movement up into 100 incremental moves this will slow down ...
Chad G's user avatar
  • 1,053
5 votes

Enable i2c on Ubuntu Mate Raspberry Pi 3

Add the following line to /boot/config.txt dtparam=i2c_arm=on Add the following line to /etc/modules i2c-dev Reboot
joan's user avatar
  • 71.1k
4 votes

How to run 2 servos with wiringpi2 on Raspberry pi 2

Lucky to see this question, I just spent weeks on controlling two servo (SG90) using WiringPi and programming in C, there're three things that I recommend. 1.Using BCM GPIO instead of WiringPi Pin ...
Mou's user avatar
  • 41
4 votes

Raspberry pi PWM stability

You need to use hardware timed pulses for servos. Software timed pulses will lead to jitter and a shorter servo lifetime. Try pigpio, servoblaster, RPIO.GPIO, or similar which use hardware timed ...
joan's user avatar
  • 71.1k
4 votes

Controlling servo with Raspberry Pi but it doesn't stand still

You are using the wrong tool for the job. Servos require accurately timed pulses. The RPi.GPIO module uses software timing which leads to all sorts of timing jitter, which leads to a twitching servo,...
joan's user avatar
  • 71.1k
4 votes
Accepted

Stepper Motor Hat v0.1 - pre-soldered version

I didn't get any answers, so I tried the random things method. It seems to work now and I have the addresses needed for the servos from ic2detect. Solution: you MUST boot up the Pi with the HAT ...
CaptStephan's user avatar
3 votes
Accepted

GPIO reset needed for Servo?

If you don't set the mode, it will not work. No, it is not hazardous. No, you do not need to clean up GPIO after the script runs. Indeed, if you do so, the servo will not work properly.
joan's user avatar
  • 71.1k
3 votes

Servos on Arduino run fine connected to Mac, poorly connected to Raspberry Pi 3

Your GeekDuino is based on ATMega328 which AFAIK doesn't provide any UART flow control. So, if you send too many bytes at once, you will lose some of the bytes and thus risk to get erratic behavior ...
Dmitry Grigoryev's user avatar
3 votes
Accepted

Can the GND pin handle 5V?

Ground in a DC circuit refers to either an actual earth ground (i.e., 0 volts vs. anything) or a common ground for different components that may be working at pretty much any voltage relative to it. ...
goldilocks's user avatar
  • 59.1k
3 votes

pigpio servo control

The only problem I can see with the code is that it terminates straight away. When the program ends the pigpio library will shut down so servo pulses will stop. I suggest you add a time_sleep(10) or ...
joan's user avatar
  • 71.1k
3 votes

Can a servo motor rotate to a specific angle?

Servo motors are controlled by pulse width modulation (PWM). Specifically, the angular position of the servo is determined by a specific pulse width. The angular position will be approximate and may ...
OyaMist's user avatar
  • 1,119
3 votes
Accepted

How to power a Raspberry Pi and servo motors with one power supply

Use a 5V buck converter to feed power from your lithium ion battery to the Pi https://thepihut.com/products/adafruit-ubec-dc-dc-step-down-buck-converter-5v-3a-output
CoderMike's user avatar
  • 6,997
3 votes

Can I reliably control four ESC with a servo driver board?

pigpio will let you control ESCs from the Pi. It uses hardware timed PWM. Python: use set_servo_pulsewidth C: use gpioServo Command line: use pigs s
joan's user avatar
  • 71.1k
3 votes

Should I use an external power supply for controlling 4 servos?

If you power the Pi via its microUSB socket you will only be able to supply a limited amount of current to the Pi and its peripherals (screen, USB, servos etc). You need to calculate how much spare ...
joan's user avatar
  • 71.1k
2 votes
Accepted

PWM Servo - Check availability

I do understand that basically I'm sending the signal to a registered PWM port and that it reaches the port but there is nothing to read it. Yes, but there's a distinction here which complicates ...
goldilocks's user avatar
  • 59.1k
2 votes

Enable i2c on Ubuntu Mate Raspberry Pi 3

To enable i2C on the Pi3, do the following: sudo raspi-config Choose advanced options Choose I2C Enable/Disable automatic loading Follow the prompts to set this to load this automatically Reboot the ...
L H's user avatar
  • 21
2 votes

Pi 3 can't detect servo hat

The I2C bus is implemented on pins 3 and 5 of the Pi (GPIO 2 and 3, see https://pinout.xyz/). You need to concentrate your efforts to make sure there are no shorts or similar defects on those pins. ...
joan's user avatar
  • 71.1k
2 votes
Accepted

Pigpio With Pi 3 Controlling Two Servos

Some things to note. motor2_reverse() and motor2_stop() were changing motor1 servo pulses continue at the set pulse width until you either stop the pulses (pulse width 0) or change the pulse width. ...
joan's user avatar
  • 71.1k
2 votes

Simultaneous servo control on RPi 3?

Use GPIO Zero with pigpio as the back end: from gpiozero import Servo from gpiozero.pins.pigpio import PiGPIOFactory from gpiozero.tools import sin_values, cos_values from signal import pause pigpio ...
ben_nuttall's user avatar
  • 2,461
2 votes

How to get pan-tilt servos quiet forever after first adjustments

Perhaps you need more expensive servos? They are more likely to go to the same position when given the same commands (pulse widths). Also remember that servos will only maintain a position against a ...
joan's user avatar
  • 71.1k
2 votes

Control servo motor using a web server

Presumably this is a permissions problem. Try adding www-data to the gpio group. This may be enough to allow it to manipulate the GPIO. You will probably have to restart the web server for the ...
joan's user avatar
  • 71.1k
2 votes

Why does my raspberry pi zero w crashes when controlling a DC motor with an L9232D and a 9g Servo motor?

"The only thing is that I connected the 3.3V of the L293D on a 5V pin, but I assumed it is not a big deal..." Translation AKA edited as is common on this forum **I am using common power source for ...
Jan Hus's user avatar
  • 641
2 votes

Why does my raspberry pi zero w crashes when controlling a DC motor with an L9232D and a 9g Servo motor?

the spike caused by motors, drops the controller voltage. in this case (the pi), it will drop to 4.6 v for example, which is enough to cause to to reboot. either use an adapter for rpi, or give it ...
Allaw Hussein's user avatar
2 votes

Control motors and servos simultaneously (Python)

See https://www.youtube.com/watch?v=rrRg1guojQE This shows (my) pigpio library being used to control a variety of devices. A Raspberry Pi controlling a variety of motors and sensors. The pan-...
joan's user avatar
  • 71.1k
2 votes
Accepted

Why is pigpio library not moving my servo when the same pin number works perfectly with RPi.GPIO?

PiGPIO supports only BCM pins. Looks like I have used board pins due to which my servo is not moving. I changed the pin numbering to BCM and passed the pin GPIO number 18. Do not write the pin number ...
Raj's user avatar
  • 41
2 votes

AdaFruit ServoKit CircuitPython Blinka Library Installation Problem

Adafruit-Blinka requires Python 3. It seems you're trying to install it for Python 2, using pip. Use pip3 as instructed in the tutorial you link to. sudo pip3 install adafruit-circuitpython-servokit
Dirk's user avatar
  • 3,541
2 votes
Accepted

What is the proper calculation of duty cycle range for the sg90 servo?

The servo angle is determined by the pulse width in a 50 Hz PWM signal. Most servos move to 0 when they receive a pulse 1500 µs long. Generally it is safe to send a servo a pulse in the range 1000 ...
joan's user avatar
  • 71.1k
2 votes
Accepted

Servo does not keep its position once it does no longer receive a signal from gpizero

Servos require a constant input to retain their position. (You can of course remove power to the servo thus preventing it from moving with no input but this is a kludge.) The servo input does not ...
Milliways's user avatar
  • 60.3k
2 votes
Accepted

Servo motor keep shaking while using software PWM to drive

The length of the pulse is used by the servo hardware to set the angle of the servo horn. If the length of the pulses differ then the servo will be continually shifting angle. Typically a 10 µs ...
joan's user avatar
  • 71.1k

Only top scored, non community-wiki answers of a minimum length are eligible