Archive

Posts Tagged ‘esp32’

Need to Program Many ESP-WROOM-32 / ESP-32S Modules? This Board Should Help

September 18th, 2017 1 comment

We’ve just published an article about a 3D printed jig to program some ESP8266 light bulbs, but as I watched Andreas Spiess’s latest video about ESP32 boards, he showed a board specifically designed to flash firmware to ESP-WROOM-32 or/and ESP-32S modules, which could be useful if you have many to program.

Click to Enlarge

The acrylic base does not appear to be offered by all vendors, as some use some standoffs instead to lift the board up. You just need to insert your compatible ESP32 module in the board, flash the firmware it, take it out, and more to the next module. It can also be used as a development board since it exposes I/Os via three 14-pin headers, comes with a on/off button, reset and program buttons, as well as a micro USB port for power, programming and debugging

I first found it on Banggood, where it is sold for $14.99 shipped, the best price at the time of writing, but you can also purchase it on Amazon, eBay, Aliexpress, and I’m sure other websites. Just search for “ESP32 Test Board Small Batch Burn Fixture”.

Wemos LOLIN32 Lite Board Powered by ESP32 Rev 1 Chip Sells for $4.90

September 14th, 2017 3 comments

Wemos introduced the first low cost ESP32 board with LOLIN32 board going for $6.90 plus shipping in April, but the company is now back with a new Lite version of the board switching ESP-WROOM-32 module with their own design around ESP32 Rev 1 chip (with various silicon bug fixes), and a lower $4.90 price tag to which you need to add ~$2 for shipping.

Click to Enlarge

Wemos LOLIN32 Lite is also smaller, so we’ll lose some of the pins (mostly extra power pins), but the I/Os look the same:

  • SoC – Espressif ESP32-DOWD6Q Rev 1.0 dual core Tensilica Xtensa LX6 processor with WiFi and BLE
  • Connectivity – 802.11 b/g/n WiFi + Bluetooth LE
  • I/Os via 2x 13-pin headers with digital I/Os, analog inputs, UART, I2C, SPI, VP/VN, DAC…
    • 3.3V I/O voltage
    • Breadboard compatible
  • USB – 1x micro USB port for power and programming/debugging
  • Misc – Reset button
  • Power – 5V via micro USB + battery header for Lithium battery (charging current: 500mA max)
  • Dimensions & Weight – TBD

The board sold on Aliexpress is pre-loaded with micropython firmware, but you could also change that to Arduino, or other supported firmware. The Wiki has limited information for now.

Getting Started with Espruino & JavaScript on ESP32 with ESPino32 Board

September 11th, 2017 No comments

Venus Supply Co., Ltd, better known as ThaiEasyElec, is a company based in Thailand, selling embedded systems and development board, as well as providing development services based in Thailand. The company sent me their latest board called ESPino32 powered by Espressif ESP-WROOM-32 WiFi and Bluetooth module for evaluation. While the board is supported in Arduino-esp32, I’ve already tested Arduino with ESP32-Bit module & ESP32-T board, so after checking out the hardware, I’ll load it with something different: Espruino, a firmware allowing for JavaScript programming over the serial console, or a Web based IDE.

ESPino32 Unboxing and Soldering

The board shipped with four female headers, and I/O stickers.

Click to Enlarge

The board includes ESP-WROOM-32, exposes I/Os through four 10-pin headers, features CP2104 chip for serial to USB debugging via micro USB port, two buttons (reset and program), a user LED connected to IO16, and a jumper to select between regulated power supply (micro USB or Vin), or battery power (Vbat).

Click to Enlarge

If you’re going to integrate your board in a project, you may want to use it asif without header to save on space, but for prototyping and use with a breadboard, we should start by soldering the four female headers. It’s even a little easier than with other headers, since you can simply place the board on top of the headers to do the soldering.

Click to Enlarge

Once we’re done, we can apply the stickers on all four headers, which will make it easier to play with while connecting the jumper cables.

Now we can insert the board into a breadboard, connect an external 5V LED through pin 16, and connect a micro USB cable to a computer to get power and access the board.

Click to Enlarge

A board with female headers has the advantage of providing two usable rows on each side of the board. With male-only you’d lose that extra row, unless you use a narrower board such as  ESP32 Pico Core board.

That’s the output I get when connecting the board to my Linux computer:

Quick Start Guide for Espruino on ESP32

Espruino has a page about ESP32 support that explains what is working:

  • onewire
  • hardware SPI
  • hardware I2C
  • DAC
  • ADC
  • Serial
  • WIFI – as a client and access point

and what is not (yet):

  • Over-The-Air (OTA) firmware updates.
  • Bluetooth and BLE

So we can’t play with Bluetooth, but WiFi and GPIO should work. There are also some instructions in that page which I will follow and adapt (since some are not working/out of date) below.

