Actions

MD43001 - ESP32-S3 DIN - Universal IoT Controller with ESP32-S3

From Modig.pl Wiki

Description

MD43001 - ESP32-S3 DIN - Universal IoT Controller with ESP32-S3

Modig MD43001 - ESP32-S3 DIN is a universal, compact industrial controller designed for advanced Internet of Things (IoT), building automation, and industrial automation applications, suited for DIN rail mounting.


Key Features and Specifications

  • equipped with a modern ESP32-S3-WROOM-1U-N16R8 IoT module (Xtensa dual-core 32-bit, 240 MHz, FPU, 16 MB FLASH, 8 MB PSRAM)
  • Wi-Fi 802.11b/g/n wireless communication
  • Bluetooth LE wireless communication: Bluetooth 5, Bluetooth mesh
  • RP-SMA antenna connector + 2.4 GHz 5 dBi Wi-Fi antenna
  • USB Device interface with USB-C connector (acts as a USB-UART converter, enables module programming)
  • 2 RS485 interfaces with built-in protection and galvanic isolation
  • 2 relay outputs (NC/NO contacts, max: 250 VAC, 30 VDC, 10 A)
  • status LEDs indicating module operation, RS485 communication, and relay output states
  • additional 8 kB I2C EEPROM memory
  • reset button (RESET) and bootloader mode button (BOOT Mode)
  • power supply section suited for input voltages ranging from 7 to 30 VDC
  • enclosure designed for 35 mm DIN rail mounting (dimensions: 70 x 90 x 65 mm, rail width: 4 modules)
  • Operating temperature range: -20°C to +65°C



Standard Equipment

Code Description
MD43001
  • Assembled and tested module
  • 2.4 GHz 5 dBi Wi-Fi antenna
  • USB cable with USB-A and USB-C plugs



Component Layout


Wireless Communication

The Modig ESP32-S3 DIN module enables Wi-Fi 802.11b/g/n and Bluetooth LE (Bluetooth 5, Bluetooth mesh) wireless communication. For proper operation, it requires connecting a 2.4 GHz band antenna to the RP-SMA antenna connector located on the front panel.

Detailed parameters of the radio subsystem integrated into the ESP32-S3 module can be found in the ESP32-S3 module documentation.



RS485 Communication

The Modig ESP32-S3 DIN module is equipped with two independent RS485 interfaces: RS485-1 and RS485-2, each featuring A+, B-, and GND terminals. These interfaces include several protective measures and are galvanically isolated from the module's control circuitry, enabling reliable operation in environments subject to severe electrical noise. Each interface can operate at baud rates ranging from 1200 bps to 1 Mbps. The interfaces do not feature integrated 120 Ω termination resistors; if a termination resistor is required, it must be connected directly to the RS485-1/RS485-2 terminal blocks.


Data transmission or reception on either interface is indicated by the blinking of the LED marked RX/TX. The LED is connected directly to both RS485 transceivers and requires no additional configuration. At high communication speeds and short data frames, its blinking may be subtle.



Relay Outputs

The Modig ESP32-S3 DIN module features 2 electromagnetic relays. The relay contacts are wired to the OUT1 and OUT2 terminal connectors, functioning as follows:

  • NC - (normally closed) - circuit normally closed, connected to contact C when the relay is de-energized;
  • NO - (normally open) - circuit normally open, disconnected. When the relay is energized, contact NO connects to contact C;
  • C - (common) common contact.


The relay outputs can control AC circuits up to 250 VAC or DC circuits up to 30 VDC. The maximum current per circuit must not exceed 10 A. The electromagnetic relays provide galvanic isolation from the control circuitry and are ideal for resistive loads. However, they should not be used to drive inductive or capacitive loads, such as induction motors or high-power switched-mode power supplies.


The state of the relay outputs is indicated by LEDs labeled OUT1 and OUT2. An illuminated LED indicates that the corresponding output is active (contact NO connected to contact C).



Power Supply

The Modig ESP32-S3 DIN module requires a DC power supply ranging from 7 to 30 VDC. Power must be connected to the PWR IN connector with correct polarity (positive terminal towards the edge of the enclosure).

An operating module with active Wi-Fi communication consumes approximately 1 W of power, with maximum power consumption not exceeding 2 W.



SYSTEM LED Indicator

The LED indicator marked SYS is connected directly to pin GPIO11 of the ESP32-S3 module. It can indicate target system operation or perform any other function depending on the control firmware.



