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.

208 questions
29
votes
9 answers

How can I control an RC servo?

I'd like to control a small RC servo (5 V, 500 mA) from the GPIO pins via Python. Hardware What are the required electrical connections? Can I connect multiple servos to the Raspberry Pi? Are there any current limitations? Do I need to buffer the…
Alex L
  • 7,585
  • 12
  • 42
  • 53
7
votes
2 answers

Use a servo right from the GPIO without a breakout board

I've been researching how to use a servo on my Raspberry Pi but the tutorials concerning this seem very complicated. This surprised me, since the Raspberry Pi has GPIO built right in. Despite the Pi appearing to be servo-ready, most of the sources I…
James Taylor
  • 289
  • 1
  • 3
  • 13
5
votes
2 answers

Pin powered Pi crashes when servos move

I have been working on a circuit to power a Raspberry Pi and servo(s) from a single power source. The diagram below shows the basic configuration, although the 'AA battery' is actually two 18650s. The screw terminal on the right of the image…
5
votes
2 answers

Powering 2 servos with 5v output of L298N dual motor driver

I am using L298n Dual Motor Controller to control two dc motors for my robot. But I want it to power the servos too. I have created this circuit design. can I power the SG90 Servo with L298n? Is there any fault in the circuit? Any Other suggestion…
Anshul Bansal
  • 79
  • 1
  • 6
5
votes
2 answers

How could I use a RasPi to control keg flow?

I'm in the middle of a basement retrofit and have a refrigerator that I'm hoping to convert to a kegerator. Before I go to town drilling and such, I was wondering if there was a way I could use a Raspberry Pi to control the flow of CO2 to the…
swasheck
  • 151
  • 2
5
votes
1 answer

Controlling Servos with a Raspberry Pi

I am not sure if this will break my Pi, so I decided to double check In this image is a simple servo connection, I am still learning how servos work. I actually have two questions: If I decided to change the positive voltage of the servo 5V to 9V…
Bob Wright
  • 123
  • 1
  • 10
5
votes
3 answers

How can I get a clock in C accurate enough to control a servo?

I want to write a program that controls a servo motor myself using a pi B+. Controlling the motor involves sending 1.5 millisecond pulses along a GPIO pin every 20 milliseconds. I have tested the following stripped-down code on a 32-bit x86 Ubuntu…
axl
  • 153
  • 3
5
votes
1 answer

PWM Control on Raspberry PI

Alright so I understand this question is fairly saturated, but my use in pwm is for two differing pieces of hardware. (Sourced from: https://www.modmypi.com/blog/raspberry-pi-gpio-en-franais) From what i understand i have two available ports that…
Pariah
  • 372
  • 1
  • 4
  • 14
4
votes
1 answer

Getting axis values from joystick from jstest into C program

I am wondering if there is a way to get the axis position values from a joystick to feed into a C program. I can run the command jstest /dev/input/js0 and it will display live feedback of current button, axis positions. I would like to get the…
Yamaha32088
  • 265
  • 5
  • 16
4
votes
1 answer

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

In all specs of this servo that I can find there is a range of 1000-2000ms of duty cycle, for 50 Hz frequency, for the full range of motion. For…
Łukasz Zaroda
  • 187
  • 1
  • 6
4
votes
1 answer

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

I'm building a robot using Raspberry Pi and several servo motors. I'd like to power all components using a single lithium ion battery. I've looked into using a motor driver hat, but it seems the motor hats are unable to power the pi, so two separate…
3
votes
1 answer

Servo jumps on raspberry pi boot

I have just started using a servo to drive the front steering of a remote control car frame which i cannibalised. The steering works fine if i start it up and tune it however when i shut down the raspberry pi and then turn it on again the servo goes…
D Mason
  • 135
  • 1
  • 11
3
votes
1 answer

My servo jitters sometimes

I'm trying to build a toy model of self-driving car for my FYP. I have a RPi3 B+ Model with a custom 3D printed chassis which uses a futaba s3003 servo for steering front wheels. Servo is currently externally powered with a 3.7v LiPo battery and is…
3
votes
1 answer

PWM Servo - Check availability

I'm writing a program which requires Servo's basic movement. Here's the code: import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) pwm = GPIO.PWM(18, 100) pwm.start(5) def update(angle): duty = float(angle) /…
3
votes
3 answers

What components are required for connecting servo motor to PI?

I'm planning to integrate a servo motor with a raspberry PI to press a switch button and found this post very helpful : PWM Control on Raspberry PI I'm considering this motor VicTsing Mini SG90 9g Micro Servo Motor for RC Robot Helicopter Airplane…
blue-sky
  • 327
  • 2
  • 8
  • 17
1
2 3
13 14