Electronics News Updates

Getting Started With Esp32

Over the last few articles, we have covered the use of ESP8266 boards for building several WiFi based projects. For today’s tutorial, we will look at it’s recently released successor; the ESP32.

GETTING STARTED WITH ESP32

As mentioned in previous tutorials, ESP-12e module popularly referred as the nodeMCU came at a time where makers were struggling with the difficulties around the use of the ESP-01 modules. The ESP-01 modules were not breadboard compatible, had power issues, and could barely be used in a standalone application where more than two GPIOs are required. The NodeMCU solved all these issues adding additional features and it immediately became a darling of the maker community. However, the ESP8266 equally had its own limitations and like every good product, there was a need to improve it. This improvement came in the form of the ESP32.

The ESP32 is way advanced compared to the ESP-12e. Among several features, the ESP32 packs a CPU core, a faster Wi-Fi, more GPIOs (especially increased analog pins that we all desired), supports Bluetooth 4.2 and Bluetooth low energy. The board also comes with touch-sensitive pins, alongside a built-in hall effect and temperature sensors. While both boards are quite cheap, the ESP32 ($6 – $12) costs slightly more than the ESP-12e ($3-$6).

The table below provides a more detailed comparison between the two modules.

Microcontroller
Xtensa Single-core 32-bit L106
Xtensa Dual-Core 32-bit LX6 with 600 DMIPS
Wi-Fi Module
HT20
HT40
Bluetooth Support
X
Bluetooth 4.2 and BLE
Frequency
80 MHz
160 MHz
SRAM Availability
X
Flash Availability
X
GPIO
17
36
Hardware /Software PWM
None / 8 channels
None / 16 channels
SPI/I2C/I2S/UART
2/1/2/2
4/2/2/2
ADC Resolution
10-bit
12-bit
CAN Support
X
Ethernet MAC Interface
X
Touch Sensor
X
Temperature Sensor
X
Hall effect sensor
X
Working Temperature
-40ºC to 125ºC
-40ºC to 125ºC

Today’s tutorial will not only provide a comparison between these boards, but it will also show you how to put the ESP32 board to use. We will look at setting up the ESP32 module for programming with the Arduino IDE and we will run the Arduino blink example on the board. This will allow you to setup all that is needed for the exciting projects we will build with this new board over the next few tutorials.

Required Components

The following components are required for this tutorial;

  1. ESP32 based development board ( I will be using the DOIT DEVKIT V1 board)
  2. Breadboard
  3. Jumper wires.
  4. 100 Ohms resistor
  5. LED

The tutorial should work with any ESP32 based board. The choice of the DOIT DevKIT V1 is as a result of its availability and general popularity.

Schematics

We will connect a LED to the ESP32 such as that the LED blinks as the popular blink example.

Connect the LED to the ESP32 as shown below.

Schematic Getting Started With Esp32

Programming the ESP32

Like the ESP-12e modules and boards, the ESP32 modules and boards can also be programmed with LUA on the ESPlorer IDE or with C/C++ on the Arduino IDE. However, like the ESP8266, we will need to install the ESP32 core and board files on the Arduino IDE before it can be used to upload code to the ESP32.

The process of installing the ESP32 core on the Arduino IDE is similar to the one we followed to install the ESP8266 Arduino Core.  Follow the steps below:

– Open the preferences window from the Arduino IDE. Go to File > Preferences

– On the preferences window, locate the “Additional Board Manager URLs” text box and enter https://dl.espressif.com/dl/package_esp32_index.json into the field as shown below. As you may have other URLs there already, separate the URLs from each other using a comma (“,”) and click OK when done

For More Details: Getting Started With Esp32

Tags

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close