The Doc whom IoT Professionals trust

Schlagwort: ESP32

Reading Time: 2 Minutes


The data sheet of the ESP32 states its electrical characteristics (cf. esp32_datasheet_en.pdf). It specifies the absolute maximum ratings and the recommended ratings of the supply voltage applied to the power supply pins (cf. Conclusion).

Absolute Maximum Ratings

The absolute maximum rating of the voltage applied to the power supply pins VDDA, VDD3P3_RTC, VDD3P3, VDD3P3_CPU, and VDD_SDIO is between a minimum voltage of -0.3 volts and a maximum voltage of 3.6 volts. Please note that a voltage below or above the absolute maximum rating may cause a permanent damage to the ESP32 chip.

SymbolParameterMinMaxUnit
VDDA, VDD3P3_RTC, VDD3P3, VDD3P3_CPU,
and VDD_SDIO
Voltage applied to power supply pins-0.33.6V
Espressif ESP32 Data Sheet (cf. Table 11)

The recommended rating of the voltage applied to the power supply pins VDDA, VDD3P3_RTC, VDD3P3, and VDD_SDIO depends on the presence of a 3.3V flash embedded (cf. Ordering Information):

  • The ESP32 chip with the ordering code ESP32-U4WDH has a 4 MB embedded flash (80 MHz). As a result, the applied voltage is between a minimum voltage of 3.0 volts and a maximum voltage of 3.6 volts with a typical voltage of 3.3 volts.
  • The ESP32 chips with the ordering codes ESP32-D0WD-V3, ESP32-D0WDQ6-V3, ESP32-D0WD, ESP32-D0WDQ6, and ESP32-S0WD have no embedded flash. As a result, the applied voltage is between a minimum voltage of 2.3 volts and a maximum voltage of 3.6 volts with a typical voltage of 3.3 volts.

Be aware in both cases that writing to eFuse, the voltage applied to the power supply pin VDD3P3_RTC should be at least 3.3 volts.

The recommended rating of the voltage applied to the power supply pin VDD3P3_CPU is between a minimum voltage of 1.8 volts and a maximum voltage of 3.6 volts with a typical voltage of 3.3 volts.

SymbolParameterMinTypMaxUnit
VDDA, VDD3P3_RTC, VDD3P3, and VDD_SDIOVoltage applied to power supply pins2.3 / 3.03.33.6V
VDD3P3_CPUVoltage applied to power supply pin1.83.33.6V
Espressif ESP32 Data Sheet (cf. Table 12)

Conclusion

The operating voltage applied to the power supply pins ranges from 1.8 / 2.3 / 3.0 volts to 3.6 volts, where the recommended voltage of the power supply is 3.3 volts. Moreover, the recommended current delivered by external power supply 500 milliampere (or even more).


Release Notes:

  • [2021-09-04] Initial release of the blog post comprising the specifications of the absolute maximum ratings and the recommended ratings of the supply voltage applied to the power supply pins.

Using the SD Card in 1-Bit Mode on the ESP32-CAM from AI-Thinker

Reading Time: 2 Minutes

The ESP32-CAM from AI-Thinker has an on-board connector for micro SD cards:

ESP32 CAM Front-View
Front View (Source)
ESP32 CAM Back-View
Back View (Source)

The ESP32 connects to an SD card via the SDMMC Host Driver, more precisely via slot 1. It is a 4-bit slot and uses the HS2_* signals in the PIN MUX. The following table shows the pin and signal mappings (cf. schematic diagram):

SignalGPIOComment
HS2_CMDGPIO15Exposed
HS2_CLKGPIO14Exposed
HS2_DATA0GPIO02Exposed
HS2_DATA1GPIO04Exposed and also connected to on-board SMD LED
HS2_DATA2GPIO12Exposed
HS2_DATA3GPIO13Exposed
Pin mapping of slot 1 of the ESP32’s SDMMC host peripheral

As shown above, the ESP32-CAM uses the GPIO pins GPIO02, GPIO04, GPIO13 and GPIO15 for reading and writing data to the SD card. To use the SD card in the ‚1-Bit‘ or ‚1-Wire‘ mode, just initialize the SD card with the following code (cf. Espressif Arduino core for the ESP32):

bool begin(const char * mountpoint="/sdcard", bool mode1bit=false); // cf. SD_MMC.h
SD_MMC.begin("/sdcard", true);

By setting the parameter mode1bit to true, the ESP32-CAM just uses the GPIO02 to read and write data to the SD card, which frees up the GPIO pins GPIO04 (HS_DATA1), GPIO12 (HS_DATA2), and GPIO13 (HS_DATA3) as further GPIO pins for input or output. To use one or all of these GPIO pins for input or output, you have to define the GPIO pin accordingly after the initialization of the SD card. Otherwise, the initialization of the SD card would re-configure the GPIO pins again. For instance, the following code snippet configures the GPIO pin GPIO12 as an output pin and sets it to low:

pinMode(12, OUTPUT);
digitalWrite(4, LOW);

Please note that the ESP32-CAM uses the GPIO04 to connect to the on-board flash light as well – the SMD (Surface-Mount Device) LED (Light-Emitting Diode). To prevent the SMD LED from glowing, use the following code:

#include "SD_MMC.h"
#include "SPI.h"

#define BUILTIN_LED 4

void setup() {
    Serial.begin(115200);

    // Initialize the SD card
    if (!SD_MMC.begin("/sdcard", true)){
        Serial.println("Failed to mount SD card");
        return;
    }

    // Specify that LED pin
    pinMode(BUILTIN_LED, OUTPUT);
    digitalWrite(BUILTIN_LED, LOW);

    // Check for an SD card
    uint8_t cardType = SD_MMC.cardType();
    if (cardType == CARD_NONE){
        Serial.println("No SD card attached");
        return;
    }

    // <Put your init code here>
}


void loop() {
  // <Put your main code here, to run repeatedly>
  Serial.println("loop end, 10sec delay");
  delay(10000);
}

© 2024 Dr. Mountain

Theme von Anders NorénHoch ↑