Help

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

I2C pins on 10 IOS relay ESP32 board

Hello,

I have recently acquired a 10 IOs relay module ESP32 board, and I'm trying to use it with the standard Espressif development environment.
I would have liked to have the pins descriptions for IOs, RS485, Ethernet SPI and I2C, but did not find these in the documentation. So I had to discover the pins to use, mainly from the Arduino pins_is.h file.
What I did not find in this file is I2C pins settings. I think I found them on the board : GPIO22 for SDA and GPIO1 for SCL, but this configuration is really strange as GPIO1 is also used by main ESP32 board as TxD0.
Can you please clarify ?

Regards,

Jean-Marie

Avatar
Discard
3 Answers
0
Avatar
Daniel Howe
Best Answer

Hi Guillem,

There is an error in the product catalog (https://www.industrialshields.com/web/content?model=ir.attachment&field=datas&id=198855&)

On page 2, it describes the ESP32 10IO product with x1 I2C ports in multiple locations.  From this information, it would appear to support I2C.  However, it does not fully support I2C without reducing functionality as described below:

Eliminate the USB connection, and use external power. Then the I2C port can be used by remapping the default pins, as follows:

#define I2C_SDA 1

#define I2C_SCL 22

Wire.begin(I2C_SDA, I2C_SCL); // remap I2C

Also do not use Serial.begin() it will initialize the same port as the I2C is connected!

Regards,
Daniel Howe

--

Howe Neat, Inc.
https://www.howeneat.com

1 Comment
Avatar
Discard
Avatar
Daniel Howe
-

The latest version of this board has new pin assignments. I can't find a version number on the board, the I2C connector has 6 pins, for GND, RS485 A/B, SCL/SDA and 3.3VDC.

The new pins are as follows:

#define I2C_SDA 21

#define I2C_SCL 22

0
Best Answer

Hello Guillem,

Thanks for your answer and pin details.

I'm really disappointed by the missing I2C, because I read in the product page :

Expandable
Using the I2C connection, that all the Basic Controllers family has, you can connect up to 127 modules, which means that you can have up to 2.540 Input / Ouputs in Master Slave connection.

Maybe I missed what follows : NOTE: for I2C you need to tell us that requirement..

This means you could set I2C on a board if I specify it when ordering, right ? Is there a way to exchange my board ?

What I observed on the PCB really looks like a routing mistake of an I2C pin on GPIO1 instead of GPIO21, because the other I2C standard pin is correctly routed. Can you confirm ? If so you probably can suggest a workaround to have I2C working, or a board change with an updated PCB.

Regards,

Jean-Marie

1 Comment
Avatar
Discard
Avatar
Marti Guillem Cura
-

Hello Jean-Marie,

In order to satisfy your request, please get in contact with support@industrialshields.com and we will try to solve your problem! Also, thanks for your observation, we will confirm it as soon as possible.

0
Avatar
Marti Guillem Cura
Best Answer

Hello Jean-Marie,

The mapping between the PLC IOs pins and the ESP32 is explained in the product datasheet!

As for the settings for the Ethernet, it works using the SPI configuration. It uses the  GPIO23 (MOSI), GPIO19 (MISO) and GPIO18 (SCK) for the connection. Also uses the GPIO33 for the chip_select of the Ethernet (CS). The connection between the RS485 chip and the ESP32 device works with the GPIO5 (DE), GPIO16 (RX) and the GPIO17 (TX).

Currently our 10 IOs devices do not support the I2C communication, as there is not any external pin where you can use for it.

I hope I have been helpful.

Avatar
Discard