The ESP32… On A Chip

The new hotness in microcontrollers is the ESP32. This chip, developed by Espressif, is the follow-on to the very popular ESP8266, the cheap, low-power, very capable WiFi-enabled microcontroller that came on the scene a few years ago. The ESP32 is another beast entirely with two powerful cores, WiFi and Bluetooth, and peripherals galore. You can even put an NES emulator in there.

While the ESP32 is significantly more powerful, it has for now been contained in modules. What would really be cool is a single chip loaded up with integrated flash, filter caps, a clock, all on a 7x7mm QFN package. Meet the ESP32-Pico-D4 (PDF). It is, effectively, an ESP32 on a chip. It’s just the ticket if you’re trying to cram wireless, fast microcontroller wizardry into a small package.

At its heart, the ESP32-Pico is your normal ESP32 module with a Tensilica dual-core LX6 microcoprocessor, 448 kB of ROM, 520 kB of SRAM,  4 MB of Flash (it can support up to 16 MB), Wireless with 802.11 b/g/n and Bluetooth 4.2, and a cornucopia of peripherals that include an SD card, UART, SPI, SDIO, LED and motor PWM, I2S, I2C, cap touch sensors, and a Hall effect sensor. It’s quite literally everything you could ever want in a microcontroller.

Disregarding the just barely hand-solderable package and the need for a PCB antenna, the ESP32-Pico requires very few support components. Really, the only thing going on in the reference schematic is a bunch of bypass caps. This is, by far, the easiest and smallest method to put WiFi, Bluetooth, and a powerful microcontroller in a project. It will surely be a very, very popular chip for hobbyist electronics for years to come. Of course, it will be even more popular if Espressif also manages to put this chip in a QFP package in addition to the QFN.

Unfortunately, apart from the PDF released by Espressif, the details on the EPS32-on-a-chip are sparse. We don’t know when we’ll be able to get our grubby hands on a tray, tube, or reel of these chips. That said, there’s enough information here to start designing a breakout board. Have at it — we’d love to see what the community comes up with.

Shout out to [Dave] for the tip.

Secret Serial Port for Arduino/ESP32

If you use the Arduino IDE to program the ESP32, you might be interested in [Andreas Spiess’] latest video (see below). In it, he shows an example of using all three ESP32 UARTs from an Arduino program. He calls the third port “secret” although that’s really a misnomer. However, it does require a quick patch to the Arduino library to make it work.

Just gaining access to the additional UARTs isn’t hard. You simply use one of the additional serial port objects available. However, enabling UART 1 causes the ESP32 to crash! The reason is that by default, UART 1 uses the same pins as the ESP32 flash memory.

Luckily, the chip has a matrix switch that can put nearly any logical I/O pin on any physical I/O pin. [Andreas] shows how to modify the code, so that UART 1 maps to unused pins, which makes everything work. it is a simple change, replacing two parameters to a call that — among other things — maps the I/O pins. You could use the technique to relocate the UARTs to other places if you choose.

If you want to learn more about the ESP32, we covered a good set of tutorials for you to check out. Or if you just want a quick overview, you can start here.

ESP32 Display is Worth a Thousand Words

The ESP32 is the successor to the wildly popular ESP8266. There seems to be no end to what the chips can do. However, despite all the wireless communication capabilities, the module doesn’t have a display. [G6EJD] wanted to connect an ILI9341 TFT display and he put the code and information on GitHub. You can also see a video of his work, below.

Since the display uses a serial interface, there isn’t much wiring required. The Adafruit GFX library does the heavy lifting, utilizing the SPI library for the actual communications. The first demo shown on the hardware can pull weather data decoded. If you want more details on the display’s operation, check out [G6EJD’s] YouTube channel and you’ll find other videos that go into more detail.

We’ve seen these displays married to an ESP8266 with an integrated PCB, too. There’s a choice of libraries, and perhaps we’ll see a similar range of choice for the ESP32.

Continue reading “ESP32 Display is Worth a Thousand Words”

ESP32 Mini Robot Packs Sensors and 4WD

[Stefan]’s Mini WiFi/BLE 4WD robot platform (seen next to a matchbox above) packs an impressive capability into a tiny rover. It’s based on a SparkFun ESP32 Thing, a very compact way to add wireless control to your project. Compare it to some giant old UNO with a WiFi shield, these boards are small but powerful, as well as an easy adoption for Arduino fans.

