Iron Man creates robotic arm design based on STM32 and ESP32

Publisher:TranquilVibesLatest update time:2024-01-08 Source: STM32嵌入式开发Author: Lemontree Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Zhihui has always been very interested in this field, and he thinks that the most practical one is the robot arm. Coincidentally, half a year ago, Zhihui accidentally found a second-hand robot arm, which made him a little excited. However, the joy did not last long, and Zhihui was a little unhappy: after he spent some time studying the robot arm thoroughly and developed a set of K by himself, he felt something was wrong: "This arm is not very good."

Zhihui said that the robotic arms currently on the market are not cool enough, so he decided to build a cool robotic arm himself and named it Dummy (taken from a robotic arm named Dummy in Iron Man). For this purpose, he summarized an architectural design diagram (because the diagram is long and scrolling in the middle, this article only extracts part of it):

Prepare

Since we are designing a robotic arm, we need to start with the hardware. After all, no matter how important the software is, it needs a high-quality carrier to present it perfectly.

Drive scheme

In terms of hardware, the first thing that needs to be determined is the drive solution, which includes the three core components of the robot that people often talk about -, reducer and.

Generally, the motors used in real robots are brushless, and their performance is excellent in all aspects, but their drive system is relatively complex and not suitable for the extremely compact structure of this robotic arm. In contrast, Zhihuijun chose the most accurate walking motor, but its disadvantage of low torque at high speed needs to be overcome.

To this end, Zhihuijun chose to use the most commonly used harmonic reduction in industrial robotic arms to solve the torque problem of the walking motor: its advantages such as zero backlash, high reduction ratio, and ultra-small size are tailor-made for this project.

After the motor and reducer were determined, Zhihuijun designed an integrated closed-loop drive for the driver to ensure drive accuracy and minimize volume.

Structural design

After the drive scheme is determined, the next step is structural design. The following is the final version of the design drawing:

Did you notice a bright spot in this picture?

That’s right, this final version is the 151st version, and there were 150 versions before this. Zhihui Jun said: “This work is the most complex structural design I have ever drawn.”

As can be seen from the picture, this robotic arm uses a total of 6 motors and 6 harmonic reducers. The main body of the machine is made of aluminum CNC, and the decorative components are made by 3D printing. For the sake of beauty, they are also integrated into the main body.

Zhihui also mentioned that the reason why this robotic arm was designed in red was not to pay tribute to Iron Man, but because "if the wild Iron Man's robot had a color, it would definitely be Chinese red." Zhihui calls himself "Wild Iron Man."

The circuit design of the entire robotic arm is also very complex, involving many aspects such as motor drive, computing module, system, etc., and 12 different models are used. In addition, in order to ensure the subsequent scalability and to make some unique innovations in interaction, Zhihuijun also equipped the machine with multiple wireless capabilities such as WiFi, 2.

Of course, these are all secondary. In terms of circuit, the most important things are the main controller and the motor servo driver.

Let's talk about the motor servo driver first. Zhihuijun designed it as an integrated motor drive that supports bus and power machine connection. Therefore, the whole system only needs 4 wires to connect all 6 motors and the end effector. Not only that, the performance of this driver is also very good. It uses FOC plus chopping constant current and adds magnetic encoding for closed-loop control, thus avoiding the possibility of step loss like traditional stepper motors, and also performs well in terms of maximum speed and efficiency.

"If the driver is the heart, then it is the cerebellum of the robot arm." For the controller, Zhihui Jun used the robot development framework REF he developed earlier, and the MCU based on the Cortex-M4 core. Zhihui Jun explained that this is because the M4 core has its own FPU and, which can greatly improve the efficiency of a large number of complex calculations involved in the subsequent control algorithm. In addition, the main controller adopts a redundant design. In addition to the main controller REF, it is also equipped with a co-controller, which serves as a safety backup and provides wireless capabilities such as WiFi and Bluetooth.

In general, Zhihui Jun took three steps to solve the accuracy and performance problems:

First, use a stepper motor plus an integrated closed-loop drive;

Second, use a harmonic reducer with zero backlash;

Third, perform high-precision compensation in subsequent algorithm practice.

Software Start

