Difference between revisions of "ESP32-I2C-HUB"

From Land Boards Wiki
Jump to navigation Jump to search
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/esp32-breakouti2c-hub-pcb-only-esp32-i2c-hub/]]
 +
 +
<video type="youtube">N2A5-MMg280</video>
 +
 
[[File:P1060894-crop-720px.jpg]]
 
[[File:P1060894-crop-720px.jpg]]
  
== Feature ==
+
== Features ==
  
 
* [[ESP32]] breakout board
 
* [[ESP32]] breakout board
** Requires specific version of ESP32 board
+
** Requires specific version of ESP32 board (marked ESP32 DEVKITV1 on bottom)
* GVS (Ground, Voltage, Signal) for all ESP32 pins  
+
* GVS (Ground, Voltage, Signal) for all ESP32 module pins
 +
** [https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ Useful guide to the pins]
 
* 4-channel I2C Hub
 
* 4-channel I2C Hub
 
** [https://www.ti.com/lit/ds/symlink/tca9544a.pdf TCA9544] - 4-Channel I2C and SMBus Multiplexer With Interrupt Logic
 
** [https://www.ti.com/lit/ds/symlink/tca9544a.pdf TCA9544] - 4-Channel I2C and SMBus Multiplexer With Interrupt Logic
Line 21: Line 26:
 
* 6-32 mounting holes
 
* 6-32 mounting holes
  
=== ESP-32 Module ===
+
=== ESP32-WROOM-32 Module ===
  
* [https://circuits4you.com/2018/12/31/esp32-devkit-esp32-wroom-gpio-pinout/ Board details]
+
* [https://circuits4you.com/2018/12/31/esp32-devkit-esp32-wroom-gpio-pinout/ ESP32 DevKit ESP32-WROOM GPIO Pinout]
 
* On board Blue LED = Arduino Pin 2
 
* On board Blue LED = Arduino Pin 2
  
[[File:ESP32-720px.jpg]]
+
[[File:ESP32_MODULE-720PX.jpg]]
  
 
[[File:ESP32-Pinout.jpg]]
 
[[File:ESP32-Pinout.jpg]]
Line 32: Line 37:
 
[[File:esp32-pinout-chip-ESP-WROOM-32.png]]
 
[[File:esp32-pinout-chip-ESP-WROOM-32.png]]
  
== Schematic ==
+
=== Module Features ===
  
* [http://land-boards.com/ESP32-I2C-HUB/ESP32_I2C_HUB_Rev2_Schematic.pdf ESP32-I2C-HUB Schematic]
+
* Architecture: Xtensa Dual-Core 32-bit LX6
* [https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf ESP32-WROOM-32 Darasheet]
+
* CPU frequency: up to 240MHz
 +
* Total RAM available: 528KB (part of it reserved for system)
 +
* BootROM: 448KB
 +
* Internal FlashROM: none
 +
* External FlashROM: code and data, via SPI Flash; usual size 4MB
 +
* GPIO: 34 (GPIOs are multiplexed with other functions, including external FlashROM, UART, etc.)
 +
* UART: 3 RX/TX UART (no hardware handshaking), one TX-only UART
 +
* SPI: 4 SPI interfaces (one used for FlashROM)
 +
* I2C: 2 I2C (bitbang implementation available on any pins)
 +
* I2S: 2
 +
* ADC: 12-bit SAR ADC up to 18 channels
 +
* DAC: 2 8-bit DACs
 +
* RMT: 8 channels allowing accurate pulse transmit/receive
 +
*  Programming: using BootROM bootloader from UART - due to external FlashROM and always-available BootROM bootloader, the ESP32 is not brickable
  
 
== Connectors ==
 
== Connectors ==
Line 84: Line 102:
  
 
=== J2 - FTDI ===
 
=== J2 - FTDI ===
 +
 +
* Rx0/Tx0 connect to the USB-Serial interface on the ESP32 module
  
 
[[File:FTDI_conn.PNG]]
 
[[File:FTDI_conn.PNG]]
 +
 +
[[File:FTDI_rot.jpg]]
  
 
=== J3 - I2C Mux Base Address Select Jumpers ===
 
=== J3 - I2C Mux Base Address Select Jumpers ===
Line 100: Line 122:
  
 
# INT* (GPIO5)
 
# INT* (GPIO5)
# SCL
+
# SCL (GPIO22)
# SDA
+
# SDA (GPIO11)
 
# VCC
 
# VCC
 
# GND
 
# GND
Line 133: Line 155:
 
# n/c
 
# n/c
 
# GND
 
# GND
 +
 +
[[File:P8_SPIbus.PNG]]
  
 
=== Left GVS connector ===
 
=== Left GVS connector ===
  
# EN
+
* [https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ Some GPIO pins have meaning during boot]
# VP
+
* Gnd/3.3V/Signals
# VN
+
 
# P34
+
# EN (Pull low to shut off 3.3V reg)
# P35
+
# VP/GPI36 (Input only)
# P32
+
# VN/GPI39 (Input only)
# P33
+
# GPI34 (Input only)
# P25
+
# GPI35/A7 (Input only)
# P26
+
# P32/A4
# SCL
+
# P33/A5
# P14
+
# P25/A8
# P12
+
# P26/A9
# P13
+
# P27/SCL
 +
# P14/SD_CLK
 +
# P12/SD_D2
 +
# P13/SD_D3
 
# VUSB
 
# VUSB
  
 
=== Right GVS connector ===
 
=== Right GVS connector ===
  
# P23
+
* [https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ Some GPIO pins have meaning during boot]
# SCL
+
* Gnd/3.3V/Signals
# TX
+
 
# RX
+
# P23/MOSI
# SDA
+
# SCL/RTS1
# P19
+
# P1/TX
# P18
+
# I3/RX
 +
# P21/SDA
 +
# P19/CTS0
 +
# P18/SCK
 
# P5
 
# P5
# TX1
+
# P17/TX2
# RX1
+
# P16/RX2
# P4
+
# P4/SD_D1
# P2
+
# P2/SD_D0
# P15
+
# P15/SD_CMD
 
# 3.3V
 
# 3.3V
  
 
== Software Support ==
 
== Software Support ==
  
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32 GitHub repo]
+
=== MicroPython ===
** [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/examples Examples]
+
 
** [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/libraries Libraries]
+
* [https://micropython.org MicroPython Homepage]
 +
** [http://docs.micropython.org/en/latest/esp32/quickref.html Quick reference for the ESP32]
 +
** [http://docs.micropython.org/en/latest/esp32/general.html General information about the ESP32 port]
 +
** [http://docs.micropython.org/en/latest/esp32/tutorial/intro.html Getting started with MicroPython on the ESP32]
 +
* [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32 GitHub repo] (MicroPython)
 +
** [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/examples Examples] (MicroPython)
 +
** [https://github.com/land-boards/lb-Python-Code/tree/master/MicroPython/ESP32/libraries Libraries] (MicroPython)
 +
* [https://docs.espressif.com/projects/esp-idf/en/latest/index.html ESP-IDF Programming Guide]
 
* [https://www.freertos.org FreeRTOS]
 
* [https://www.freertos.org FreeRTOS]
* [https://docs.zerynth.com/latest/official/board.zerynth.doit_esp32/docs/index.html Esp32 DevKit v1]
+
* [https://docs.zerynth.com/latest/official/board.zerynth.doit_esp32/docs/index.html ESP32 DevKit v1]
 +
* [https://github.com/espressif/arduino-esp32/issues/544 ESP32 DEVKITV1 module schematics] (also helpful discussion)
 +
* [https://github.com/Nicholas3388/LuaNode LuaNode]
 +
 
 +
==== MicroPython SD Card Support ====
 +
 
 +
* The [http://docs.micropython.org/en/latest/esp32/quickref.html# MicroPython docs page] is short on details on software support for SD cards
 +
* There are other ports which support SD Cards
 +
** [https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/filesystems loboris port]
 +
 
 +
<pre>sdcard support is included which uses esp-idf sdmmc driver and
 +
can work in SD mode (1-bit and 4-bit)  or in SPI mode (sd card can
 +
be connected to any pins).</pre>
 +
 
 +
* GPIO14 = SD_Card CLK = SCK
 +
* GPIO15 = SD_Card CMD/DI = MOSI
 +
* GPIO2 = SD_Card DATA0/DO = MISO
 +
* GPIO13 = SD_Card DAT3 = CS
 +
 
 +
=== Arduino Programming ===
 +
 
 +
* Board : "DOIT ESP32 DEVKIT V1"
 +
 
 +
[[fILE:Ardino_ESP32.png]]
 +
 
 +
== Schematic ==
 +
 
 +
* [http://land-boards.com/ESP32-I2C-HUB/ESP32_I2C_HUB_Rev3_Schematic.pdf ESP32-I2C-HUB Schematic]
 +
* [https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32_datasheet_en.pdf ESP32-WROOM-32 Darasheet]
 +
* [https://github.com/land-boards/lb-boards/blob/master/ESP32/ESP32-Hub/Parts_/SchematicsforESP32.pdf ESP32 Module schematic]
  
 
== Assembly Sheet ==
 
== Assembly Sheet ==
  
 
* [[ESP32-I2C-HUB Assembly Sheet]]
 
* [[ESP32-I2C-HUB Assembly Sheet]]

Latest revision as of 10:40, 8 May 2022

Tindie-mediums.png

P1060894-crop-720px.jpg

Features

  • ESP32 breakout board
    • Requires specific version of ESP32 board (marked ESP32 DEVKITV1 on bottom)
  • GVS (Ground, Voltage, Signal) for all ESP32 module pins
  • 4-channel I2C Hub
    • TCA9544 - 4-Channel I2C and SMBus Multiplexer With Interrupt Logic
    • Isolated I2C channels
    • Interrupt for each I2C channel
    • I2C Channels can be independently powered with 3.3V or 5V
    • Jumper selectable I2C base address
  • GVS (Ground, Voltage, Signal) for all ESP32 pins
  • FTDI header
  • SPI bus header
  • 5V power source selection/distribution
    • 5V sources - USB, 5mm terminal block, DC jack
  • On-board 3.3V power regulator (doesn't stress the ESP32 regulator)
  • 95x95mm ODAS form factor
  • 6-32 mounting holes

ESP32-WROOM-32 Module

ESP32 MODULE-720PX.jpg

ESP32-Pinout.jpg

Esp32-pinout-chip-ESP-WROOM-32.png

Module Features

  • Architecture: Xtensa Dual-Core 32-bit LX6
  • CPU frequency: up to 240MHz
  • Total RAM available: 528KB (part of it reserved for system)
  • BootROM: 448KB
  • Internal FlashROM: none
  • External FlashROM: code and data, via SPI Flash; usual size 4MB
  • GPIO: 34 (GPIOs are multiplexed with other functions, including external FlashROM, UART, etc.)
  • UART: 3 RX/TX UART (no hardware handshaking), one TX-only UART
  • SPI: 4 SPI interfaces (one used for FlashROM)
  • I2C: 2 I2C (bitbang implementation available on any pins)
  • I2S: 2
  • ADC: 12-bit SAR ADC up to 18 channels
  • DAC: 2 8-bit DACs
  • RMT: 8 channels allowing accurate pulse transmit/receive
  • Programming: using BootROM bootloader from UART - due to external FlashROM and always-available BootROM bootloader, the ESP32 is not brickable

Connectors

Rev 3 CAD 2 1.PNG

H1 - 3.3V from on-board regulator Header

  • Install jumper

H1 PWR 3v3.png

  • Alternate for 3.3V power is to install S to V jumper at 3.3V header position (bottom right)
    • H1 should not be installed for that case

PWR 3v3 2.png

H2 - 5V SRC Header

  • 2x3 header
  • Care must be taken to install the correct jumpers
  • USB jumper sends out 5V when a USB cable is connected to the ESP32 module
  • USB jumper sends 5V into the ESP32 module when there is no USB cable connected to the ESP32 module

Power from USB on ESP32 module

H2 USB.png

  • Do not install FTDI jumper
  • Do not install DCJ jumper
  • Install USB jumper

Power from 5V jack

H2 DCJ.png

  • Do not install FTDI jumper
  • Install DCJ jumper
  • Install USB jumper

Power from FTDI

H2 FTDI.png

  • Unstall FTDI jumper
  • Do not install DCJ jumper
  • Install USB jumper

J2 - FTDI

  • Rx0/Tx0 connect to the USB-Serial interface on the ESP32 module

FTDI conn.PNG

FTDI rot.jpg

J3 - I2C Mux Base Address Select Jumpers

  • A0-A2
    • Install for 0
    • Remove for 1

J3 A0-2.png

J7 - I2C Interface

  • Also goes to the I2C Hub chip
  1. INT* (GPIO5)
  2. SCL (GPIO22)
  3. SDA (GPIO11)
  4. VCC
  5. GND

J4, J5, J6, J8 - I2C Power Select (Ports #0-#3)

  • Selects 3.3V or 5V on I2C
  • 1-2 = 3.3V
  • 2-3 = 5V

J9, J10, J11, J12 - I2C interfaces #0-#3

  1. GND
  2. VCC
  3. SDA
  4. SCL
  5. INT*

P1 - 5V Power

  • 2x8 pin header

P1 5V Power.png

P8 - SPIbus connector

  1. MISO
  2. 3.3V
  3. SCK
  4. MOSI
  5. n/c
  6. GND

P8 SPIbus.PNG

Left GVS connector

  1. EN (Pull low to shut off 3.3V reg)
  2. VP/GPI36 (Input only)
  3. VN/GPI39 (Input only)
  4. GPI34 (Input only)
  5. GPI35/A7 (Input only)
  6. P32/A4
  7. P33/A5
  8. P25/A8
  9. P26/A9
  10. P27/SCL
  11. P14/SD_CLK
  12. P12/SD_D2
  13. P13/SD_D3
  14. VUSB

Right GVS connector

  1. P23/MOSI
  2. SCL/RTS1
  3. P1/TX
  4. I3/RX
  5. P21/SDA
  6. P19/CTS0
  7. P18/SCK
  8. P5
  9. P17/TX2
  10. P16/RX2
  11. P4/SD_D1
  12. P2/SD_D0
  13. P15/SD_CMD
  14. 3.3V

Software Support

MicroPython

MicroPython SD Card Support

sdcard support is included which uses esp-idf sdmmc driver and 
can work in SD mode (1-bit and 4-bit)  or in SPI mode (sd card can 
be connected to any pins).
  • GPIO14 = SD_Card CLK = SCK
  • GPIO15 = SD_Card CMD/DI = MOSI
  • GPIO2 = SD_Card DATA0/DO = MISO
  • GPIO13 = SD_Card DAT3 = CS

Arduino Programming

  • Board : "DOIT ESP32 DEVKIT V1"

Ardino ESP32.png

Schematic

Assembly Sheet