Pines GPIO de ESP32 DEVKIT

Pines GPIO de ESP32 DEVKIT Como se mencionó anteriormente, el chip utilizado con esta placa tiene 48 pines GPIO, pero no

Views 311 Downloads 4 File size 295KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

Pines GPIO de ESP32 DEVKIT Como se mencionó anteriormente, el chip utilizado con esta placa tiene 48 pines GPIO, pero no se puede acceder a todos los pines a través de las placas de desarrollo. ESP32 devkit tiene 36 pines y 18 en cada lado de la placa como se muestra en la imagen de arriba. Tiene 34 pines GPIO y cada pin tiene múltiples funcionalidades que se pueden configurar mediante registros específicos. Hay muchos tipos de GPIO disponibles, como entrada digital, salida digital, entrada analógica y salida analógica, táctil capacitiva, comunicación UART y muchas otras características mencionadas anteriormente.

pines GPIO de entrada digital Tiene seis pines GPIO que pueden usarse solo como pines de entrada digital. No se pueden configurar como pines de salida digital. No tienen resistencias push pull conectadas internamente. Solo se pueden usar como pines de entrada digital.

     

GPIO34 GPIO35 GPIO36 GPIO37 GPIO38 GPIO39

Consulte este tutorial:   Cómo

usar el botón pulsador con ESP32

Convertidor analógico a digital o pines GPIO analógico Esta placa de desarrollo admite  18 canales ADC . Y cada canal es de 12 bits. Entonces tiene una buena resolución. Se puede utilizar para medir voltaje analógico, corriente y cualquier sensor analógico que proporcione salida en forma de voltaje analógico. Estos ADC también se pueden usar en modo de suspensión para reducir el consumo de energía. Cada canal ADC tiene una resolución de 12 bits que es igual a      3.3 / 4095 donde 3.3 voltios es un voltaje de referencia y 4095 es un paso mínimo por ADC Entonces, el voltaje mínimo que podemos medir con estos canales ADC es de aproximadamente 80 microvoltios. Cualquier cosa menos que esto será un error. Hablaré más sobre esto en los próximos tutoriales. El principal inconveniente de ESP32 ADC es que tiene un comportamiento no lineal. Puedes consultar el siguiente diagrama:

El mapeo de pines analógicos con pines GPIO se muestra a continuación: ADC1_CH0 - GPIO36 ADC1_CH1 - GPIO37 ADC1_CH2 - GPIO38 ADC1_CH3 - GPIO39 ADC1_CH4 - GPIO32 ADC1_CH5- GPIO33 ADC1_CH6 - GPIO34 ADC1_CH7 - GPIO35 ADC2_CH0 - GPIO4 ADC2_CH1 - GPIO0 ADC2_CH2 - GPIO2 ADC2_CH3 - GPIO15 ADC2_CH4 - GPIO13 ADC2_CH5 - GPIO12 ADC2_CH6 - GPIO14 ADC2_CH7 - GPIO27 ADC2_CH8 - GPIO25 ADC2_CH9 - GPIO26 Consulte este tutorial:   Cómo usar ADC de ESP32                    

Pines del convertidor digital a analógico

Esta placa de desarrollo tiene dos DAC integrados de 8 bits integrados  . Los DAC se utilizan para convertir señales digitales en señales analógicas. DAC tiene muchas aplicaciones como control de voltaje y control PWM.  DAC_1 - GPIO25  DAC_2 - GPIO26 LEA      ESP32-WROOM-32 (ESP-WROOM-32)

Toque los pines del sensor de Devkit ESP-WROOM-32 proporciona a bordo  10 sensores táctiles capacitivos . Por lo tanto, no necesita usar sensores táctiles separados en su proyecto cuando usa esta placa de desarrollo. Estos sensores táctiles capacitivos se pueden usar para detectar cualquier onda eléctrica y magnética alrededor, como la detección de campo magnético. Puede usar una pequeña variedad de pads en lugar de botones con estos sensores táctiles.  TOUCH0 - GPIO4  TOUCH1 - GPIO0  TOUCH2 - GPIO2  TOUCH3 - GPIO15  TOUCH4 - GPIO13  TOUCH5 - GPIO12  TOUCH6 - GPIO14  TOUCH7 - GPIO27  TOUCH8 - GPIO33  TOUCH9 - GPIO32 ¿Cómo usar los pines táctiles y cómo usar los pines táctiles como un botón digital?  

Pines de interfaz de la tarjeta de memoria También es compatible con la interfaz de la tarjeta de memoria a través de estos pines.      

HS2_CLK - MTMS HS2_CMD - MTDO HS2_DATA0 - GPIO2 HS2_DATA1 - GPIO4 HS2_DATA2 - MTDI HS2_DATA3 - MTCK

Pines de interrupción externos

