Servos are similar to motors, but can typically only move from 0 to 60/120/180 degrees, rather than rotate continuously. Unlike a motor, you send a servo a signal that makes it go to a specific position (eg 30 degrees), making them ideal for applications such as moving parts of robots, or controlling surfaces on an aircraft. That’s a little complicated to cover in this tutorial – a simpler use case is using a servo to turn an analogue potentiometer. Here we are going to create some simple software that will allow a Raspberry Pi to control the volume knob on a simple speaker amplifier, which could be used as part of a remote control project. This step- by-step tutorial assumes that you have already soldered the pin headers onto the Adafruit board.
What you’ll need
- Latest Raspbian image
- Adafruit PCA9685 servo controller
- 5V power supply
- Female-to-female jumper cables
- A servo suited to your needs
Featured Adafruit Product!
Adafruit 16-Channel 12-bit PWM/Servo Driver – I2C interface: You want to make a cool robot, maybe a hexapod walker, or maybe just a piece of art with a lot of moving parts. Or maybe you want to drive a lot of LEDs with precise PWM output. Then you realize that your microcontroller has a limited number of PWM outputs! What now? You could give up OR you could just get this handy PWM and Servo driver breakout. Read more.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — Presentation: Ten Year Futures – Benedict Evans
Wearables — Toy with inspiration
Electronics — Servo Pulses
Biohacking — Nutrigenomics – Personalized Vitamin Supplements Based on DNA
No comments yet.
Sorry, the comment form is closed at this time.