Why an ESP32 for our Robotic Arm project?

Consider the advantages of an ESP32 microcontroller when you build your next project.

By Chris Lehenbauer September 14, 2024

As we continue to develop GRIP-E, Phase Dock’s desktop robotic arm, I could write a book on the challenges we have conquered (and the ones we still face) with this project.  Someday soon, I’ll add posts about the servos, the development code, redesigning the open source Me-Arm robot, and communication with the wireless controller.

Today, I want to talk about how we chose the microcontroller.

Although we are huge believers in the Arduino Uno for education, the ESP32 was the best board for this highly complex robotic arm development project.

The microcontroller we needed had to be powerful and really fast to handle the many complex computations needed to get the arm to move and respond to commands in real time.

And boy, does the ESP32 deliver!

  • 15 times faster processor speed: The ESP32 has a dual-core processor running up to 240 MHz each, while the Arduino Uno uses a single microcontroller running at 16 MHz.
  • Parallel processing power for more efficient multitasking: The ESP32’s dual-core architecture enables it to handle complex calculations, multitasking and parallel processing far more effectively than the single-core of the Arduino.
  • Expanded memory to manage larger programs and handle more data: The ESP32 typically comes with 520 KB of SRAM and up to 4 MB of flash memory, compared to the Arduino Uno’s 2 KB of SRAM and 32 KB of flash memory.
The robot needs to respond in real time because that is what is expected. There’s some complex math going on in the microcontroller.

A couple of additional advantages for our robot (and maybe your project too!).

We wanted to:

  • Add a wireless controller (PS4) so our robot would function like industrial robots. The ESP32 adds built-in WiFi and Bluetooth to simplify connectivity. The Arduino Uno does not have built-in wireless of any kind.

Specialized code enables learners to program and save complex routines using the PS4 controller.

We wanted to:

  • Make the robot more affordable. The ESP32 is about half the cost of an Uno. ESP32 prices range from $5 to $15 for a standard module. (We pay just over $25 for five ESP32 microcontrollers on Amazon.) Official Arduino boards range from $20 to $30; clone versions go for about $10-$15 USD. Get two ESP32 microcontrollers with breakout boards from Amazon. Phase Dock is an Amazon affiliate. Note that you can get ESP32 development boards with both the old style USB Micro-B port, or the newer, more user-friendly USB Type C port.  We highly recommend the USB-C boards; they are just a lot easier to use.
  • Make it easy to wire the robot servos. Cost-effective breakout boards are available for the ESP32 that manage power and offer easy access to all available IO pins–with power for each pin. (Again, we buy in bulk; 5 breakout boards for less than $15 is a great price!)

The ESP32 GPIO breakout board (shown with the ESP32 attached) makes it easy to wire the robot servos to the ESP32.

We wanted to:

  • Use the Phase Dock WorkBench platform to build and support the robot. The form-factor of the breakout board is the same as the Arduino Uno, which means we can use a standard Phase Dock Click/Slide for Arduino to mount and easily manage the ESP32 on the WorkBench.

The ESP32 breakout board has a mounting hole pattern identical to the Arduino Uno.

We wanted to:

  • Interface with the Arduino IDE (Integrated Development Environment) for easy access to program the robot. Many Makers and students are already familiar with the Arduino IDE, so this was a bonus. Phase Dock wrote the code for low-level control of the robot in C.  Because all the scary math calculations are built into our code, users can leverage simple command line programming in the Arduino IDE to build out complex and repeatable robotic programs with XYZ coordinates and plain language commands. 

Command line programming in the Arduino IDE serial monitor using command “goto” and XYZ coordinates 0 150 0.

A closing thought on using the ESP32 for general Maker projects: 

There are perceptions that the ESP32 is harder to use and to program than the Arduino family.  We don’t feel this is true. 

Most Arduino libraries have been ported reliably to the ESP32.  You can select the ESP32 as your board in the Arduino IDE. If you have the appropriate libraries for your project, the type of board you use is pretty much invisible to you.

One remaining advantage of the Arduino family (especially the Uno and Mega) is the large existing base of hardware that plugs directly into this form factor.  If you must have a specific shield, you may be forced to use an Arduino instead of the ESP32.

But if hardware is not an issue, the additional benefits of built-in connectivity, expanded I/O and low cost make the ESP32 unbeatable in many applications.

In the end, what’s not to like about the ESP32? Give it a try for your next project and let us know how it goes!

Phase Dock is an Amazon affiliate. We earn a small percentage if you order your ESP32s using this LINK.

Here’s a good article comparing the ESP32 to the Arduino Uno.

Item added to cart.
0 items - $0.00