Using an ESP32 to Build an Ultra Cheap Robot Arm
While it is certainly more affordable to build a robot arm now than it ever has been before, that doesn’t mean the costs are trivial…
While it is certainly more affordable to build a robot arm now than it ever has been before, that doesn’t mean the costs are trivial. There are many costs associated with building a robot arm, and one of the highest on the BOM (Bill of Materials) is usually the motors. For obvious reasons those need to be powerful and precise. But on the Electron Dust blog, they wanted to see what kind of results they could get out of super inexpensive stepper motors controlled by an ESP32.
The robot arm they built doesn’t look particularly noteworthy, but it wasn’t designed to. Instead, it’s purpose is to evaluate the performance of low-cost 28BYJ-48 stepper motors. Those stepper motors cost just a few dollars each, which means the total cost for this robot arm was likely under $40. Of course, the motors are also small, which means the arm itself isn’t going to be able to lift anything substantial. But, as you can see in the video, they were able to achieve remarkably smooth movement.
That’s thanks to a special ESP32 stepper control library that was developed specifically for this robot arm. The library uses a sine wave-based velocity pattern, which keeps the motors from accelerating too fast and jerking. They also programmed Inverse Kinematics functions that let the arm move to where you want the end effector to be, rather than requiring direct control of each motor’s position. While they did notice small variations in the arm’s precision, the 28BYJ-48 stepper motors actually seemed to work surprisingly well.