Загрузка страницы

How to use an Adafruit 16-Channel PWM HAT with a Raspberry Pi to Control Sixteen Servos

16 Servos and 1 Raspberry Pi! These single board computers are exceptional and here is the best way to control a whole bunch of 5V servos with them.
Full Article - https://core-electronics.com.au/tutorials/servo-hat-raspberry-pi.html

Related Tutorials
Control One or Two Servo Control With Raspberry Pi - https://core-electronics.com.au/tutorials/control-servo-raspberry-pi.html
I2C communication with the Raspberry Pi - https://core-electronics.com.au/tutorials/I2c-with-raspberry-pi.html
Controlling a Solenoid with Raspberry Pi - https://core-electronics.com.au/tutorials/solenoid-control-with-raspberry-pi-relay.html
UPS PiJuice HAT With Raspberry Pi 4 Model B - https://core-electronics.com.au/tutorials/ups-with-raspberry-pi-4.html
What is a HAT? - https://core-electronics.com.au/tutorials/raspberry-pi-hats.html
Facial Recognition with a Raspberry Pi and OpenCV - https://core-electronics.com.au/tutorials/face-identify-raspberry-pi.html

This guide will teach you how to control up to 992 5V Servos through 2 GPIO pins on your Raspberry Pi! But more practically, without stacking many multiple HATS (Hardware Attached on Top), this guide will teach exactly how to control Sixteen 5V servos using a single Raspberry Pi single-board computer. This is all possible via the Adafruit Servo HAT which will act as a PWM (Pulse Width Modulation) expander, taking up only 2 GPIO pins and communicating through I2C. The setup created in this guide will be able to send out 16 unique Hardware PWM signals. PWM signals are great for servos (both standard and continuous) and can be used for a myriad of other purposes (like LED light control, motor speed, and even the heat output of a heater!). This guide will show you how to control a single standard servo, a single rotational servo and 16 servos all at once! It will clearly go through the hardware assembly, the terminal commands and the scripts (Python code) to make our system all work together. So instead of being limited by the two pairs of hardware capable PWM GPIO Pins that the Pi 4 has we can instead use this HAT as a PWM expander board. It is worth noting that all GPIO pins on a Raspberry Pi can generate digital PWM signals which are referred to as Soft PWM signals. A PWM Signal produced this way is timed by the linux scheduler which results in a less accurate and less flexible signal than the Hardware PWM signal counterpart. A Soft PWM signal is not great for servos control as they will excessively jitter to and fro instead of holding still and will cause glitches when controlling a LEDs brightness. And one of the best things about this HAT is you can stack multiple on top of you allowing you to feasibility control 992 5 Volt servos all from a single Raspberry Pi using 2 GPIO pins. I asked if we had that many on hand for me to demonstrate to you and since then they have been hiding the barrels of servos from me :P.

If you have any questions about this content or want to share a project you're working on head over to our maker forum, we are full time makers and here to help - http://coreelec.io/forum

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

Adafruit 16-Channel PWM / Servo HAT for Raspberry Pi (used here): https://core-electronics.com.au/catalog/product/view/sku/ADA2327

Adafruit 16-Channel PWM / Servo Bonnet for Raspberry Pi (For Pi Zero and Zero 2): https://core-electronics.com.au/catalog/product/view/sku/ADA3416

Makeblock 9g Micro Servo Pack (used here): https://core-electronics.com.au/catalog/product/view/sku/MB95026

FEETECH FS90R micro Continuous Rotation Servo (used here): https://core-electronics.com.au/catalog/product/view/sku/POLOLU-2820

Raspberry Pi Model B 2GB (used here): https://core-electronics.com.au/catalog/product/view/sku/CE06424

Raspberry Pi 3 Model B+: https://core-electronics.com.au/catalog/product/view/sku/CE05436

Raspberry Pi 4 Power Supply: https://core-electronics.com.au/catalog/product/view/sku/CE06427

5V DC 4A Fixed 2.1mm Plugpack: https://core-electronics.com.au/catalog/product/view/sku/AM8911B

0:00 Intro
0:15 What this HAT does
0:45 16 PWM Signals!
1:00 What You Need
1:55 Hardware Assembly
3:06 Terminal Commands
4:32 Configure I2C Communication
4:56 Download Scripts
5:10 Standard Servo Control
5:30 First Payoff
5:36 Basic Servo Control Script Analysis
6:56 Continuous Servo Control
7:42 Second Payoff
7:48 Basic Servo Continuous Control Script Analysis
8:35 Tip to Tune a Continuous Servos
9:06 Controlling All The Servos
9:22 The Big Payoff!
9:40 Max Servo Control Script Analysis
10:58 Outro

The following trademarks are owned by Core Electronics Pty Ltd:

"Core Electronics" and the Core Electronics logo
"Makerverse" and the Makerverse logo
"PiicoDev" and the PiicoDev logo
"GlowBit" and the GlowBit logo

Видео How to use an Adafruit 16-Channel PWM HAT with a Raspberry Pi to Control Sixteen Servos канала Core Electronics
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
10 января 2022 г. 10:00:24
00:11:25
Яндекс.Метрика