Welcome to Hong Kong Bitfoic Electronics Co., Ltd
Home > Components >Development Board ESP32: ESP32 Wi-Fi, Bluetooth module and How to set it up?

Development Board ESP32: ESP32 Wi-Fi, Bluetooth module and How to set it up?

5/24/2023

Introduction

 

ESP32, like Arduino, is a development board. That means it has all the features you need to create your projects. In this article, you will learn about the ESP32 Wi-Fi and Bluetooth module and how to set it up. Besides, you can know about what it is and how it works and what are its special features.

 

Catalog

 

 

What is ESP32?

 

The ESP8266 Wi-Fi module is one of the most popular and useful modules of the past few years. Various versions of such modules are available on the market.

The ESP32 module is an upgraded version of the ESP8266. In addition to the Wi-Fi module, this module also contains a Bluetooth 4.0 module. With a dual-core CPU operating at 80 to 240 MHz, containing two Wi-Fi and Bluetooth modules and various input and output pins, the ESP32 is ideal for IoT projects.

 

The small ESP32 package has a high level of integrations such as:

  • Antenna switches
  • Balun to control RF
  • Power amplifier
  • Low noise reception amplifier
  • Filters and power management modules

On top of all that, it achieves very low power consumption through power-saving features including clock synchronization and multiple modes of operation. The ESP32 chip’s quiescent current is less than 5 μA which makes it the ideal tool for your battery-powered projects or IoT applications.

 

Figure1-ESP32

Figure1-ESP32

 

 

 

 ESP32 Architectural Block Diagram

 

 

Figure2-ESP32 Architectural Block diagram

 

Figure2-ESP32 Architectural Block diagram

 

 

 

 

 ESP32  Pinout

 Figure3-ESP32  pinout

 

Figure3-ESP32  pinout

 

 

Although the ESP32 has fewer pin counts than commonly used processors, you won't have any problems multiplexing multiple functions on the pins.

WARNING: The voltage level on the ESP32 pins is 3.3 volts. If you want to interface the ESP32 to other devices that operate on 5 volts, you should use a level shifter to convert the voltage levels.

 

  • Power Pins: The module has two power pins - 5V and 3.3V. You can use these two pins to power other devices and modules.

 

Figure4-Power Pins

Figure4-Power Pins

 

  • GND pin: There are 3 pins for the ground of this module.
  • Enable Pin (EN): This pin is used to enable and disable the module. A high level on the pin allows for the module and a low level disables the module.
  • Input/Output Pins (GPIO): You can use 32 GPIO pins to communicate with LEDs, switches, and other I/O devices.

 

You can pull up or pull down these pins internally. Note: GPIO6 to GPIO11 pins (SCK/CLK, SDO/SD0, SDI/SD1, SHD/SD2, SWP/SD3, and SCS/CMD pins) are used for SPI communication of the internal flash memory of the module, and we do not recommend using them.

 

  • ADC: You can use the 16 ADC pins on this module to convert an analog voltage (the output of some sensors) to a digital voltage. Some of these converters are connected to internal amplifiers and are capable of measuring small voltages with high accuracy.
  • DAC: The ESP32 module has two digital-to-analog converters with 8-bit precision.
  • Touchpads: There are 10 pins on the ESP32 module, which are sensitive to capacitance changes. You can connect these pins to some pads (pads on the PCB) and use them as touch switches.
  • SPI: There are two SPI interfaces on this module, which can be used to connect the display screen, SD/microSD memory card module, external flash memory, etc.
  • I2C: SDA and SCL pins are used for I2C communication.
  • Serial communication (UART): There are two UART serial interfaces on the module. Using these pins, you can transfer up to 5Mbps between two devices. UART0 also has CTS and RTS controls.
  • PWM: Almost all ESP32 input/output pins can be used for PWM (Pulse Width Modulation). Use these pins to control motors, LED lights, colors, etc.

 

 

Ⅳ ESP32 Module Mode

 