Todos los pines de entrada y salida de uso general se pueden usar como interrupción externa. Las interrupciones externas son muy útiles. Cuando desee monitorear el cambio en cualquier pin, puede usar este pin como una interrupción en lugar de monitorear repetidamente el estado de este pin.

Pines GPIO PWM Todos los pines de entrada y salida de uso general se pueden usar para generar PWM, excepto los pines de entrada digital de los pines  GPIO 34-39 . Porque estos pines no pueden usarse como pines de salida digital. Las señales PWM son señales de salida digital. La frecuencia máxima de estos pines PWM es de 80 MHz. Puede configurar cualquier otro pin como un pin PWM siguiendo estos pasos:  Seleccione una frecuencia para la modulación de ancho de pulso.  Seleccione el ciclo de trabajo o el ancho de pulso.  Seleccione el canal PWM. ESP32 proporciona 16 canales PWM.  Asigne un pin digital para seleccionar el canal PWM. Guía paso a paso completa sobre ESP32 PWM con ejemplos  

Función de control de motor PWM También es compatible con la función de control del motor a través de registros internos del chip ESP32. solo necesita configurar estos registros con cualquier pin GPIO. Puede encontrar más información sobre estos registros en la hoja de datos. Los nombres de los registros se dan a continuación:       

PWM1_OUT_IN0 ~ 2 PWM0_FLT_IN0 ~ 2 PWM1_FLT_IN0 ~ 2 PWM0_CAP_IN0 ~ 2 PWM1_CAP_IN0 ~ 2 PWM0_SYNC_IN0 ~ 2 PWM1_SYNC_IN0 ~ 2

LEER      Tutoriales ESP32

Pines de comunicación I2C Tiene pines dedicados disponibles para la comunicación I2C de dos hilos. Se usa un pin para la transferencia de datos y otro pin para la sincronización del reloj.

 GPIO21  es pin SDA.  GPIO22  es pin SCL. Hemos publicado un artículo sobre la interfaz LCD I2C con ESP32. Esta publicación explica cómo usar los pines I2C. Puedes leer el artículo completo: 

Interfaz LCD I2C con ESP32

Pines RTC de ESP32 devKit Esta placa también proporciona  pines RTC  que se pueden usar para activar ESP32 desde el modo de suspensión.  RTC_GPIO0 - GPIO36  RTC_GPIO3 -GPIO39  RTC_GPIO4 - GPIO34  RTC_GPIO5 - GPIO35  RTC_GPIO6 - GPIO25  RTC_GPIO7 -GPIO26  RTC_GPIO8 - GPIO33  RTC_GPIO9 - GPIO32  RTC_GPIO10 -GPIO4  RTC_GPIO11 - GPIO0  RTC_GPIO12 - GPIO2  RTC_GPIO13 - GPIO15  RTC_GPIO14 - GPIO13  RTC_GPIO15 - GPIO12  RTC_GPIO16 - GPIO14  RTC_GPIO17 - GPIO27

Pasador sensor Hall Una guía completa sobre  cómo usar el sensor de efecto Hall incorporado de ESP32 También tiene un sensor de pasillo que se utiliza para detectar el campo magnético. Cada vez que complace esta placa de desarrollo en el campo magnético, ESP32 genera un pequeño voltaje que se puede medir con cualquier pin. Publicaré un tutorial en los próximos artículos. Otras características de la placa de desarrollo ESP32 y los pines se muestran en la imagen de arriba. 

esp32 devkit v1 pinout Posted date: June 12, 2019 In: Pinouts | Tags: devkit, esp32, pinouts

GPIO pins of ESP32 DEVKIT As mentioned earlier, the chip used with this board has 48 GPIO pins, but all pins are not accessible through development boards. ESP32 devkit has 36 pins and 18 on each side of the board as shown in the picture above. It has 34 GPIO pins and each pin has multiple functionalities which can be configured using specific registers.  There are many types of GPIOs available like digital input, digital output, analog input, and analog output, capacitive touch, UART communication and many other features mentioned above.

digital input GPIO pins It has six GPIO pins which can be used as digital input pins only. They cannot be configured as digital output pins. They do not have internally connected push pull resistors. They can only be used as digital input pins.

     

GPIO34 GPIO35 GPIO36 GPIO37 GPIO38 GPIO39

Check this tutorial:  How

to use push button with ESP32

Analog to digital converter or Analog GPIO pins This development board supports 18 ADC channels. And each channel is of 12 bits. So it has a good resolution. It can be used to measure analog voltage, current and any analog sensor which provides output in the form of analog voltage. These ADCs can also be used in sleep mode for lower power consumption. Each ADC channel has a resolution of 12 bits which is equal to      3.3 / 4095 where 3.3 volt is a reference voltage and  4095 is minimum step by ADC So the minimum voltage, we can measure with these ADC channels is about 80 microvolt. Anything less than this will be an error. I will talk more about it in coming tutorials.  The major drawback of ESP32 ADC is that it has a nonlinear behavior.  you can check the diagram below:

