Micro Servo - High Powered, High Torque Metal Gear ID: 2307 DESCRIPTION Page 1 of 2 -
Page 2 of 2 Add even more power to your robot with this metal-geared servo. The tiny little servo can rotate approximately 180 degrees (~90 in each direction), and works just like the standard kinds you're used to but smaller. You can use any servo code, hardware or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gear box, especially since it will fit in small places.
Adafruit 16-Channel PWM/Servo HAT for Raspberry Pi Created by lady ada Last updated on 2015-02-03 05:30:19 PM EST
Guide Contents Guide Contents 2 Overview 4 Powering Servos 7 Powering Servos / PWM 7 OR 8 Current Draw Requirements 9 Adding a Capacitor to the thru-hole capacitor slot 10 Connecting Servos 11 Connecting a Servo 11 Adding More Servos 12 Attach & Test the HAT 14 Step 1 - Plug in HAT 14 Step 2.
Addressing the HATs FAQ © Adafruit Industries 23 25 https://learn.adafruit.
Overview The Raspberry Pi is a wonderful little computer, but one thing it isn't very good at is controlling DC Servo Motors - these motors need very specific and repetitive timing pulses to set the position. Instead of asking the Pi Linux kernel to send these signals, pop on this handy HAT! It adds the capability to control 16 Servos with perfect timing. It can also do PWM up to 1.6 KHz with 12 bit precision, all completely free-running. © Adafruit Industries https://learn.adafruit.
The Adafruit 16-Channel 12-bit PWM/Servo HAT will drive up to 16 servos or PWM outputs over I2C with only 2 pins. The on-board PWM controller will drive all 16 channels simultaneously with no additional Raspberry Pi processing overhead. What's more, you can stack up to 62 of them to control up to 992 servos - all with the same 2 pins! © Adafruit Industries https://learn.adafruit.
Best of all, we even have a Python library you can use, so you'll be up and running instantly, to make your robotic creation com to life. The Adafruit PWM/Servo Driver HAT is the perfect solution for any project that requires a lot of servos! © Adafruit Industries https://learn.adafruit.
Powering Servos Powering Servos / PWM This HAT has two power supplies. One is VCC - that is the 3.3V power from the Raspberry Pi, it is used to power the PWM chip and determines the I2C logic level and the PWM signal logic level. This supply will always be on if the Pi is plugged in and working, check the PWR LED on the Pi (it's the red LED) To po wer servo s yo u will need to also co nnect the 5-6V V+ po wer supply this is the power supply for the servos.
OR © Adafruit Industries https://learn.adafruit.
Current Draw Requirements Nearly all servos are designed to run on about 5 or 6v. Keep in mind that a lot of servos moving at the same time (particularly large powerful ones) will need a lot of current. Even micro servos will draw several hundred mA when moving. So me High-to rque servo s will draw mo re than 1A each under load. Good power choices are: 5v 2A switching power supply (http://adafru.it/276) (up to perhaps 4 servos) 5v 4A switching power supplies (http://adafru.
power supply and the Servo power supply completely seperate! Adding a Capacitor to the thru-hole capacitor slot We have a spot on the PCB for soldering in an electrolytic capacitor. Based on your usage, you may or may not need a capacitor. If you are driving a lot of servos from a power supply that dips a lot when the servos move, n * 100uF where n is the number of servos is a good place to start - eg 470uF or more for 5 servos.
Connecting Servos Connecting a Servo Most servos come with a standard 3-pin female connector that will plug directly into the headers on the Servo HAT headers. Be sure to align the plug with the ground wire (usually black or brown) with the bottom row and the signal wire (usually yellow or white) on the top. © Adafruit Industries https://learn.adafruit.
Adding More Servos Up to 16 servos can be attached to one board. If you need to control more than 16 servos, additional boards can be stacked as described on the next page. © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Attach & Test the HAT Step 1 - Plug in HAT Now you have soldered the HAT up and you know how to power the servos, we can install the HAT Begin by having the Pi shutdown and not powered, plug the HAT on top to match the 2x20 headers, and power up the Pi Step 2. Configure your Pi to use I2C devices To learn more about how to setup I2C with either Raspbian or Occidentalis, please take a minor diversion to this Adafruit Tutorial: http://learn.adafruit.
sudo apt-get install python-smbus sudo apt-get install i2c-tools i2c-to o ls isn't strictly required, but it's a useful package since you can use it to scan for any I2C or SMBus devices connected to your board. If you know something is connected, but you don't know it's 7-bit I2C address, this library has a great little tool to help you find it. pytho n-smbus is required, it adds the I2C support for python! Do n't fo rget yo u must add kernel suppo rt fo r I2C by fo llo wing this tuto rial! (http://adafru.
Using the Python Library The Python code for Adafruit's PWM/Servo breakout on the Pi is available on Github at https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code (http://adafru.it/aOg) This code should be a good starting point to understanding how you can access SMBus/I2C devices with your Pi, and getting things moving with your PWM/Servo breakout.
To stop the example, simple press CTRL+C. Depending on if you are using a standard or continuous rotation servo, you should get results similar to the following (a continuous rotation servo is being used in this particular example): © Adafruit Industries https://learn.adafruit.
Library Reference The driver consists of the following functions, which you can use to drive the underlying hardware when writing your own application in Python: Initialize Object You can create a new object for each HAT with pwm = PWM(0x40) In this case, pwm (lowercase) is the object created, and PWM(0x40) is the creation call. By default, all HATs are address 0x40, but by changing the address jumpers, you can create objects that use other addresses such as 0x60, 0x42, etc.
and when it will turn of. Channel indicates which of the 16 PWM outputs should be updated with the new values. Arguments channel: The channel that should be updated with the new values (0..15) o n: The tick (between 0..4095) when the signal should transition from low to high o ff:the tick (between 0..
Stacking HATs Even though HATs are not intended to be stacked, you can stack up to 62 HATs and not have an address collision, for up to 992 PWM outputs! You'll still need to provide power and write code for all those outputs but they can all share the same SDA/SCL pins no problem. You will need to have installed stacking headers & right angle 3x4 connections for it to physically connect. Extra Parts If you want to stack HATs on top of this one, make sure you pick up a HAT-stacking header (http://adafru.
You'll also need a set of right-angle 3x4 headers, since you will have to have the servo connections stick o ut instead of up © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
Addressing the HATs Each HAT in the stack must be assigned a unique address. This is done with the address jumpers on the middle right of the board. The I2C base address for each board is 0x40. The binary address that you program with the address jumpers is added to the base I2C address. To program the address offset, use a drop of solder to bridge the corresponding address jumper for each binary '1' in the address.
Board 0: Address = 0x40 Offset = binary 00000 (no jumpers required) Board 1: Address = 0x41 Offset = binary 00001 (bridge A0 as in the photo above) Board 2: Address = 0x42 Offset = binary 00010 (bridge A1) Board 3: Address = 0x43 Offset = binary 00011 (bridge A0 & A1) Board 4: Address = 0x44 Offset = binary 00100 (bridge A2) etc. © Adafruit Industries https://learn.adafruit.
FAQ Can this HAT be used for LEDs or just servos? It can be used for LEDs as well as any other PWM-able device! Use the Signal and Ground pins if you dont mind the LEDs powered by 3.3V and 220ohm series resistor.