Difference between revisions of "ESP32-I2C-HUB"

From Land Boards Wiki
Jump to navigation Jump to search
 
(14 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/]]
 
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/esp32-breakouti2c-hub-pcb-only-esp32-i2c-hub/]]
  
<video type="youtube">TK8Gp9_7ZdE</video>
+
<video type="youtube">N2A5-MMg280</video>
  
 
[[File:P1060894-crop-720px.jpg]]
 
[[File:P1060894-crop-720px.jpg]]
Line 9: Line 9:
 
* [[ESP32]] breakout board
 
* [[ESP32]] breakout board
 
** Requires specific version of ESP32 board (marked ESP32 DEVKITV1 on bottom)
 
** 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 30: Line 31:
 
* 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 101: 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 117: Line 122:
  
 
# INT* (GPIO5)
 
# INT* (GPIO5)
# SCL
+
# SCL (GPIO22)
# SDA
+
# SDA (GPIO11)
 
# VCC
 
# VCC
 
# GND
 
# GND
Line 155: Line 160:
 
=== Left GVS connector ===
 
=== Left GVS connector ===
  
* Gnd/3.3V/Signal
+
* [https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ Some GPIO pins have meaning during boot]
 +
* Gnd/3.3V/Signals
  
 
# EN (Pull low to shut off 3.3V reg)
 
# EN (Pull low to shut off 3.3V reg)
# VP/P36
+
# VP/GPI36 (Input only)
# VN/P39
+
# VN/GPI39 (Input only)
# P34/P34
+
# GPI34 (Input only)
# P35/A7
+
# GPI35/A7 (Input only)
 
# P32/A4
 
# P32/A4
 
# P33/A5
 
# P33/A5
Line 174: Line 180:
 
=== Right GVS connector ===
 
=== Right GVS connector ===
  
* Gnd/3.3V/Signal
+
* [https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ Some GPIO pins have meaning during boot]
 +
* Gnd/3.3V/Signals
  
 
# P23/MOSI
 
# P23/MOSI
Line 192: Line 199:
  
 
== Software Support ==
 
== Software Support ==
 +
 +
=== MicroPython ===
  
 
* [https://micropython.org MicroPython Homepage]
 
* [https://micropython.org MicroPython Homepage]
Line 205: Line 214:
 
* [https://github.com/espressif/arduino-esp32/issues/544 ESP32 DEVKITV1 module schematics] (also helpful discussion)
 
* [https://github.com/espressif/arduino-esp32/issues/544 ESP32 DEVKITV1 module schematics] (also helpful discussion)
 
* [https://github.com/Nicholas3388/LuaNode LuaNode]
 
* [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 ===
 
=== Arduino Programming ===

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