By peng-zhihui
Share this project to show your support
My Super Mini Robotic Arm Robot Project.
Video Introduction: [Homemade] I built a mechanical arm of Steel Iron Man! [Hardcore]
Video: I made a DUMMY ROBOTIC ARM from scratch! - YouTube
This is the complete design scheme of the original version of the robotic arm in the video, the cost and production difficulty of the scheme are relatively high, so the students who want to reproduce it suggest waiting for the Dummy Youth Edition that I will release later, this version will have the following improvements:
- The structure of the whole machine is redesigned, and 3D printing is used as the manufacturing scheme (the original version is aluminum CNC), which greatly reduces the manufacturing cost.
- Replace the original harmonic reducer with a small cycloid pinwheel reducer designed by myself, which greatly reduces the cost of parts.
- All software and firmware are the same as the original, and the functions are exactly the same.
- Add my own design of the PC host computer and mobile APP (strive to add the user initial setting guide to it).
- Improve the wiring method of the original motor driver, the original power wiring adopts the form of welding, which is not easy to install and disassemble, and the youth version will use 4P connector (power supply + CAN bus) connection.
- The cost of the whole machine should be within 2000.
- Most importantly, will find someone to come up with a babysitter-level video tutorial!
The original design of the 'stepper motor' + Harmonic's 'harmonic deceleration module' used in the original version of my video, of which the latter has a higher cost (the second-hand I bought is about 600 yuan a), so in order to let everyone reproduce this project as much as possible, I will add one later 'A low-cost solution for self-made cycloid reducer '+ '3D printing'.
At present, the cycloid reducer has been designed and is being verified, and it is expected to use PC (or acrylic) cutting combined with 3D printing, the accuracy has decreased but the functions remain the same, and the hardware cost of the whole machine is expected to be controlled within 2000 yuan.
The designed cycloid reducer is shown in my other warehouse: peng-zhihui/CycloidAcuratorNano
In order to realize the main robotic arm motion control function, the core of the circuit is actually 4 boards:
The first two of them and Peak are both open sourced by me, and I referred to the following when designing the stepper driver: https://github.com/unlir/XDrive This project, which is an open-source closed-loop driver of mine by a friend, is based on STM32. The driver is divided into open source version and closed source version, the closed source version is based on the discrete MOSFET performance is extremely strong and the function is very complete, the open source version of the ADC+ chopper driver chip, with basic functions, without CAN protocol.
I redesigned the PCB circuit of the driver (this project uses 20 and 42 steps respectively, and the file of 57 is just for you to expand), added hardware support for the CAN bus, and completely refactored the original core code, provides compiled binaries can be burned directly:
The main improvements are as follows:The use of Ctrl-Step driver is relatively simple, after downloading the firmware, the encoder calibration will be performed on the first power-on, if it is successful, then press the button 1 after the next power-on will enter the closed-loop mode, and the motor can be controlled by sending instructions through CAN or serial port, and the instructions for instructions can be found in the source code 'UserApp' folder 'interface_can.cpp' and 'interface_uart.cpp':
Other Keys Do:Other functions should be set by code or communication protocol, such as setting home zero point, PID parameters, CAN node ID, various motion parameters, etc., you can study the code by yourself.
- Press and hold both buttons at the same time to power on, the encoder will be calibrated automatically, and if the first calibration fails, you can recalibrate it this way.
- Short press button 1 to switch between Enable Closed Loop/Disable Closed Loop.
- Long press button 1 to restart the board.
- Short press button 2 to clear the locked-rotor protection.
- Press and hold button 2 to reset the target value to zero (e.g. if it is in position mode, the position will be reset to zero).
Of course, the other way is that you can also use the GRBL type of driver modification to drive the robotic arm, the problem of this solution is that the GRBL firmware coupling is relatively strong (after all, it is not designed for robotic arms but CNC applications) is not easy to expand, and the pulse form of control makes the wiring extremely inelegant (each joint has to pull the 'step/dir' line to the controller separately, resulting in long traces of the last few joints).
I can connect all the motors in series in the form of a series connection with the CAN bus, so that the overall wiring only needs four wires (power supply + CAN bus) and adopts the ring architecture, which is more stable in terms of physical form and control reliability (error feedback).
In addition to the driver, the other three core circuit boards are not highly difficult to design, the circuit form is mainly the CAN bus + DC bus + encoder collection, but the form of the design is very different, first of all, the peak will also be added later, the main function is to achieve wireless motion teaching, using STM32 core board + MPU sensor solution, the core of the control algorithm refers to the following: https://github.com/nerianys/MotionControl
It is currently expected to use MPU9250/MPU6050 (from many friends, it is easy to make and very mature), combined with wireless transmission module (direct ESP8266 WiFi), or can be based on the previous NRF24L01, wireless transmission is more stable, and the receiving end is also very simple, ESP8266/ NRF24L01 data is sent directly to REF through the UART port.
The two boards of the REF controller can be regarded as the main components of the robotic arm's core control, which are also very different from the previous designs. The two boards are designed for the REF control system, so you can refer to my other project: peng-zhihui/REF
The firmware of the robotic arm is actually very simple and divided into two main sections:
Host Computer https://github.com/peng-zhihui/REF
The code is based on the STM32-HAL framework, and the source code and engineering are both shared, so you can study them by yourself if needed.
The overall wiring diagram is shown as follows:
In the process of writing this article, I also open-sourced the reference project of the self-developed harmonic reducer, and the mechanical drawing of the overall design of the self-developed harmonic reducer is as follows:
The detailed instructions can be found in the following two warehouse:
In addition, the following two video introductions can be referred to: