Post

Designing a Custom ESP32-S3 PCB for micro-ROS

Designing a Custom ESP32-S3 PCB for micro-ROS

1. Motivation: The Sweet Prototyping Days with Breadboards, and the Inevitable Betrayal

In the early stages of robot development, breadboards and jumper wires feel like an absolute blessing. They allow you to quickly hook up an ESP32, an IMU sensor, and motor drivers without touching a soldering iron, tossing them onto a temporary 3D-printed chassis to get a proof of concept (PoC) up and running in no time.

However, this “honeymoon phase” is only valid during the very basic functional verification stage.

The Beginning of Debugging Hell: ‘Minor’ Loose Connections

Once you move past the basics and dive into serious software development—flashing micro-ROS-based firmware and implementing robot control or navigation—you inevitably hit a wall, facing a chaotic mess of wires.

3D Print Job

While unavoidable during the initial testing phase, the debugging stress grows exponentially as the number of wires increases.

Even if you design a neat 3D-printed housing to secure everything, the robot’s physical movements and vibrations inevitably introduce microscopic loose connections that are invisible to the naked eye. This leads to:

  • Countless hours wasted rewriting perfectly fine software, unaware that the root cause is purely mechanical hardware.
  • Sudden voltage drops or spikes that cause the MCU to reset or specific sensor packets to drop.
  • Severe debugging stress that drains your mental energy.

A Fatal Blow to System Performance (Hz)

In a ROS2 environment, where real-time data consistency and predictability are paramount, these loose connections cause issues far worse than a simple complete shutdown.

For instance, when publishing LiDAR scan data, odometry, or IMU metrics, any unstable contact resistance drastically messes with the communication bus. Running the following command to check the topic rate reveals a catastrophic result:

1
ros2 topic hz /scan

Under normal circumstances, the publishing rate should stay rock-solid at your configured frequency (e.g., 10Hz to 20Hz). However, the moment a loose connection or electrical noise sneaks into the line, the response times fluctuate wildly (Jitter), and severe packet loss drops the Hz significantly. This eventually triggers sensor timeouts in upper-level navigation stacks like Nav2, causing the robot to rotate aimlessly in circles or freeze in place.

“I just want to focus on writing software.” This was the exact moment I realized a dedicated, custom PCB was absolutely essential—one that guarantees rock-solid power delivery and immune-to-vibration communication lines.

2. The Solution: Designing Our Dedicated Robot Board, ‘Raymond Works No. 1’

To overcome these hardware limitations and fully immerse myself in software development and reliable robot navigation, I finally decided to design a custom integrated PCB. I chose EasyEDA for the task, as it is lightweight, highly accessible, and straightforward for rapid prototyping.

The result is the layout for my very first custom integrated robot controller: Raymond Works No. 1 (Version 1.0). The messy jungle of jumper wires and breadboards has been consolidated into a single, clean, structured PCB.

My First PCB

Key Design Points & Specifications Instead of just blindly merging the wires, I strategically planned the component layout based on the pain points discovered during real-world testing:

Direct Sockets for the ESP32-S3 Dev Board (ESP32_LM / RM)

Instead of permanently soldering the MCU or using a breadboard, I placed standard female pin header sockets. This allows the ESP32-S3 development board to be easily plugged in or swapped out like a modular chip, routing all peripheral pins cleanly through internal PCB traces.

Dedicated LiDAR Communication Ports (COM_LIDAR, COM2_SPARE)

To secure reliable data transmission for the LiDAR—the literal eyes of the robot—I replaced the noise-prone jumper wires with dedicated JST-style connector ports. Now, running ros2 topic hz /scan will yield a steady, unfaltering frequency.

Dedicated MPU6050 IMU Sensor Slot

The MPU6050 IMU, which is critical for robot attitude estimation and odometry correction, is assigned a direct socket slot on the bottom left of the board. This completely eliminates I2C bus dropouts caused by chassis vibrations.

Power Infrastructure & I2C Expandability

A robust screw terminal block (5V0(+) GND) is positioned at the bottom center to handle stable power distribution.

Anticipating future upgrades like motor drivers, displays, or additional sensors, I also broke out extra peripheral interfaces like I2C_MOTOR and I2C_SPARE near the bottom.

