AI Soul Artist Based on STM32: Project Share

If you don’t want to miss my updates, remember to go to the upper right corner – view public account – set as a star, and give me a star!

AI Soul Artist Based on STM32: Project Share
AI Soul Artist Based on STM32: Project Share

It’s time for the weekly project share again on Monday. Today’s project author is ZhiHui (click to view the author’s article). If you are familiar with ZhiHui’s works, you must know that “small and beautiful” has always been his pursuit. The X-Bot robotic arm shared in this issue is a perfect embodiment of the “small and beautiful” core, and its demonstration video has reached over ten thousand views on Bilibili at lightning speed after it went online. If you haven’t followed yet, hurry up: Bilibili ID “ZhiHui Jun”, Zhihu ID “ZhiHui”. At the same time, ZhiHui has open-sourced the software firmware, structure, and driver schematic of X-Bot, allowing more people to try it out. If you are interested, you can reply “X-Bot” on “Darwin Says” WeChat to obtain the open-source materials.

Darwin
The Origin of X-Bot

Everyone should be familiar with robotic arms, from 3D printers and laser engraving machines to industrial robotic arms used in factories, they are typical applications of robotic arm control. With the arrival of the Industrial 4.0 era, robotic arms, as the most typical type of “robot”, are gradually serving various aspects of our lives.

X-Bot is such a robotic arm project. To be precise, it is a precursor work of another AI project of mine. After seeing a very interesting Conditional Generative Adversarial Network (CGAN) model in a paper, I had some brainwaves and prepared to combine hardware to create an AI Soul Artist. Since it is an artist, having only AI algorithms is certainly not enough to bring it to life, so X-Bot was born.

AI Soul Artist Based on STM32: Project Share

X-Bot Structure
At that time, I also considered several robotic arm schemes, and finally chose the CoreXY structure as the design scheme for X-Bot.What is the CoreXY structure? First, let’s understand what the currently popular robotic arm structures are:
The classic XYZ structure

AI Soul Artist Based on STM32: Project Share

This type of structure is easy to understand at a glance. In simple terms, it is independent linear motion in the X, Y, and Z directions. Although there are many forms, for example, the first type in the picture is called a gantry type, which is widely used in the engraving machine field; the second type is often seen in compact 3D printers.

The advantage of the XYZ structure is that it is very simple and easy to control. Since the motion in the three directions is decoupled (the motion in one direction does not affect the other direction), and relatively speaking, because it is purely linear drive, its motion accuracy is relatively easy to control.

DELTA structure

AI Soul Artist Based on STM32: Project Share

Since we are in three-dimensional space, any three linearly independent vectors can be used to represent a unique coordinate in space. Corresponding to robotic arms, this means that as long as I have three motors that can be precisely driven and controlled, I can play various tricks to make a robotic arm move precisely to a certain point. In the XYZ structure, the positions of the X, Y, and Z motors are not equal, while the DELTA structure symmetrically places the three motors in a very clever way, as shown in the figure above. Through the constraints of six universal joints at both ends of three connecting rods, the end of the DELTA robotic arm can move to any point in three-dimensional space (within the travel range, and the travel space is not a cube like the XYZ structure). The advantage of this structure is that it is very cool. In fact, a few years ago, when I first decided to design my own 3D printer, I was very enthusiastic about the DELTA structure. Due to the lever effect, this type of robotic arm generally runs faster than XYZ, and since nonlinear control coordinate calculation consumes more computing resources, interested students can learn about the derivation process of the DELTA structure to XYZ coordinates calculation formula.

Cylindrical structure

AI Soul Artist Based on STM32: Project Share

When it comes to XYZ, the first thing that comes to mind is the Cartesian coordinate system. However, we learned another coordinate system in middle school called polar coordinate system, which can represent a point in the plane with an angle and a length, and the conversion to XY coordinates is also very convenient. Therefore, adding a Z-axis linear motion to the polar coordinate system results in such a cylindrical structure robotic arm.This type of robotic arm is rarely seen in practical applications because, as a polar coordinate structure, the following SCARA structure has a more “humanoid” effect.

SCARA structure:

AI Soul Artist Based on STM32: Project Share

This type of robotic arm structure is very similar to a human arm (although it has significantly fewer degrees of freedom; a human arm should have 7 degrees of freedom). The advantages are obvious: it saves space, but the disadvantages are also evident. Due to the magnification effect of errors at the far end, the precision requirements for motor angle control are very high. Even a slight jitter in the motor can cause significant errors at the end, so in industrial robotic arms, this type of robotic arm generally uses harmonic reducers with extremely low transmission errors.

CoreXY structure

AI Soul Artist Based on STM32: Project Share

Unlike traditional XY structures, CoreXY is a structure that can control the end to move in both XY directions using only one synchronous belt, which is very clever. However, like most other structures, the CoreXY structure also has the disadvantage of having motors and limit switches distributed in a scattered manner, making circuit connections and wiring quite troublesome. Therefore, based on this, X-Bot changed the placement of the motors from the sides to the center, with all circuit boards and motors arranged more compactly.

AI Soul Artist Based on STM32: Project Share

In fact, there are various structures for robotic arms, and the creativity of structural designers is truly astonishing. Interested friends can google various 3D printer works from abroad; it’s very interesting.
X-Bot Circuit Design
The driving circuit is relatively simple, just a minimal system of STM32, and the motor driver directly uses an integrated driver, which can be found on Taobao. The Bluetooth module used is HC-05, and it can be powered by 12V.
The core components of the driving circuit: STM32F103, HC-05, LP2292, MP1584.

AI Soul Artist Based on STM32: Project Share

Click to enlarge

X-Bot Firmware
Regarding the firmware, I directly ported the mature grbl firmware from Arduino to STM32. The parameters are already set, and I also changed the coordinate transformation function from XY to CoreXY; it can be directly burned using Keil.

AI Soul Artist Based on STM32: Project Share

Reply on “Darwin Says” WeChat: X-Bot to obtain the control board, firmware, and structural files.
END
AI Soul Artist Based on STM32: Project Share

Darwin Project Sharing Series——Focusing on popular application technologies such as IoT, embedded systems, AI, FPGA, etc., open-source sharing of schematics, codes, and project solutions to build your knowledge base.

Project Sharing Series Highlights:

STM32 IoT Smart Home Project

Raspberry Pi + Compute Stick 2 Completing Real-time Face Recognition Project

Building Cloud Computing Platform for Embedded Development Boards

STM32 Realizing the Simplest Air Mouse

Arduino Rubik’s Cube Robot
We are NiMo, the founder of Darwin, a sister who only talks about technology and does not flirt. The Darwin online education platform aims to serve professionals in the electronics industry, providing skill training videos covering popular topics in various sub-fields, such as embedded systems, FPGA, artificial intelligence, etc. Tailored hierarchical learning content for different groups, such as common knowledge points, disassembly assessments, electronic competitions/intelligent vehicles/postgraduate entrance examinations, etc. Welcome to follow.
Official website: www.darwinlearns.com
Bilibili: Darwin
QQ group: 786258064
AI Soul Artist Based on STM32: Project Share

Leave a Comment

×