Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
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.
You can download the relevant open-source robot models in the product literature for building your own projects.
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.
Take Raspberry Pi Zero as an example, we describe how to connect the serial bus servo to with UART port. 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.
Note: If you use an SC series servo, you need the power supply to match the SC series servos. The voltage marking 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.
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.
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.
Once installed, let's move on to the Python project compilation example.
Download [] 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.
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.
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.
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).
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.
These are simple tutorials for Python examples, and SDKs for different hardware devices and demos for different languages are provided in the documentation.