First we need to download the latest version of Espruino, in my case Espruino 1.94.

Espruino Firmware for various board – Click to Enlarge

The zip file includes firmware for all supported platforms include the company’s own Espruino boards & Puck.js, Micro::bit, OlimeXino, Raspberry Pi, STM32 discovery boards, and more..

For our use, we need to get into espruino_1v94_espruino, where we’ll find 3 binary files (bootloader.bin, espruino_esp32.bin, and partitions_espruino.bin), as well as README_flash.txt that explains how to do the update in Windows with flash_download_tools_v3.4.4.zip, or in Linux with esptool.py from the ESP-IDF SDK. I’m running Ubuntu 16.04, so I’ll go with the later, but since most people won’t need to install the ESP-IDF SDK, you can instead get esptool from pip for Python 2.7 or 3.4 or newer:

if you’ve used esptool previously for other esp32/esp8266 board(s) before, you can upgrade esptool with:

In my case, I had installed an older version of esptool (v0.4.6) with apt when I played with NodeMCU board, so I removed it:

Now that we have the latest esptool utility installed, we can flash the image we’ve  just extracted:

It worked the first time. Log of successful installation:

At this point, in theory, you can install Espruino Web IDE chrome extension,  click on the connect icon on the left top corner, select /dev/ttyUSB0 port, and program away.

Click to Enlarge

Espruino Web IDE will also show in Ubuntu 16.04 dash. But in practise, there’s a known issue that the first time you won’t be able to connect through the Web IDE, and indeed I could not.. The work around is to first connect using screen or minicom in a terminal window:

We can then run an hello world sample:

That “=undefined” is a little confusing, but Espruino developers explain that is expected :

This is normal and it indicates the result of the last operation, which in this case is the return value of console.log, which is always undefined.

The next step is to configure a WiFi connection to your access point:

Replace “YOUR_SSID” and “YOUR_SSID_PASSWORD” with the value for your WiFi router. If this is successful, you should  see a message like shortly after:

The line wifi.save() will make sure the WiFi connection is permanent, so the board will reconnect to the router automatically after each reboot.

We can now go back to Espruino Web IDE, click on the Setup icon on the top right corner, go to Communications tab, and input the IP address (192.168.0.112 in my case) in the field “Connect over TCP Address“.

Click to Enlarge

You don’t even need to connect the board to your computer at this stage, if you be powered by a battery, or a USB power adapter. If we click on the Connect icon again, we’ll have the option to select TCP/IP: 192.168.0.112.

Click to Enlarge

I wrote a simply LED blink demo in the right part of the window, and clicked on he Upload button (third button in the middle) to upload and start the program:

Click to Enlarge

D16 is connected both the board’s IO16 LED and the LED on the board. IO16 will be turned on when D16 is low, and my LED when D16 is high every half second. I’ve shot a quick demo below.

However, if you reboot or power cycle the board, your program will not automatically start. So if you want the program to be “permanent”, add save command at the end of your code:

The output from the console should look like when you click on Upload button.

I could turn off and on the board, the LED demo resumed automatically without having to upload the code from the IDE.

Note that at this stage, I started to have some strange issues, like failure to connect to the board, and sometimes it would should “module http not found” or “module wiki not found”, as I wrote code for a web server.

It could be you need include the code for a permanent WiFi connection, before running the save command. It was still working sometimes, but I decided to connect through micro USB cable via Espruino Web IDE (it worked at this stage) to carry on with my tests more reliably.

In case you want to use ESPino32 board as small webserver, you can do so by creating a access point, and returning a simple “hello world” with the following code:

I click on Upload button, and I could access web server from Firefox.

The main advantage of Espruino over the Arduino IDE is that it’s much faster to try your code on the target, since there’s no need to compile a binary, upload to the board, and flash to storage during development. Another advantage depends on your skill set, as if you’re a seasoned web developer with a good knowledge of JavaScript, you won’t need to learn C programming used in Arduino IDE.

For other interface (SPI, I2C, ADC…) and more advanced tasks, you may check Espruino ESP32 page, but be forewarned, as the blink and web server samples did not work for me (unknown variable and missing semi-colon) by default. So you may want to read through the API reference in case the samples do not work. The company behind Espruino, Pur3 Ltd, is likely focusing most of the development efforts of their own hardware platforms like Puck.js and Espruino boards, and there’s more activity for those in the forums. So if you are interested in JavaScript on micro-controllers, but don’t want too many issues, ESP32 may not be best platform to learn, but if you like challenges, go ahead! 🙂

I’d like to thank ThaiEasyElec for sending an ESPino32 board sample. The company sells the board locally and globally for respectively 590 THB / ~$16 plus shipping on their website, where you’ll also find some documentation in English and Thai language. If you are based in Thailand, you can get further discount and free shipping if you purchase through LINE app.

