General

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
Descartar
3 Respuestas
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 Comentario
Avatar
Descartar
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 Comentario
Avatar
Descartar
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
<div> <h5 class="o_wforum_bio_popover_name mb-0"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div> <span itemprop="name">Marti Guillem Cura</span> <span><img src=https://www.industrialshields.com/es_ES/forum/general-1/question/"/web/image/res.country/68/image/España?unique=a14a800%22 class="img img-fluid country_flag" alt="España"/></span> </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> </div> </address> </h5> <span class="o_wforum_bio_popover_info"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div class="css_non_editable_mode_hidden"> --<span class="text-muted">Marti Guillem Cura</span>-- </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> <div class="css_editable_mode_hidden"> <div class="mb-2"> <br/> </div> <b class="mt-4"><i class="fa fa-diamond text-secondary"></i> 1000000015</b> <div style="display: inline-block"> <b>|</b> <span class="fa fa-trophy badge-gold ml-2" role="img" aria-label="Gold badge" title="Gold badge"></span> 0 <span class="fa fa-trophy badge-silver ml-2" role="img" aria-label="Silver badge" title="Silver badge"></span> 0 <span class="fa fa-trophy badge-bronze ml-2" role="img" aria-label="Bronze badge" title="Bronze badge"></span> 0 </div> <div class="mt-2"> <div class="o_forum_tooltip_line"> <span>Sant Fruitós de Bages</span><span>, </span><span>España</span> </div> </div> </div> </div> </address> </span> <div class="o_wforum_bio_popover_bio"> <address class="mb-0" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div class="css_non_editable_mode_hidden"> --<span class="text-muted">Marti Guillem Cura</span>-- </div> <div itemprop="address" itemscope="itemscope" itemtype="http://schema.org/PostalAddress"> </div> <div> <span> </span> </div> </address> </div> </div> </div> "> 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
Descartar