USB Interface and RESET / BOOT Buttons

The ESP32-S3 module features an integrated USB device interface exposed via a USB-C connector.

It can act as a serial interface (USB-to-Serial converter) or perform any other function defined by the control firmware.


The RESET button is used to restart the control software. Briefly pressing it will cause the firmware to restart from the beginning, just as if power were re-applied.


The BOOT button is connected directly to pin GPIO0 of the ESP32-S3 module along with a pull-up resistor. Pressing the button pulls GPIO0 low (logic 0) and can trigger any user-defined function in the control program.


The USB interface is also used for programming the ESP32-S3 module (firmware uploading). Before starting this process, while the device is connected to a PC via USB cable, you must enter **BOOT mode** by performing the following sequence:

  • press and hold the RESET button,
  • press and hold the BOOT button while still holding RESET,
  • release the RESET button while continuing to hold BOOT,
  • release the BOOT button.

Now the Modig ESP32-S3 DIN module will be recognized as a USB serial device:



Programming can be performed using the Arduino IDE environment or VSCode with the PlatformIO extension.


Test Control Firmware

Factory-new Modig ESP32-S3 DIN modules come preinstalled with test firmware that performs several basic functions:

  • launches an AP (Access Point) named ESP32-S3-AP
  • hosts a web server and demo web page at IP address: 192.168.10.1
  • tests relays, status LEDs, and the BOOT button
  • sends test data over the RS485-1 and RS485-2 interfaces


The source code for the test firmware is available on GitHub.



Internal Architecture

The block diagram of the Modig ESP32-S3 DIN module is shown in the figure below. It illustrates the key components and their corresponding GPIO pin assignments on the ESP32-S3 module.


The table lists the ESP32-S3 GPIO ports and their functions in the Modig ESP32-S3 DIN module:

GPIO Port Function Description
GPIO0 Input equipped with a pull-up resistor. Connected to the BOOT button A low state (BOOT button pressed) during reset or system power-up forces entry into BOOT mode (firmware update mode via USB)
GPIO9 I2C interface, SCL line, equipped with a pull-up resistor. I2C SCL line connected to the 8 kB 24AA64 EEPROM memory (I2C address 0x50)
GPIO10 I2C interface, SDA line, equipped with a pull-up resistor. I2C SDA line connected to the 8 kB 24AA64 EEPROM memory (I2C address 0x50)
GPIO11 Output connected to the SYS LED. Active low LED state is controlled by firmware.
GPIO16 Output enabling the RS485-2 transmitter. Active high Equipped with galvanic isolation
GPIO17 UART0 TX data output. Active low Equipped with galvanic isolation
GPIO18 UART0 RX data input. Active low Equipped with galvanic isolation
GPIO38 Output enabling the RS485-1 transmitter. Active high Equipped with galvanic isolation
GPIO43 UART1 TX data output. Active low Equipped with galvanic isolation
GPIO44 UART1 RX data input. Active low Equipped with galvanic isolation
GPIO47 Controls output OUT2. Active high Equipped with a MOSFET driver
GPIO48 Controls output OUT1. Active high Equipped with a MOSFET driver

Additional Connectors

The PCB of the Modig ESP32-S3 DIN module contains additional expansion header connectors J1, J9, J10, and J11 designed for 2.54 mm pitch pin headers. Their layout is shown in the figure, and their functions are described in the table below.



Connector Pins / Signals Description
J1- JTAG

1 - VD - 3.3V power supply,

2 - MS - Mode Select,

3 - TI - Data IN,

4 - TO - Data Out,

5 - TC - Clock,

6 - GN - power ground (GND)

JTAG interface for the ESP32-S3 module; allows program debugging using compatible software tools.
J9 - I2C

1 - GND - power ground,

2 - SC - I2C SCL,

3 - SD - I2C SDA

I2C interface allows connecting various peripherals. The 24AA64 EEPROM memory (I2C address 0x50) is connected via this bus.
J10 - UART0

1 - GND - power ground,

2 - TX - UART0 data output,

3 - RD - UART0 data input,

4 - VD - 3.3V power supply

UART0 interface. The TX and RX lines are connected to the RS485-1 interface (RX line through a 1k resistor, so a strong signal on RX will override RS485-1 reading).
J11 - Power Output

1 - GND - power ground,

2 - VD - 3.3V power supply,

3 - VC - 5V power supply

Current draw on the VD line should not exceed 100 mA, and on the VC line should not exceed 500 mA.



Additional Documentation