Wrapping Up the Design Phase While drawing the schematics, routing the traces one by one, and handling the artwork felt a bit tedious, looking at the finalized 3D view makes it incredibly satisfying.

Compared to the days of stressfully managing a fragile prototype, the peace of mind this single board offers is immense. Now, it’s time to export the design data, place the manufacturing order, and prepare for soldering and micro-ROS testing.

3. PCB Ordering and Cost: The Ultimate Budget Combo of JLCPCB and Korea Post

Now that the design is complete, it’s time to turn it into a physical board. For manufacturing prototyping samples, JLCPCB is by far the most accessible and cost-effective option. Using EasyEDA makes this process incredibly seamless, allowing you to generate and link fabrication files in just a few clicks.

Step 1. Exporting Gerber Files from EasyEDA To hand over production to the PCB factory, you need ‘Gerber files’—the industry-standard data format containing circuit patterns, hole positions, and solder masks.

First, run a Design Rule Check (DRC) from the top menu in EasyEDA to ensure there are no layout errors.

If everything looks good, go to Fabrication ➡️ Gerber Files… to download the production files as a compressed archive (.zip).

Step 2. Uploading to JLCPCB and Getting a Quote Head over to the JLCPCB website and simply upload the zip file you just downloaded (via the ‘Add Gerber File’ button). Once the system finishes analyzing the file, it will automatically detect the board dimensions and provide a real-time 3D preview along with an instant quote.

Quantity: 5 pcs (Default minimum)

Layer: 2 Layers (Double-sided PCB)

Cost: Thanks to JLCPCB’s iconic prototype special offer, the base price comes out to a mind-blowing $2.

It never ceases to amaze me that I can get 5 pieces of a custom-designed, proprietary PCB for less than the price of a cup of coffee.

Step 3. Saving on Shipping: Leveraging Korea Post If you choose express shipping options like DHL or FedEx, the package will arrive in 3 to 4 days, but the shipping fee can easily spike to $15–$20 or more, making the shipping significantly more expensive than the product itself.

If you aren’t in a desperate rush, I highly recommend the budget shipping option that integrates with Korea Post (often listed as Global Standard Direct or similar local postal lines).

Shipping Fee: Around $2 (Bringing the grand total to about $4 for 5 custom boards delivered right to your doorstep).

Delivery Time: Roughly 1 to 2 weeks (Including customs clearance and final delivery via the local post office).

“The Wait Time = The Golden Window for Part Sourcing” While waiting over a week for shipping might feel like a delay, it is by no means wasted time. To ensure you can jump straight into soldering and testing the moment the boards arrive, use this window to source and gather all the necessary core components.

Key Component Bill of Materials (BOM):

Pin header sockets for the ESP32-S3 development board

MPU6050 IMU module

JST connectors and pins for LiDAR communication

Screw terminal blocks for the main power input

Additional connectors for I2C expansion

Ordering these parts from domestic electronics distributors or platforms like AliExpress right after placing the PCB order timed perfectly. The boards and components usually arrive almost simultaneously. In the next post, I’ll be back with the physical PCB unboxing, the assembly/soldering process, and the long-awaited initial micro-ROS integration test!

4. Conclusion: The Era of Democratized Hardware Development with AI

For a long time, I used to think that designing and manufacturing custom PCBs was a domain exclusive to professional hardware engineers or tech corporations. However, leveraging intuitive design tools like EasyEDA alongside AI as a co-pilot, I was able to bridge that gap and bring this board to life without facing any insurmountable hurdles.

Of course, it’s worth noting that since my design is built on top of pre-made, budget-friendly development boards rather than routing raw discrete circuit components from scratch, the barrier to entry was significantly lower and much easier to manage. My core objective from the very beginning was simple: to secure a physically robust, neatly organized, and completely vibration-proof micro-ROS environment. This was my very first time placing an order through JLCPCB, and to be perfectly honest, I am genuinely amazed that custom hardware manufacturing has become this affordable and accessible to individual makers.

Looking ahead, I firmly believe that the combination of 3D printing and custom PCB fabrication will drastically elevate both the productivity and the stability of my ongoing DIY robotics projects.

And of course, I’ll be exploring this exciting frontier hand-in-hand with AI.

This post is licensed under CC BY 4.0 by the author.