Geekcreit ESP32 Development Board Goes for $4 Shipped (Promo)

September 8th, 2017 11 comments

While you may have thought Wemos Lolin32 board selling for $6.9 plus shipping was already a decent deal, you can now buy a breadboard friendly ESP32 development board for the normal price of ES8266 board thanks to a promotion on Banggood selling 1,000 pieces of “Geekcreit ESP32” board for $4.09 including shipping, and valid until September 10, or while stock lasts.

It looks to be roughly the same design as the fake NodeMCU ESP-32s board I once spotted:

  • Wireless Module – ESP-WROOM-32 with Espressif ESP32 dual core processor with 802.11 b/g/n WiFi and Bluetooth 4.0 LE
  • Expansion – 2x 19 pin headers with GPIOs, Analog inputs (ADC), UART, I2C, VP/VN, etc…; breadboard compatible
  • USB – 1x micro USB port for power and programming
  • Misc – BOOT and EN buttons, red (power) and blue (GPIO2) LEDs
  • Power Supply – 5V via USB or Vin pin
  • Dimensions – 51.4 x 28.3 mm

But instead, it’s made by Doit.am, and called ESP32 Devkit v1. Banggood link to LuaNode Github repo, but you should be able to use anything you want to progrm the board including Arduino Core, Espruino, Micropython, ESP-IDF SDK, etc…

ESPDUINO-32 & Wemos D1 R32 ESP32 Boards Support (Most) Arduino UNO Shields

September 4th, 2017 2 comments

The compact ESP32 NodeMCU like board are great for many project, but in case you plan to leverage your existing Arduino shield, it’s more convenient to have a compatible board. We’ve previously seen Noduino Quantum board sold for 99 RMB on Taobao, and $25.90 on AnalogLamb, but doit.am has designed a cheaper model called ESPDUINO-32 that supports shields compatible with Arduino UNO, and sold for $13.73 on DealExtreme.

ESPDUINO-32 board specifications:

  • Wireless Module – ESP-WROOM-32 based on Espressif ESP32 dual core Tensilica LX6 processor with 802.11 b/g/n WiFi and Bluetooth 4.2 LE
  • Expansion – Arduino UNO headers with SPI, I2C, digital I/Os, 1x analog input up to 3.2V, 5V, GND
  • USB – 1x USB device port
  • Misc – Button
  • Power Supply – 5 to 12V input via DC jack or Vin pin
  • Dimensions – 66 x 53.3 x 13.5 mm

The board can be programmed with the Arduino IDE selecting ESP 32 Dev Module board. You’ll find links to documentation in Smartduino github account. Note that if you have shields using the Analog input they may not work properly since there’s only one input supporting up to 3.2V, as Arduino UNO board support 6 analog inputs up to 5V.

While searching for other sellers for the board, I also came across Wemos “TTGo” D1 R32 going for just over $10 on Banggood, and basically the same specifications as ESPDUINO-32, except it replaces the USB type B receptacle with a micro USB port. Despite the name, the board does not appears to be designed by Wemos, since there’s no mention of it on their Wiki nor Aliexpress store.

A First Look at ESP32 PICO Core Development Board Powered by ESP32-PICO-D4 SiP

August 30th, 2017 11 comments

Last week, I wrote about ESP32-PICO-D4 system-in-package (SiP) that contains ESP32 WiSoC, 4MP SPI flash, a crystal oscilloscator and some passive components in a single 7×7 mm package in order to allow smaller designs based on ESP32. The company noticed the post, and asked me whether I’d be interested in receiving “some development boards based on ESP32 PICO”, an offer hard to refuse :), and within a couple of days I received the package below.

So I  ended up with 10 identical development kits, the company probably thought it was no worth paying for DHL to only send one or two development boards… The boards may also be part of some contests… We’ll see 😉

So let’s take two, and have a closer look at “ESP32_PICO_Core_Board_V3″… It comes with two rows of 20 pins with access to all I/Os, and features three main chips: ESP32-PICO-D4 SiP, AMS1117 voltage regulator, and Silabs CP2102 USB to UART controller for programming and debugging.

Click to Enlarge

There’s also an antenna, a EN and BOOT buttons, and a micro USB port. The board measures 52x20mm. On actual product, the USB bridge part would be there, so you could have something around half size or even much smaller…

Click to Enlarge

… something like the ESP32-PICO-D4 module below whose picture I found on the web.

ESP32-PICO-D4 features are basically the same of ESP32 ones, just more compact, so how does ESP32 PICO Core board compares to other breadboard friendly board based on ESP32? To find out, I compare it to ESP32-T board with ESP32-Bit module, and ESPino32 board with ESP-WROOM-32 module, which I plan to review/play with in about 2 weeks.

