ESP32 Prototype 2 Production
ESP32 Prototype 2 Production
So the choice was clear, and eventually the ESP32 mostly replaced the
ESP8266.
But, that has all changed in the last few years, with multiple new
models being released starting in 2020.
These new models give you more design flexibility, but they make the
selection process much more challenging, and in fact quite
overwhelming for many.
1) SoC (System on a Chip) - This is the bare ESP32 chip you would
purchase if doing a fully custom design.
When selecting the ESP32 for your project you want to start at the most
fundamental level with the SoC, and then work your way up to the
module, and then the development kit.
Selecting the SoC:
Designing with the SoC is usually only done after you reach a few
hundred thousand production units.
For lower production volumes it’s almost always best to start off using a
pre-certified module.
Although most projects are best off using a module, we’re going to start
by selecting the ESP32 SoC.
The original model of the ESP32 is still available and isn’t yet marked as
not recommended for new designs. But for various reasons it’s not the
version I recommend for most projects.
For years the only decisions you had to make were if you wanted a
single or dual-core version, and choosing the amount of memory
needed, and the package.
But, then lots of new models in the ESP32 family came along with many
significant differences.
They’ve now added the ESP32-S, ESP32-C, and ESP32-H chip families.
The additional options are great to have, but they also drastically
complicate the selection process.
ESP32-S Series:
One of the most desirable features that’s always been missing from the
original ESP32 is USB.
The On-the-Go just means it can switch between the roles of host and
device.
So the S series is faster, more secure, has full-speed USB, more GPIO
pins, and supports more memory than the original ESP32.
Its design arose out of two things: pandemic related supply chain issues
and the popularity of small, low cost IoT products like smart plugs.
The feature that most significantly increases the chip size is the amount
of embedded Flash memory.
The C series uses a RISC processor instead of the processor core used in
all of the previous models.
The C series comes in three versions including the C2, C3, and C6.
It supports both WiFi and Bluetooth 5 but it doesn’t include USB, and
the security features included are minimal.
The C6 version uses the same 160MHz core as the C3, but it has an
additional low-power RISC core that runs at only 20MHz.
The C6 also supports WiFi 6 whereas all of the previous versions we’ve
looked at, including the S series, only support WiFi 4.
Overall, the C series primarily makes sense if you need the smallest
possible chip size at the lowest cost, or perhaps if you need the ZigBee
or Thread support provided with the C6.
ESP32-H Series:
The H2 is an extension of the C series and uses the same RISC processor
core, except it’s only running at 96MHz compared to the 120-160MHz
speeds of the C series.
Once you have the ESP32 SoC selected for your project, you want to
select the best module for your project that uses this SoC.
Fortunately, this part is pretty easy once you’ve selected the chip itself.
The main decision you need to make is whether you want a module
with a built-in PCB antenna, or one with a connector for an external
antenna.
If the internal antenna’s performance meets your requirements then I’d
select a module with a built-in antenna, because this simplifies your
design and the certifications process.
Once you’ve selected the module, it’s now an easy matter to select the
development board (sometimes called a kit) that uses that module.
The development board is just a larger PCB board that brings all of the
I/O out to header pins.
One version only includes a single USB connector that goes through the
USB-to-UART converter circuit and is limited to only 3Mb/s.
Choose the S2 if you only need WiFi. Otherwise, choose the S3 if you
also need Bluetooth or an additional processor core.
For the S series I’d suggest the MINI module versions which come in
both S2 and S3 flavors with either a built-in antenna or a connector for
an external antenna.
Three Stages From Prototype to Production
One of the reasons the ESP32 family is such a great platform for new
product prototyping is that Espressif doesn’t just manufacture the bare
chips.
By sticking with the same microcontroller core all the way from your
early POC prototype through to mass production you can more easily
transition your firmware code between the various stages.
There are three stages to prototyping a new product with the ESP32.
You will progress through these three stages in the opposite order than
you did when you were selecting the best ESP32 model for your project.
So, start with the development kit, then the module, and finally
(maybe) the SoC.
At this stage you will create your early Proof-of-Concept prototype using
an ESP32 development board.
This development board is usually mounted on a breadboard or
solderable proto-board so you can connect it as needed to the other
components.
With this early, and usually quite ugly, prototype the goal is only to test
and prove the functionality.
Due to the use of a large development board and likely an even bigger
breadboard, this early prototype rarely fits in the space required for
your actual product.
Stage #2 – Design your own custom PCB and then solder an ESP32
module directly onto this board.
The two main reasons to use a wireless module instead of a custom SoC
based circuit are:
1) A module reduces design complexity
2) A module reduces certification complexity and costs
The most complex part to design for a custom wireless circuit is the
feedline between the transceiver chip (ESP32) and the antenna or
antenna connector.
Typically, this final stage is only necessary for designs with extreme size
constraints, or once you reach high production volumes and you need
to squeeze out more profit margins.
There are pros and cons to either approach, but here's a brief summary
of considerations when making your choice.
Arduino IDE
Arduino’s IDE main advantage is its portability. If you feel that you will
want to move your application to another platform entirely, Arduino’s
consistency across boards will make that process smoother.
In short, if it works, using the Arduino IDE can speed up the software
development cycle.
See this other article of mine for more details about programming the
ESP32 using the Arduino IDE.
ESP-IDF:
ESP-IDF has the immediate and obvious benefit of being maintained by
Espressif, so it’s most likely to match the ins and outs of the hardware
most closely.
This means any problems you run into are far more likely to be user
error rather than some bug in the library or some hardware
incompatibility that was missed in the Arduino implementation.
Also note that the two options are not mutually exclusive. Arduino
libraries can be brought into an ESP-IDF project, and Arduino’s
implementation attempts to bring in most of ESP-IDF’s features.
Conclusion
Designs based on an ESP32 wireless microcontroller can be as custom
or convenient as your product needs, throughout all the various stages
of development.
It’s a very low-cost solution that has become extremely popular for both
makers and product developers.
Not only is the ESP32 a fantastic option for building an early POC
prototype, but it’s also a great choice for mass manufacturing, whether
you use the module or the bare SoC chip.
Inside you get help from me and other experts and access to dozens of
courses and workshops including my Masterclass.
And you get to connect with lots of other innovators just like you who
are also creating new electronic products.