🌈 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

Well folks, what an adventure! After vibe coding our vibing button, I took up the challenge to vibe code the actual hardware for an ESP32 S3 dev board. Used a tool called at pile and gave it a whirl with some AI help from Claude. Interestingly, it handled everything from sourcing components with LCSC part numbers to wiring them up. Had a wee hiccup with missing capacitor in the RC circuit, but overall it was a thrilling ride watching the AI process! A bit of tweaking here and there, and we're good to go! Can't wait to see it in action.

Related Content
Transcript

Well, actually, this is not shabby at
all. That’s pretty surprisingly good. If
you watched the previous video, you’ll
have seen me vibe coding a vibing
button. Now, a few people suggested that
we take it a step further. Why not vibe
code the actual hardware? So, challenge
accepted. Now, of course, speaking of
PCBs, we should really mention PCB way.
I’ve got some PCBs on order with them
right now. These are handcrafted nonAI
ones, so looking forward to a project
with those. And thanks also to all the
patreons who support me. Now I have done
some quick research and I’ve settled on
using a tool called at pile. There are
other options, but this is the first one
I tried and it seemed to give pretty
reasonable results. I’ve also switched
over to using clawed code as this seemed
to be doing a better job than cursor for
this task. So I’ve made a new atapile
project and here’s the prompt we’re
going to use. So we want an ESP32 S3 dev
board. Obviously, we’ll need an S3
module, USB, a 3.3 volt regulator, a few
LEDs, a quick connector, and a reset and
a boot button. And we’re going to need
some passive components for any of the
above things. I’ve given it some hints
on what it should do. So, an RC circuit.
And I’ve also told it USBC, we want 5
volts, and we want the data lines. And
I’ve put in a bit of extra information.
So, GPIO 19 and GPIO 20 on the ESP32S3
modules. There’s D minus and D plus
pins. So, make sure we label those
correctly so we get differential
routing. We also want to use LCSC part
numbers for the components. And I’ve
told it to go off and search the web for
these. And I want to use 0603 for all
the resistors and capacitors. I’ve given
it how to actually create a part using
at pile. And I’ve said try and do it one
thing at a time and run the build
command every so often. I’ve also said
be very careful. Use the right pin names
and numbers. So, let’s copy and paste
this into Claude. So, if we go on to the
terminal,
I’ll launch Claude.
Okay, so he’s up and running and then
we’ll just paste in our prompt and we’ll
see what Claude makes of it. So, off you
go, Mr. AI. Build me an ESP32 dev board.
So, it’s off doing its work. It’s uh got
various displays as it’s thinking. So,
it’s currently cooking. It’s made a
to-do list. So, it’s going to go off and
search for various components. Um, it’s
going to find some LEDs, can add the
boot buttons. So, it’s starting off
looking at the current project and
seeing what’s required. So, off it goes.
So, it’s already doing a web search. So,
it’s gone off to try and find a room one
module from LCSC. Okay. So, it’s chosen
an N16 R8. So, that’s pretty cool. So,
it’s running our little command. Do we
want to proceed? Yes.
Okay, now it’s hustling and it’s
searching for a USBC connector. So, I
think we’ll let it get on with what it’s
doing and we’ll come back when it’s
finished. I’m just going to keep hitting
yes to everything it asks. I’m going to
not look at the code. That’s the
tradition of Vibe coding. We don’t look
at the code ever. We just let it do what
it wants to do. And we may have to give
it a few hints, but let’s see how it
gets on. So, we’ll leave this running
and see what happens. And this looks
like our last component. So, some
tactile switch buttons and some
capacitors for decoupling and a few
resistors. So, hopefully we’re almost
done with the components and it will
start wiring them up. Okay, so it thinks
it’s got all the components. It’s going
to update its to-do list and start
adding them to the main file. Okay, so
it’ll make all the edits it wants. Now,
I’m going to be intrigued as to whether
this works first time. I’ll be quite
surprised if it does. I suspect it’s
going to run this build command and
we’re going to get quite a few errors,
but let’s see. Okay, there we go. Got
some errors. Let’s see if it can work
out how to fix them.
Okay, so I see the issue. Import
statements are incorrect. So, it’s going
to go off and do a bit of work and try
and fix itself. Build has succeeded.
It’s going to go and do its to-do list.
And now it’s going to add the
connections between the components.
Okay, project builds successfully.
includes all the requested features. Got
our module, USBC connector, 3.3 volt
regulator, status LEDs, quick connector,
reset and boot buttons, all the
necessary passive components, and the RC
components for the enable pin. So, all
the components use LCSC part numbers and
are available for ordering. It’s ready
for layout and PCB manufacturing. Well,
let’s double check that. So, I’m going
to run a manual build just to make sure
it does actually build. Not that I don’t
trust the AI, but let’s just double
check.
Build successful. I’m quite impressed.
So, if we hit this button, we should
launch Keycad and go into the PCB
designer. So, here we are inside Keycad.
Here’s all our components. Let’s um
let’s build an actual board and see if
they’re actually connected up. So, we’ll
just do some edge cuts. Do a little
small board and then we’ll just go place
autoplace footprints and we’ll place all
the board footprints. So, let’s have a
look. So, what I can see if we move some
of these around, we have absolutely no
connections.
So, it’s got all the components. I think
they’re all there. It looks like they’re
all there. Let’s go back to um Claude
and get it to actually do the
connections. We just have to tell it
it’s forgotten to actually wire anything
up. So, we’re back in Claude.
So, I don’t see any connections. Let’s
be explicit. between the components.
All right, then. Come on, AI. I have
faith you can do this. You’re absolutely
right. I’ve only added the components,
but I didn’t create any connections.
What a doofus. Come on, wire it up.
Okay, the build actually succeeds and it
claims to have wired everything up. So,
uh once again, I’m going to run my own
build just to double check. Well, it’s
not lying. The build does work. So, it
says I’ve done all of this stuff. So,
what’s it say? It’s done. Power supply.
It’s wired up the AMS 3117. Um, input
filtering, output filtering.
Um, it’s got the USBC connector with
5.1K CC resistors. It’s got the USB D
plus and D minus lines connected to the
GPIO 19 and 20 properly labeled for
differential routing. It’s got a red LED
for 5 volts, green for 3.3, and a blue
LED to GPIO 48. reset button and a boot
button. Quick connector with IO21 and
IO47.
An RC circuit on the enable pin. So,
that’s good. This looks like quite a low
resistor value. Um, it might work, but I
normally use something a bit higher. Um,
it’s got all the ground connections,
proper power decoupling, blah blah blah.
Well, let’s have a look in Keycad. Well,
I’m pretty impressed. It has done a lot
of wiring. So, what I’m going to do is
lay this out so we can actually view it
a bit better and then we’ll do a review
and see how good this actually is. Okay.
So, I’ve laid out everything in
approximately the right places. There a
whole bunch of decoupling capacitors
here. Um, there’s a decoupling capacitor
here, but what I can immediately see is
our EN circuit. We’re missing the
capacitor for our RC. So, what I’m going
to do is I’m going to pop back to Claude
and tell him he’s forgotten about it.
Okay, we seem to be missing the
capacitor on the RC circuit for the EN
pin. We have the resistor but no
capacitor. Okay, you’re absolutely
right. I added the resistor for the IC
circuit but forgot the capacitor. Let me
fix this. Okay. Yes, go off and fix
this.
Okay, it’s built. Let’s um click this
button and see if it’s actually been
added. Okay, result. We have a new
capacitor. Let’s bring it in. And there
we go. There is our capacitor.
So, I’m going to finish wiring this up
and then we’ll have a look at it and see
how well it um came out. But so far
looks pretty reasonable. Okay, so that’s
the layout done. I’ve done some ground
fills to make sure the grounds are
connected. Let’s just turn that off.
It’s a very um I’ve done a quick and
dirty routing. It’s not ideal. It’s not
perfect, but all the components are
there. The only thing I had to change is
this resistor on the RC circuit for the
EN. It has used a 330 ohm resistor. I
had to tell it to go and use a 10k, but
it was quite happy to go and fix that
for us. So, we now have our RC circuit
on the EN pin. We’ve got our little
reset button here. Got the boot button
here. Let’s just move some of these
references around. It does. Um, yeah,
does put them in strange places and for
some reason duplicates them, which is a
bit odd, but let’s just move those there
and that there. So yeah, we’ve actually
got what could probably work. So let’s
look at the 3D view.
I mean, that’s that’s not bad, is it? We
have a nice PCB here. Here’s our nice
little LEDs for indicating stuff. We
have our quick connector for connecting
peripherals, our two switches, USBC
socket for connecting up power and data.
We got our RC circuit for the EN pin. We
got a lot of decoupling capacitors.
Can’t have too many of them. Um, the big
capacitor industry would be happy with
the AI doing that. It’s only one input
filtering capacitor, which is
interesting, but maybe that would work.
We are using one of these AMS 117
regulators. Oops. I’d probably choose
something else. Um, we could probably
ask it for something more modern, but it
has actually produced something that is
not an unreasonable starting point. The
only slight downside is that you don’t
really get a schematic. So I think the
latest version of Atapile will actually
start producing schematics. So that
would be really useful. I think the
current version is only compatible with
Keycad 5 um if you want schematics. But
um I think this tool coupled with a a
nice schematic output could actually be
quite useful. I think we’re not far away
from being able to vibe code our own
PCBs. So not bad. I’m starting to enjoy
this uh this brave new AI


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