ESP32 module mode ESP32 chip has 5 modes:

  • Active Mode: In this mode, all parts of the Wi-Fi and Bluetooth transmitter and receiver are active. In this case, the current draw is between 80 and 260 mA.
  • Modem Sleep Mode: The processor is still active, but Wi-Fi and Bluetooth are disabled. In this case, the current consumption is between 3 and 20mA.
  • Light sleep mode: The central processor stops working, but the RTC unit and ULP processor unit are still active. The current consumption is about 0.8 mA.
  • Deep sleep mode: only the RTC unit is active. In this case, the data for Wi-Fi and Bluetooth communication is stored in the memory of the RTC. In this mode, the current consumption is between 10 and 150µA.
  • Sleep Mode: All units are disabled except the RTC timer used for the clock and some I/O pins connected to RTC. An RTC timer or a connected pin can wake up the chip from this state. In this case, the current consumption is about 2.5µA. See the module datasheet for more information.

 

 

 ESP32 PDF

 

ESP32 Technical Datasheet

ESP32 Technical Reference Manual

 

ESP32 VS. ESP8266

 

There are various types of ESP32 and ESP8266 modules available in the market. In this section, ESP8266 NodeMcu and ESP32 DEV modules are compared: ESP8266 NodeMcu ESP32 DEV Module Power Supply 3.3V 3.3VCPU Tensilica L106 32-bit Xtensa Dual Core 32-bit LX6 Bluetooth None Complies with Bluetooth v4.2 BR/EDR and BLE Specifications GPIO1732 Flash Size Max 16MB Max 16MADC 10bit 12bit DAC No 2*8bitUART22 Usually, ESP32 modules are more expensive than ESP8266. So if you don't need Bluetooth, digitizers, lots of I/O pins, and... you can save money by buying an ESP8266 module.

 

Required Materials

  • ESP32 module
  • Arduino IDE

Figure5-ESP32 module

 

 

Ⅶ How to Install ESP32 on Arduino IDE?

 

The installation process for the ESP32 is almost the same as for the ESP8266. To install ESP32 on Arduino IDE, follow these steps:

NOTE: You need Arduino IDE 1.8.5 or higher to install the ESP32 on it.

 

Step 1: Download the required files from GitHub

Download the ESP32 Arduino Core from your GitHub account.

 

Step 2: Move the file to the Arduino sketchbook location

By default, the Arduino sketchbook is located in "My Documents". To find the exact path to the schematic, check the preferences from the File menu.

 

Figure6-Move the file to the Arduino sketchbook location

Figure6-Move the file to the Arduino sketchbook location

 

 

Create a new folder called hardware next to the Arduino folder in the sketchbook location.

 

 

Figure7-new folder

 

 

Inside the hardware folder create a folder called espressif, then inside the espressif folder create another folder called esp32. In the end, the path you created should look like the image below:

 

Figure8-espressif

 

 

Unzip the file you downloaded in the previous step and move it to this address.

 

 

Figure9-Unzip the file

 

 

Step 3: Run get.exe

To install the ESP32 on the Arduino software, you need to have the Xtensa GNU compiler collection installed on your system. Go to esp32>tools and run the get.exe file.

Figure10-Run get.exe

 

After running get.exe, the required files will be automatically downloaded and transferred to the tools folder. This step may take some time.

 

 

 

Figure11-tools folder

 

 

After the installation is complete, new files must be added to the tools folder.

 

 

Figure12-new files

 

 

Uploading code on ESP32 using the Arduino IDE Uploading code on the ESP32 module is similar to other Arduino development boards. You can use the Arduino built-in examples such as Blink to test it. Note: If you have not installed the CP2102 driver on your computer before, you should download it from here, and then install it. To upload code, select the board type from the Tools menu. Then select the serial port connected to the board and click upload.

 

 

 

Figure13-Uploading code

 

 

Figure14-Uploading code

 

 

 

Troubleshooting

 

Don't worry if you encounter the following errors. This problem usually occurs when programming the ESP32. Perform the following steps to resolve the issue:

 

Figure15-Troubleshooting

 

 

  1. Make sure the upload baud rate is set correctly. Typically, this baud rate should be 115200.

 

 

 

Figure16-baud rate

 

 

 

  1. Press and hold the Boot button on the development board.
  2. Click the Upload option.
  3. When you see the message "Writing at 0x00001000 … (100%)", take your finger off the "Boot" button.

 

 

 

Figure17-Boot

 

 

How to select an ESP32 development board?

 

