yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
24-channel Servo Drive Board📖
1.Introduction and tutorials
  • 24-Channel Servo Drive Board
  • PS2 Handle Description
2.Control servo board
  • 2.0 Raspberry Pi 5 control tutorial
  • 2.1 RPi_Jetson
  • 2.2 STM32
  • 2.3 C51
  • 2.4 Arduino
  • 2.5.MSPM0G3507
  • 2.6.MSPM0G3519
3.Download program
  • Download program
Download
  • Code
  • SCH_Other file
  • APP(Android/iOS)
Download ZIP

Welcome to 24-channel Servo Drive Board repository

2.0 Raspberry Pi 5 control tutorial

Raspberry Pi 5 controls the servo of the servo board to rotate

Raspberry Pi 5 controls the servo of the servo board to rotate1.Raspberry Pi 5 controls the rotation of the servo board

1.Raspberry Pi 5 controls the rotation of the servo board

According to the schematic diagram of the servo board, it can be seen that the serial port 3 is specially used to communicate with the host computer. This section discusses how the Raspberry Pi controls the rotation of the servo on the servo board according to the communication protocol.

* Environment configuration *

  • Beforehand, configure the Raspberry Pi serial port, because the hard serial port of the Raspberry Pi is used for Bluetooth, and the mini serial port is unstable to use. This experiment uses the hard serial port.

  1. First perform the following operations to map the serial port Enter sudo raspi-config in the terminal

  2. image-2022120500008

  3. image-2022120500009

  4. image-2022120500010

  5. image-2022120500011

  6. After the configuration is completed, save and exit, and restart according to the prompts.

Start experimenting

  1. The pin diagram of Raspberry Pi is as follows:

     

  2. The wiring between Raspberry Pi and servo board is as shown in the figure

     

    image-2022120500002

  3. Transfer the Raspberry Pi source code (serial_pi_cor.py) of this routine to the Raspberry Pi You can use winScp software for file transfer Link:http://www.yahboom.net/study/raspberry4B

  4. Run the following code in the Raspberry Pi 5 terminal:

xxxxxxxxxx
python3 serial_pi_cor.py
#If you encounter an error that the module cannot be found, you can use the following command to install it.
sudo pip install serial
sudo pip install pyserial

Refer to the 16-channel servo control board communication protocol

For example: if you want the servo of channel 4 to rotate to 100 degrees, enter D in the terminal first, press Enter, and then enter 100 degrees. That is, the desired result can be achieved.

 

image-2022120500004

Press ctrl+c to end the running program.

 

PS2 Handle Description
RPi_Jetson

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文