[Stefan] beefed up the robot with a BNO055 module to determine orientation, an APDS-9930 proximity sensor, as well as four CNY70 IR proximity sensors on the bottom, used for line-following. A pair of 6 V motors move the robot, with a DC-DC step up converter boosting the LiPo’s 3.7 V. It’s impressive how many components [Stefan] crammed inside the shell; they’re all packed in there snugly.

The concept behind the robot is that it’s a generic platform that could be customized as needed, and [Stefan] has versions with a LEGO dart gun as well as a camera. The robot’s code resides on GitHub and the custom 3D-printed chassis is up on Thingiverse.

If you like ESP32 projects you should be sure to check out the Monster Board and the Hamster Tracker we posted recently.

Hackaday Prize Entry: ESP32 Monster and Getting Started Quickly

Prolific hacker [kodera2t] is working on his own “ESP32 monster board” dev board for the still-newish ESP32 WiFi module. His board has everything: Ethernet, OLED, LiPo, and even CAN-bus. But all that peripheral connectivity is worth nothing if you can’t program the microcontroller to use it.

The Arduino environment for the ESP32 is coming along quite nicely, but it’s not yet fully featured enough to run all of [kodera2t]’s hardware. To take advantage of all that, he needs to use Espressif’s SDK — called the “IoT Development Framework” or IDF for short. In his latest project log, [kodera2t] goes through everything necessary to get the IDF up and compiling on OSX. (It’s strangely similar to the Linux procedure.) Read through the official instructions here, if you want more, but we think [kodera2t] hits all the high points.

While we’re tooting [kodera2t]’s horn, check out his old project — an Arduino shoehorned into an SD card — or watch his alter-ego [Toshiro Kodera] give a serious talk about his day job, engineering radio-frequency meta-materials.

ESP32 Hamster Wheel Tracker Tweets Workout Stats

Even with all the hamster wheel trackers out there (and on this site) there’s room for improvement. [Bogdan] upgraded his hamster wheel from an Arduino and datalogging shield to an ESP32, and unleashed some new capabilities one does not ordinarily associate with hamster wheels.

[Bogdan]’s project logs distance in feet, duration of current session in time, RPM, overall revolutions, speed in MPH, and overall number of sessions, as well as a couple of system monitoring stats. It also tracks multiple wheels, as [Piontek] (the hamster) has two. However, thanks to the ESP32, [Bogdan]’s wheel tracker tweets its stats and updates a ThingSpeak dashboard with [Piontek]’s workouts.

In addition to its functionality, [Bogdan] made a point to make the project look and feel FINISHED. He designed custom 3D parts including a front plate, hooks for attaching the control box to the cage, and mounts for attaching the sensor to the wheel.

Continue reading “ESP32 Hamster Wheel Tracker Tweets Workout Stats”

Arduino Cinque – The RISC-V, ESP32, WiFi, Bluetooth Arduino

This weekend at the Bay Area Maker Faire, Arduino in conjunction with SiFive, a fabless provider of the Open Source RISC-V micros, introduced the Arduino Cinque. This is a board running one of the fastest microcontrollers available, and as an added bonus, this board includes Espressif’s ESP32, another wonderchip that features WiFi and Bluetooth alongside a very, very powerful SoC.

Details on the Arduino Cinque are slim at the moment, but from what we’ve seen so far, the Cinque is an impressively powerful board featuring the RISC-V FE310 SoC from SiFive, an ESP32, and an STM32F103. The STM32 appears to be dedicated to providing the board with USB to UART translation, something the first RISC-V compatible Arduino solved with an FTDI chip. Using an FTDI chip is, of course, a questionable design decision when building a capital ‘O’ Open microcontroller platform, and we’re glad SiFive and Arduino found a better solution. It’s unknown if this STM32 can be used alongside the FE310 and ESP32 at this point.

We’ve taken a look at SiFive’s FE310 SoC, and it is an extremely capable chip. It was released first at the HiFive1, and our hands-on testing revealed this is a chip that outperforms the current performance champ of the Arduino world, the Teensy 3.6. Of course, with any new architecture, there will be a few problems porting the vast number of libraries over to the FE310, but SiFive has included an Arduino compatible SDK. It’s promising, and we can’t wait to see SiFive’s work in more boards.