Before selecting an ESP32 development board, you need to take into account certain aspects:

  • Pin numbers and configuration: it is important to have access to the board’s pinout in order to make correct use of it.
  • Serial -USB interface and voltage regulator: These two features are found in practically all development boards. These are the ones that allow the board to be connected directly to the computer to be energized and programmed.
  • Battery connector: if you are thinking of venturing into low-consumption systems with batteries, you can opt for boards that already include battery connectors.
  • Extra functions: many development boards for ESP32 come with extra features such as cameras, OLED displays, LoRa modules, etc.

 

 

 

 Other ESP32 Development Boards and Specialty Projects

 

There are other development boards with particular characteristics that can be useful in more specific projects:

  • ESP32-CAM: it is a development board based on ESP32 that has a camera, microSD card slot, and several GPIOs.
  • TTGO T-Call ESP32 with SIM800L GSM / GPRS: development board that combines an ESP32 module with one SIM800L GSM / GPRS.
  • M5Stack: it is a very economical development board that has a 2-inch color LCD display, a nice housing, a USB type C connector for programming and power, I2C connectivity, and a group of GIPOs pins to connect it to all kinds of devices. .
  • ESP-EYE: is a development board for image recognition and audio processing, which can be used in various IoT applications. It has an ESP32 chip, a 2-megapixel camera, and a microphone. ESP-EYE offers a lot of storage, with 8 Mbyte of SRAM and 4 Mbyte of flash memory. It also supports image transmission over Wi-Fi and debugging through a Micro-USB port.

 

Frequently Asked Questions
1. What does an ESP32 do?
2. Is ESP32 a microcontroller or a microprocessor?
3. Why ESP32 is better than Arduino?
4. Is ESP32 more powerful than Arduino?
5. Is ESP32 professional?
6. Is ESP32 Wi-Fi or data rate?
logo
Bitfoic is a professional electronic components distributor founded in 2013. Adhering to our business philosophy of customer first and people-oriented, we have won the favor of our customers and established an excellent reputation in international Partner.
Related Articles
  • How to resolve the WiFi and ADC2 Sharing Dilemma?
    How to resolve the WiFi and ADC2 Sharing Dilemma?
    4/19/2024 22

    ESP32-CAM can be used in various Internet of Things situations and is suitable for home smart devices, industrial wireless control, wireless Monitoring, QR wireless identification, wireless positioning system signals, and other IoT applications are ideal solutions for IoT applications.

    Read More >
  • ESP32-CAM Pinout Explanation and How to Use?
    ESP32-CAM Pinout Explanation and How to Use?
    4/18/2024 43

    ESP32-CAM is a development board with an ESP32-S chip, an OV2640 camera, a microSD card slot, and several GPIOs for connecting peripherals. ESP32-CAM is a small-sized camera module. The module can work independently as the smallest system, with a size of only 27*40.5*4.5mm.

    Read More >
  • Stand-Alone Linear Li-Ion / Li-Polymer Charge Management Controller MCP73833
    Stand-Alone Linear Li-Ion / Li-Polymer Charge Management Controller MCP73833
    4/9/2024 60

    The MCP73833/4 is a highly advanced linear charge management controller for use in space-limited, cost sensitive applications. Both a 10-lead, MSOP and a 10-lead, DFN packaging measuring 3 mm by 3 mm are offered for the MCP73833/4. In addition to its tiny size, the MCP73833/4 is perfect for portable applications because it requires a few additional components.

    Read More >
  • Optocoupler IC 4N35: Pinout, Datasheet, Features and Applications
    Optocoupler IC 4N35: Pinout, Datasheet, Features and Applications
    3/26/2024 97

    In the realm of electronics, where connectivity and isolation are paramount, the 4N35 optocoupler IC stands as a beacon of reliability and versatility. This small yet mighty device plays a crucial role in ensuring signal integrity and safety across a wide range of applications. In this article, we delve into the intricacies of the 4N35 optocoupler IC, exploring its datasheet, pinout, circuit diagram, and diverse uses.

    Read More >
  • UA741CP datasheet ,Specification, Features and Application
    UA741CP datasheet ,Specification, Features and Application
    3/21/2024 98

    The UA741CP is a general-purpose operational amplifier in an 8-pin DIP package. The high common-mode input voltage range and lack of latch-up make the amplifier ideal for voltage follower applications.

    Read More >
Espressif Systems
In Stock: N/A
Popular parts number