🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

I got bored of making one ESP32 dev board at a time, so I scripted the whole lot. After my favourite AI monkey told me to automate the repetitive bits, I built a pipeline that generates fully laid-out USB-native ESP32 dev boards for a dozen modules—schematics, placement, routing, silkscreen, and Gerbers—automatically. It uses a module database to choose safe pins, LED and boot pins, lays everything out in a standard USB-C two-layer format with differential USB pairs and ground pours, and publishes releases via GitHub Actions. You can fab them right away (thanks PCBWay), but treat them like open hardware: trust, verify, and tell me which ones to build.

Related Content
Transcript

We’ve made a lot of ESP32 dev boards on this channel and I got to thinking, why not
just do them all?
ESP32 dev boards are pretty straightforward and for the versions that support native USB
you really don’t need many components.
So I did what everyone is doing nowadays, I asked my favourite AI monkey to do it for
me and it said ā€œnoā€.
Now it wasn’t a complete no, it was more along the lines of ā€œthis is beneath me,
it’s a mechanical repetitive job, what you want is a scriptā€.
Now this is a surprisingly sensible thing for it to say.
So that’s what we did, producing these things of beauty, fully laid out and wired
up dev boards for pretty much every module you could care about.
So how does it work?
Well an ESP32 dev board is a pretty well defined thing.
There are 12 modules that all fit one simple recipe.
Native USB support is a must, we don’t want to bother with USB to UART ICs.
This does dramatically simplify things.
All we need is a USB-C socket along with a couple of 5.1K resistors to make sure we get
power.
A 3.3V regulator is also a must, we need to power the ESP32 module.
And of course you need a boot mode button and a reset button.
Finally I always like to include a few LEDs on my boards, are we getting power from
the USB, is the regulator outputting 3.3V and you always want a GPIO driven LED so you
can run the blink sketch.
Finally for a dev board you want all the GPIO pins broken out to header pins.
But that’s it, it’s dead simple.
There are however a few questions that need to be answered.
Which pins are you supposed to use?
There are some pins that you don’t want to mess around with and this is completely
module specific.
And there are some pins that you really do need to mess around with.
In particular the boot mode pin.
This is GPIO0 on the Xtensa parts and GPIO9 on most of the RISC-V parts, but just to keep
things interesting it’s GPIO28 on the C5.
There are also some pins that are input only and there’s no point hooking our built-in
LED up to them, it just won’t light up.
This is the one part where the AI said ā€œI can help youā€.
I pointed it at my ESP32 module database and it created the specifications for each dev
module.
Which pins to use and not use, which pin to hook the LED up to and which pin is the boot
pin.
Once you have this, everything else, power, ground, EN, the USB D+ and D- pair can all
be derived automatically from the module symbol and footprint.
Everything starts from this skeleton schematic, it has all the base components on it and our
script clones it and drops in the module symbol, the two breakout headers and the net labels
to wire everything up.
There’s some clever logic around the arrangement of GPIO pins to make the layout easier but
again that’s easily worked out automatically by looking at the module footprint and the
location of the pads, which segues us nicely into actually laying out the PCBs.
Again this is surprisingly simple.
We follow a standard layout for all our boards, the USB-C socket at the bottom, buttons either
side of it and support components above that and then the dev module sits at the top with
the PCB antenna hanging over the edge.
The two header pins go on the left and the right, that’s our basic layout.
All the layout script needs to do is place the module in the correct place making sure
there’s enough height for the headers to fit, it’s totally mechanical.
I provide the pre-laid out and mostly routed support components.
Now one interesting thing that my experimenting with the AI made me do is produce two versions
of this, one with the boot button on the left and one with the boot button on the right.
This made routing much easier for some of the modules.
Now the routing is reasonably easy, especially as we automatically assigned each module’s
pin to the most accessible header pin and we chose a built-in LED pin that was closest
to the LED.
For the routing I found a really nice project called KiCadRoutingTools.
It supports differential pair routing so our USB D+ and D- tracks get properly laid out.
Strictly speaking you can get away without this but it’s nice to have.
We have 0.4mm wide power traces and we have a ground pour with stitching vias.
All of this crammed onto a two layer board.
Two layers because I’m super cheap and it lets you get your boards for just $5 from
PCBWay who are sponsoring this video.
They’ve made a lot of PCBs for my projects and they’ve always come up with the goods.
Other manufacturers are available but I really rate PCBWay, there’s a link in the description.
Everything gets silkscreen labelled by the script so you know which pins are which and
the board label includes the git tag so you know exactly where it came from.
What’s more, everything runs automatically.
When a change is made to the code and I push a version tag up to GitHub, an action runs
to create a release with the generated KiCad projects, Gerber files ready for manufacturing
and the nice montage images that I showed at the beginning of this video.
This all happens magically in the cloud.
You could use these Gerber files directly and just upload them to PCBWay and get them
manufactured.
But I would recommend doing your own due diligence.
These boards are all machine generated and I have not manufactured and tested them all
yet.
Treat them like any open source hardware design, trust but verify.
There’s nothing worse than getting a bad batch of PCBs and it not working.
So I am going to get some of these boards made up.
Which ones would you like to see?
Let me know in the comments!


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts