ESP32 Micro Robot Arm

481

5

2

About: Electronics, Programming, and Robot Arms. Yay!

This is a simple stepper motor robot arm. It was inspired by Chris Annins AR2. The AR2 is also a stepper driven robot arm. Just like the AR2, the goal with this robot arm is to get it to move as smoothly and accurately as possible. One big difference to the AR2 is that this robot arm is made with super cheap (~$3) 28BYJ-48 12V stepper motors. As a controller, we are using an ESP32 microcontroller. The 28BYJ-48 are geared steppers. The gears ensure both more torque on the output shaft and, in general, better accuracy.

Part list:

  • 28BYJ-48 12V version (x7)
  • A4988 stepper driver (x7)
  • 5mm wooden plate (1m^2)
  • 2mm wood screws (x50)
  • M3 screws and nuts
  • Copper wire (multicoloured AWG26, 6m)
  • Large breadboard (1x)
  • ESP32 microcontroller (2x)
  • Breadboards wires (x50)
  • Push button (as long as it's a push button anything will do)
  • Rotary Encoder lpd3806 600bm (1x)
  • 1k resistors (x3)


Here are the 5 steps needed to complete to get this micro robot arm working.

  1. Producing the mechanical parts
  2. Preparing the motors
  3. Mechanical assembly
  4. Electronic assembly
  5. Flashing the software to the ESP32

The finished robot arm will be able to move quite accurately, as shown in the video below.

Step 1: Producing the Mechanical Parts

There are 9 mechanical parts in total (see technical drawing.) In order to create these mechanical parts, we need to either get a 3D printer up and running or buy some quality wood. I went for the wood approach. Either way, all the parts will need to be 5mm thick. So if you are going to use wood, buy wooden plates with a thickness of exactly 5mm. Then use the technical drawings attached to this step and drill/cut all the pieces.

If you're going for the 3D printer approach, use the .stl files attached below (ESP32-MicroRobotArm.stl).

Step 2: Preparing the Motors

We are using the 12V version of the 28BYJ-48 stepper motor. There is also a 5V version. The part number is the same for both. You need to be careful not to get the wrong ones.

We want to use the motors in combination with the A4988 stepper motor driver. But it is only after you apply a small modification to the stepper motors inner wirings that you are able to do so. The 28BYJ-48s are unipolar steppers. They need to be made into bipolar steppers for the A4988 to work. Basically, you just cut a connection. Here's what we need to do:

  1. Remove the blue plastic cap from the motor housing.
  2. Find the connection that needs to be cut (see image with red circle.)
  3. Use a knife to cut the connection as shown in the image.
  4. Make sure the connection really is thoroughly cut.

Step 3: Mechanical Assembly

Now we are ready to assemble the robot arm. Use the video attached below to put all the pieces together.

  1. Make sure you are assembling the robot arm in the same order as shown in the video
  2. Use wood screws to attach the spacers to the links.
  3. Attach the motor cables to the links using some of the 3mm holes.

Step 4: Electronic Assembly

Next, we need to wire up all the things correctly. Use the electronic schematics attached to this step to do so. The knob in the schematics is actually a rotary encoder (lpd3806 600bm). It is used in combination with the push button to manually rotate the joints one after another to get the robot arm into its home-position (pointing up.) The process of getting the arm into its home position is shown in the first video. The 4 green PCBs are A4988 stepper driver chips.

Step 5: Flashing the Software to the ESP32

Here's the program for this robot arm:
Github ESP32 Micro Robot Arm

  1. Click on "clone or download".
  2. Click "Download Zip".
  3. Extract and open MicroRobotArm folder with the Arduino IDE.

In order to program the ESP32 with the Arduino IDE follow the Instructions over here. After following the instructions, you should be able to select the ESP32 board from the board manager (just like any Arduino board.) Flash the program (the same way you would flash an Arduino) and move the rotary encoder by hand. The lowest joint should rotate. After getting the robot arm into its home position and pushing the push button, the Robot Arm should start to move as shown in the first YouTube video.

Share

    Recommendations

    • Tape Contest

      Tape Contest
    • Trash to Treasure

      Trash to Treasure
    • Arduino Contest 2019

      Arduino Contest 2019

    2 Discussions