The hardware is ready, but this is just the beginning. The core part is the software algorithm. Zhihuijun pointed out that for the robot arm, the core software content lies in the kinematics forward and inverse solution algorithm and the realization of the dynamics model.

The kinematics forward and inverse solution algorithm can determine the forward and inverse solution relationship between each joint angle of the robot arm and the final end position, while the dynamics model is used to implement multiple functions such as collision, flexible control, and mechanical feedback. Specifically, it involves a large number of very complex matrix and partial differential calculations, which is also the part that Zhihui Jun spent the most time on in project implementation: "Please remember that these projects may seem to be mechanical on the surface, but in fact, they are all algorithms and mathematics behind them."

In addition to the core algorithm, the software also includes command lines and graphical, terminal APPs, and wireless teach pendant firmware. In addition, some people may have noticed that there is a large and round light ring on the base of the robot arm:

Doesn’t it look a lot like… Yes, that’s the logo of . The kernel is running in the main controller of this robotic arm.

Interaction

With both hardware and software, the next part is the demonstration part that we like the most! In this part, Zhihui showed many conventional and unconventional interaction methods. In one sentence, all the interaction methods you want are available here!

Using the serial port

This is the simplest way of interaction. A serial port number will appear when the robot is connected. The user can easily control the robot with serial port commands. A variety of coordinate methods can also be selected, such as joint coordinate system, world coordinate system, tool coordinate system, etc., and all posture settlements are completed inside the robot.

Using the command line

Through the RPC framework of REF designed by Zhihuijun, greater freedom of robot arm control and various settings can be achieved.

Graphical host computer

The above two methods are fine for technical people, but they are a bit "hell" for ordinary people. Therefore, Zhihui Jun also implemented a corresponding graphical host computer, which can perform "fool-style" drag-and-drop interaction in the host computer.

At the same time, this interaction is bidirectional, that is, not only can the action be sent to the robot arm, but the posture of the robot arm can also be synchronized in real time in the software:

Manual collaborative teaching

Theoretically, the above three interaction methods can already meet most usage needs, but how can Zhihui, who keeps improving, stop here? "What is a more elegant interaction method? Of course, you don't even need to open the software, what you see is what you get."

Based on this, the reduction ratio of the reducer can be reasonably set during the hardware design stage so that the robot arm can perform reverse drive while maintaining torque and accuracy, thereby obtaining the function of manual collaborative teaching, that is, you only need to manually teach it the motion process once, and it can automatically learn to repeat:

But many collaborative machines have manual teaching functions, so Zhihuijun thought this was not cool, so he designed a special method to enable the teaching function: a small wireless terminal.

This wireless teaching pendant is called Peak. It has many functions. It can seamlessly connect to the robotic arm via low-power Bluetooth to display the various states of the robotic arm in real time. It can also switch various functions, including entering the teaching mode.

AR

In addition, Zhihuijun also used the more advanced AR technology as an interactive method. After all, the host computer cannot display the real environment, and manual teaching is also tiring. However, combined with augmented reality technology, the effect of "point and shoot" can be truly achieved.

The ultimate interactive form: like your own arm

I believe that in the eyes of many people, the above interaction methods are good enough, but for Zhihui, they are "not yet ideal" and "not natural and elegant enough". In order to pursue the ultimate interaction state, Zhihui thought for a long time and finally thought of the most intuitive way for humans to use robotic arms: to use them just like their own arms.

With this idea in mind, Zhihui designed a device consisting of a binocular camera, an AH system, a computing platform, a force sensor and force feedback device, and a communication module to synchronize the movements of the human arm directly to the robotic arm. The specific principles are as follows:

First, the binocular camera performs target recognition and tracking positioning, and the AHRS system performs posture calculation to obtain the accurate hand position and rotation posture (because the AI ​​algorithm involved in this process requires an efficient computing platform to support it, Zhihuijun chose Huawei Ascend's Atlas edge computing platform). Then the real-time posture information will be sent to the robotic arm wirelessly after complex coordinate conversion, and the robotic arm can respond and execute after receiving it.

[1] [2]
Reference address:Iron Man creates robotic arm design based on STM32 and ESP32

Previous article:New technology gives underwater robots a sense of touch
Next article:China's AGV/AMR market has more than 300,000 units

Latest robot Articles
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号