Mapping of Analog pins with GPIO pins is shown below: ADC1_CH0 – GPIO36 ADC1_CH1 – GPIO37 ADC1_CH2 – GPIO38 ADC1_CH3 – GPIO39 ADC1_CH4 – GPIO32 ADC1_CH5-  GPIO33 ADC1_CH6 – GPIO34 ADC1_CH7 – GPIO35 ADC2_CH0 – GPIO4 ADC2_CH1 – GPIO0 ADC2_CH2 – GPIO2 ADC2_CH3 – GPIO15 ADC2_CH4 – GPIO13 ADC2_CH5 – GPIO12 ADC2_CH6 – GPIO14 ADC2_CH7 – GPIO27 ADC2_CH8 – GPIO25 ADC2_CH9 – GPIO26 Check this tutorial :  How to use ADC of ESP32                    

Digital to analog converter pins

This development board has two onboard integrated 8-bit DAC.  DACs are used to convert digital signals into analog signals. DACs has many applications like voltage control and PWM control.  DAC_1 –  GPIO25  DAC_2 – GPIO26

READ    ESP32-WROOM-32 (ESP-WROOM-32)

Touch sensor pins of Devkit ESP-WROOM-32 provide on board 10 capacitive touch sensors. So you don’t need to use separate touch sensors in your project when you are using this development board. These capacitive touch sensors can be used to detect any electrical and magnetic waves around like magnetic field detection. You can use a small array of pads instead of push buttons with these touch sensors.  TOUCH0 – GPIO4  TOUCH1 – GPIO0  TOUCH2 – GPIO2  TOUCH3 – GPIO15  TOUCH4 – GPIO13  TOUCH5 – GPIO12  TOUCH6 – GPIO14  TOUCH7 – GPIO27  TOUCH8 – GPIO33  TOUCH9 – GPIO32 How to use touch pins and how to use touch pins as a digital button?  

Memory card interfacing pins It also supports memory card interfacing through these pins.      

HS2_CLK – MTMS HS2_CMD – MTDO HS2_DATA0 – GPIO2 HS2_DATA1 – GPIO4 HS2_DATA2 – MTDI HS2_DATA3 – MTCK

External interrupt pins All general purpose input output pins can be used as external interrupt. External interrupts are very useful. When you want to monitor change across any pin, you

can use this pin as an interrupt instead of repeatedly monitoring the state of this pin.

PWM GPIO pins All general purpose input output pins can be used to generate PWM except digital input pins from GPIO pins 34-39. Because these pins cannot be used as digital output pins. PWM signals are digital output signals. The maximum frequency of these PWM pins is 80 MHz.  you can configure any other pin as a PWM pin by following these steps:  Select a frequency for pulse width modulation.  Select the duty cycle or pulse width.  Select the PWM channel. ESP32 provides 16 PWM channels.  Assign a digital pin to select the PWM channel. Complete step by step guide on ESP32 PWM with examples  

PWM motor control feature It also supports motor control feature through internal registers of ESP32 chip. you just need to configure these registers with any GPIO pins. you can find more information about these registers in the datasheet. Registers names are given below:       

PWM1_OUT_IN0~2 PWM0_FLT_IN0~2 PWM1_FLT_IN0~2 PWM0_CAP_IN0~2 PWM1_CAP_IN0~2 PWM0_SYNC_IN0~2 PWM1_SYNC_IN0~2

READ    ESP32 Tutorials

I2C communication pins It has dedicated pins available for two-wire I2C communication. One pin is used for data transfer and another pin is used for clock synchronization.  GPIO21 is SDA pin.  GPIO22 is SCL pin. We have posted an article on I2C LCD interfacing with ESP32. This post explains how to I2C pins. you can read complete article:



I2C LCD interfacing with ESP32

RTC pins of ESP32 devKit This board also provide RTC pins which can be used to trigger ESP32 from sleep mode.  RTC_GPIO0 – GPIO36  RTC_GPIO3  -GPIO39  RTC_GPIO4 – GPIO34  RTC_GPIO5 – GPIO35  RTC_GPIO6 – GPIO25  RTC_GPIO7 -GPIO26  RTC_GPIO8 – GPIO33  RTC_GPIO9 – GPIO32  RTC_GPIO10 -GPIO4  RTC_GPIO11 – GPIO0  RTC_GPIO12 – GPIO2  RTC_GPIO13 – GPIO15  RTC_GPIO14 – GPIO13  RTC_GPIO15 – GPIO12  RTC_GPIO16 – GPIO14  RTC_GPIO17 – GPIO27

Hall sensor pin  A complete guide on How to use built-in hall effect sensor of ESP32 It also has one hall sensor which is used to detect the magnetic field. Whenever you please this development board in the magnetic field, ESP32 generates a small voltage which can be measured with any pin. I will post a tutorial on in coming articles.  Other features of ESP32 development board and pins are shown in the above picture.