This post is also available as a video:
I’ve been designing an ESP32-based PCB recently, and I got to thinking - what’s the minimum you can get away with and still have a working module?
The ESP32 S3 WROOM module is particularly interesting. It only needs a few components to make a complete fully functioning dev board.
What’s nice about the S3 modules is that you don’t need to have a USB-UART bridge chip - you can connect it directly to the USB data lines.
But just how minimal can we make things and still have something that works?
Let’s have a look at the recommended schematic and see what we can chop out and what is required.
Something we definitely can’t do without is a ground connection, there are annoyingly two ground pins. We could probably just connect one, but I’ll hook up both to begin with.
We’re also going to need 3.3 volts. Unfortunately, for this, we will need an external component - a voltage regulator - we get 5V out from the USB connection and if we use that directly it will fry our ESP32 (the ESP32 can take anything between 3.0 and 3.6 volts).
I’ve got a handy module that has an AMS117 3.3V regulator along with the required decoupling capacitors. So I’m just going to use that initially.
If we wanted to go even more minimal we could just drop the voltage over a few diodes to get it down to a safe level. Three diodes in series would get us down to around 3.2 volts which would be acceptable for an ESP32.
If it was a low-power device we could get away with a zener diode or even a resistor divider.
But the ESP32 can spike up to a lot of power - especially when you are using WiFi or Bluetooth.
Given that we’ve got some capacitors on the regulator board and we’re going to play fast and loose with this proof of concept, I’m crossing out the decoupling caps from the schematic.
For the enable pin we can just connect it directly to 3.3v. So we can ignore this little RC circuit. The recommended values are 10K and 1uF and it’s intended to stop the ESP32 from running until the supply voltage is stabilised.
Since we’re connecting directly to 3.3V we can also do away with the push button for resetting the device.
We can drop the crystal and capacitors - this is only required if you want to use an external oscillator for keeping accurate time in deep sleep.
The last thing we need is the data lines for the USB.
On the schematic there are a couple of zero-ohm resistors - so we can just ignore those.
There are also a couple of capacitors - these are optional, they can help with very noisy signals, but they aren’t required. So we’ll get rid of them as well.
IO19 goes to the D- pin and IO20 goes to the D+ pin.
If you’re using a brand new fresh module, you may need to connect IO0 to ground to manually put the ESP32 into download mode.
My experience is that you only need to do this the first time you program the module. However, your mileage may vary - it does seem to be quite fussy and the internet is full of people complaining that they can’t program their modules.
We can cross out this connection from the exposed pad to the ground - this is completely optional. It can help with heat dissipation from the module, but it’s not required.
I invariably get people commenting about how I’ve forgotten to solder this pad. So here it is direct from the datasheet:
And finally, we can cross out the UART connector - we’ll get our serial output over the USB connection. And we don’t need to use JTAG debugging, so that can go as well.
We’ve ended up crossing out a lot of the schematic.
If we just draw what’s left we end up with this considerably simpler schematic.
I’ve soldered some jumper wires to an ESP32-S3 module and hooked it up to a USB breakout board.
And… it’s flashing the LED! I was able to upload the blink sketch and it’s working perfectly.
The serial port is also working - though I did need to add these preprocessor definitions to get that working (I’m using PlatformIO - I’m assuming when using the ArduinoIDE this is not needed):
Now, at this point, most sensible people would call it a day - we’ve proved a point, we’ve shown you don’t need many components - very cool.
But not me, I got to thinking - there’s a surprising amount of space on the back of the module - we could probably fit the USB socket and the voltage regulator on it.
The circuit is not very complicated, how hard can it be? It’s just a few wires, surely we can hook everything up with small bits of wire and glue it all in place.
I covered up the EPAD with Kapton tape so nothing would get shorted and tried supergluing the components in place.
This kind of worked, but I struggled with the USB connector - firstly it just would not stick. And secondly getting in to solder the tiny pins just proved to be impossible for me.
So I decided to swallow some pride and glued a USB breakout board in its place. This was a lot easier to solder the wires onto and it’s still pretty compact.
For the piece de resistance I added an LED to one of the more accessible pins.
It’s not pretty - the wires could be made much shorter and it’s a bit of a mess of solder and flux.
But, it works! We can run our little blink sketch - amazing!
Would I do this again - probably not - but it was fun to try and see what was possible. There are also mini versions of the ESP32-S3 module. Not sure I’m quite up for that challenge though!