Bus Servo Adapter (A)

From Waveshare Wiki
Jump to: navigation, search
Bus Servo Adapter (A)
Bus Servo Adapter (A).jpg

UART
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Introduction

This is a serial bus servo adapter board integrating the servo power supply and servo control circuit. The demo with a different language for controlling the serial bus servo is provided and supports changing the servo ID and operation mode (Servo mode/Motor mode) through the demo. Theoretically, up to 253 serial bus servos can be controlled and each servo can read the information such as the current angle, load, voltage, mode, etc. Also, we can control the rotation of the serial bus servo by connecting the UART port to the host, which is applicable for robotic arms, hexapod robots, humanoid robots, wheeled robots, and other robotic projects that require feedback on servo angle and load.

Specification

  • Input voltage: 9~12.6V (should match servo voltage)
  • Communication interface: UART
  • Power supply interface: 5.5*2.1mm DC
  • Dimensions: 42mm x 33mm
  • Mounting hole diameter: 2.5mm

Features

  • Support connecting to a host computer or MCU to control the serial bus servos.
  • Simultaneous control of up to 253 ST/SC series serial bus servos (require sufficient power).
  • 9~12.6V voltage input (input voltage must match servo voltage).
  • Integrated stable control circuit to ensure stable operation of serial bus servos.
  • Provide a convenient solution for serial bus servo control.
  • Mini and space-saving, suitable for embedding into various projects with high space requirements.

Open-source Project

You can download the relevant open-source robot models in the product literature for building your projects.
500px-Servo-Driver-with-ESP32-details-3.jpg

How to Use

UART Control

For hardware devices without USB connectors, such as Raspberry Pi Zero, ESP32, Arduino, and STM32 development board, you can realize serial bus servo control and data feedback via the UART port with the hardware device, and the connection must be RX-RX, TX-TX. Note that the jumper cap of the bus servo adapter must be on the A as shown below.
Bus Servo Adapter (A).jpg
Take Raspberry Pi Zero as an example, the following is the basic connection of the serial bus servo using the UART ports. Connect the serial bus servo to the servo interface of the driver board, and connect the UART serial port with the Raspberry Pi Zero with wires. Please notice that the jumper cap of the serial bus servo driver board should be in the A position. The power supply of the Raspberry Pi Zero is 5V, and you can input it with Micro USB and GPIO pins. The input voltage of the serial bus servo driver board should match the power supply of the connected serial bus servos, and you can input it via the DC5521 power header and green power screw terminal.
Bus servo adapter a.jpg
Note: If you use an SC series servo, you need the power supply to match the SC series servos. The voltage marked on the power supply interface of the driver board is specified for the power voltage of the ST series servos, but in reality, it can also accept the power voltage for the SC series servos.

USB Control

For hardware devices with USB connectors, such as PCs, Raspberry Pi 4B, Jetson Orin Nano, and RDK X3, you can connect the driver board to the hardware device with a USB cable. That means you can directly control the serial bus servos and get data feedback through the host. Pay attention to the jumper cap of the serial bus driver board should be at the B position (as shown in the figure). Also, you can control the serial bus servo on different environments of hosts.
Bus Servo Adapter (A).jpg
Take PCs as an example, the following is the basic connection of the serial bus servo using the USB connectors. Connect the USB connector to the PC with a USB cable. The input voltage of the serial bus servo driver board should match the power supply of the connected serial bus servos, and you can input it via the DC5521 power header and green power screw terminal.
Bus Servo Adapter (A) B.jpg
Note: If you use an SC series servo, you need the power supply to match the SC series servos. The voltage marked on the power supply interface of the driver board is specified for the power voltage of the ST series servos, but in reality, it can also accept the power voltage for the SC series servos.

Python Example

Python Environment Setup On Windows

First, download the latest installation package from the Python website. Please download it according to your OS. Here the package I downloaded is Python 3.11.5 for Windows.
Bus servo adapter a05.png
After downloading, double-click python-3.11.5-amd64 to install, and click "Customize installation" to enter "Optional Features". Keep clicking on "Next" to enter the "Advanced Options" interface. Be sure to keep "Add Python to environment variables" checked, and click "Browse" to modify the installation address. Here is the default installation address. Click "Install" after setting, and then just wait for the installation.
Bus servo adapter a06.png
Once installed, let's move on to the Python project compilation example.

ST Series Servo Python Example

Download ST serial bus servo control library (Python) demo, unzip, and then input "cmd" in the start menu bar to open the Windows command prompt interface, type "cd folder path" to enter the STServo_Python project folder, where the virtual environment has been created, the name is stservo-env, and then enter:

stservo-env\Scripts\activate.bat

This command is to activate the virtual environment.
Bus servo adapter a07.png
In the STServo_Python project, you can see the "requirements.txt" file, which is for storing the installation package list used in this project. After entering the virtual environment, input:

python -m pip install -r requirements.txt

This command can be used to install the package in this project, and you can see the package to be used only is "pyserial" and has been installed.
Bus-apater-a-Python1.png
To connect the ST series servos to the serial bus servo interface on the driver board and provide power with a voltage range of 9 to 12.6V, you can search for 'Device Manager' in the Start menu to view the newly connected port number.
Bus servo adapter a09.png
Next, change the name of the device in the demo you want to run to the access port number, in my case COM41 (different computers have different access port numbers).
Bus servo adapter a11.png
Once modified you can run it, here is an example of the ping.py file, enter:

python ping.py

You can see it runs successfully and the servo with ID 1 is connected successfully.
Bus servo adapter a10.png
These are simple tutorials for Python examples, and SDKs for different hardware devices and demos for different environments are provided in the documentation.

Resource

Schematic

Demo

Software

Open-source Structure

Model

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)