ESPino32 vs ESP32 Pico Core vs ESP32-T – Click to Enlarge

ESP32 Pico Core is clearly smaller. Compared to ESP32-T it’s about the same length, but much thinner, and include 2 extra pins, while in terms on functionality it’s more comparable to ESPino32 both with 40-pins, two button, and micro USB port, but the size difference is even greater.

ESP32 Pico Core on Breadboard – Click to Enlarge

If you wonder, the board is breadboard compatible, and since it’s thinner leave two rows of pins free on each side, compared to just one for most boards.

The boards are not for sale right now, and there’s no info on their website about them. You’ll however find some more details in ESP32-PICO-D4 datasheet.

ESP32-PICO-D4 System-in-Package Combines ESP32, 4MB SPI Flash, a Crystal Oscillator, and Passive Components

August 22nd, 2017 1 comment

Espressif Systems has revealed another ESP32 variant, but this time it’s not an SoC, but a 7x7mm system-in-package (SIP) that comes ESP32 dual core processor, a 4MB  SPI flash, a crystal oscillator and various passive components, so that you don’t need to include those in your design, and create an ultra-compact PCB for wearables and other space-constrained applications.

ESP32-PICO-D4 Internal Schematics – Click to Enlarge

ESP32-PICO-D4 SiP specifications:

  • SoC – ESP32 with two Tensilica LX6 cores, 448 KB ROM, 520 KB SRAM (inc. 8KB RTC memory), 1kbit eFuse
  • On-module Flash – 4MB SPI flash
  • Connectivity
    • WiFi – 802.11 b/g/n/e/i (802.11n up to 150 Mbps)
    • Bluetooth – Bluetooth V4.2 BR/EDR and BLE specification; ; class-1, class-2 and class-3 transmitter; Audio: CVSD and SBC
  • SIP Interfaces
    • SD card, UART, SPI, SDIO, LED PWM, Motor PWM, I2S, I2C, IR
    • GPIO, capacitive touch sensor, ADC, DAC, LNA pre-amplifier
  • Sensors –  On-chip Hall sensor & temperature sensor
  • Clock – On-module 40 MHz crystal
  • Power supply – 2.3 ~ 3.6V
  • Operating current – Average: 80 mA
  • Temperature range –  -40°C ~ 85°C
  • Package dimensions –  7.0±0.1 mm x 7.0±0.1 mm x 0.94±0.1 mm

I understand ESP32 supports up to 16MB flash, so future ESP32-PICO-D16 SIP might be possible too. The second schematics in the datasheet shows what a basic board with ESP32-PICO SIP looks like.

ESP32-PICO-D4 Module Peripheral Schematics – Click to Enlarge

The company explains the SiP is particularly suited for any space-limited or battery-operated applications, such as wearable electronics, medical equipment, sensors and other IoT products. Beside the datasheet, there’s currently very little information about ESP32-PICO-D4 on the web, so we’ll have to wait to see what comes out of it.

[Update: Photo of module with ESP32-PICO-D4

]

Via ESP32net Tweet

Single Core ESP32-S0WD WiSoC Datasheet and Price

August 18th, 2017 4 comments

I’m subscribed to Espressif Systems’ notification system so that I received an email each time there’s a documentation update on their website, and this morning they posted ESP32-S0WD Datasheet, the single core version of ESP32 processor, which we reported in our post about ESP32 5×5 packages.

Beside the small 5x5mm 48-pin package, and single Xtensa 32-bit LX6 microprocessor, it looks to be the same as the frequently used ESP32-D0WDQ6 with a 6x6mm 48-pin package. The CPU & Memory part of the datasheet reads:

  • ESP32-S0WD: Xtensa single–core 32-bit LX6 microprocessor, up to 200 DMIPS
  • 448 KB ROM
  • 520 KB SRAM
  • 16 KB SRAM in RTC
  • QSPI flash/SRAM, up to 4 x 16 MB
  • Power supply: 2.3V to 3.6V

While ESP32 datasheet shows a dual core up to 600 MIPS, so maybe the max frequency is also limited. I could not find any ESP32-S0WD module or board just yet, but GridConnect is selling ESP32-S0WD chip for $2.35, ESP32-D0DW(Q6) for $2.75, and ESPD2DW (dual core with 2MB embedded flash) for $3.25.

Click to Enlarge

For comparison, the same site sells ESP8266 for $1.75, so it should mean we should soon get even cheaper ESP32 boards with WiFi and Bluetooth 4.2 LE, but just with less processing power. Note that price should be even lower if you buy in quantity from resellers in China. ESP32-S0WD would be especially suited as an upgrade for products that use both ESP8266 and an external Bluetooth chip, as it would offer a smaller and cheaper solution.