Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Industrial Control System with RS485 Communication and I2C Interface

Image of ESP32-Based Industrial Control System with RS485 Communication and I2C Interface

Circuit Documentation

Summary of the Circuit

This circuit appears to be a complex system involving communication and control elements. It includes an I2C digital potentiometer (Adafruit DS3502), an I/O expander, an opto-isolator board for electrical isolation, an ESP32-based 7" screen module for user interface, a 15-way D-Sub connector for external interfacing, a terminal PCB for power input, an I2C hub to facilitate I2C communication, a UART to RS485 converter for serial communication, and a voltage converter module to step down 48V to 5V. The circuit likely serves as a control panel with various inputs and outputs, interfacing with external devices through the D-Sub connector, and managing signals and power distribution.

Component List

Adafruit DS3502

  • Digital potentiometer
  • I2C interface
  • Adjustable resistance via software

IO Expander

  • Expands the number of I/O pins
  • Controlled via I2C

Opto-isolator Board

  • Provides electrical isolation
  • Has multiple channels

ELECROW ESP32 7" Screen

  • ESP32-based controller with a 7" display
  • Interfaces include I2C and UART

15 way D-Sub

  • Connector for interfacing with external devices
  • 15-pin configuration

Terminal PCB 2 Pin

  • Simple two-pin terminal for power input or other connections

I2C HUB

  • Allows multiple I2C devices to connect to a single I2C bus

UART TTL to RS485 Two-way Converter

  • Converts between TTL-level UART signals and RS485 signals

48v to 5v Converter

  • Steps down 48V to 5V for use in the circuit

Wiring Details

Adafruit DS3502

  • RL, RW, RH connected to 15 way D-Sub pins 15, 8, 13 respectively
  • VCC and GND connected to I2C HUB VCC and GND
  • SCL and SDA connected to I2C HUB SCL and SDA

IO Expander

  • P01 to P04 connected to Opto-isolator Board IN1 to IN4
  • P00 connected to Opto-isolator Board NC
  • VDD and GND connected to ELECROW ESP32 7" Screen BAT+ and BAT-
  • VCC and GND connected to I2C HUB VCC and GND
  • SDA and SCL connected to I2C HUB SDA and SCL

Opto-isolator Board

  • HVCC connected to 15 way D-Sub pin 15
  • IN1 to IN4 connected to IO Expander P01 to P04
  • OUT1 to OUT3 connected to 15 way D-Sub pins 5 to 7
  • HGND connected to 15 way D-Sub pin 14
  • GND connected to ELECROW ESP32 7" Screen BAT-

ELECROW ESP32 7" Screen

  • BAT+ connected to IO Expander VDD, 48v to 5v out+, and UART TTL to RS485 Two-way Converter VCC
  • BAT- connected to Opto-isolator Board GND, IO Expander GND, and 48v to 5v out--
  • UARTT0_TXD0 and UARTT0_RXD0 connected to UART TTL to RS485 Two-way Converter TXD and RXD
  • GND connected to I2C HUB GND
  • 3V3 connected to I2C HUB VCC
  • SDA and SCL connected to I2C HUB SDA and SCL

15 way D-Sub

  • Pins 1, 2 connected to Terminal PCB 2 Pin Pin A and 48v to 5v in+
  • Pins 3, 4 connected to Terminal PCB 2 Pin Pin B and 48v to 5v in--
  • Pins 9, 10 connected to UART TTL to RS485 Two-way Converter A and B

Terminal PCB 2 Pin

  • Pin A connected to 15 way D-Sub pins 1, 2 and 48v to 5v in+
  • Pin B connected to 15 way D-Sub pins 3, 4 and 48v to 5v in--

I2C HUB

  • VCC and GND connected to Adafruit DS3502 VCC and GND, IO Expander VCC and GND, ELECROW ESP32 7" Screen 3V3 and GND
  • SDA and SCL connected to Adafruit DS3502 SDA and SCL, IO Expander SDA and SCL, ELECROW ESP32 7" Screen SDA and SCL

UART TTL to RS485 Two-way Converter

  • VCC and GND connected to ELECROW ESP32 7" Screen BAT+ and GND
  • TXD and RXD connected to ELECROW ESP32 7" Screen UARTT0_TXD0 and UARTT0_RXD0
  • A and B connected to 15 way D-Sub pins 9 and 10

48v to 5v Converter

  • out+ and out-- connected to ELECROW ESP32 7" Screen BAT+ and BAT-
  • in+ and in-- connected to 15 way D-Sub pins 1, 2 and Terminal PCB 2 Pin Pin A and Pin B

Documented Code

No code has been provided for the microcontrollers in the circuit. If code is available, it should be documented here with explanations for each function and routine, including setup and loop functions, interrupt service routines, and any communication protocol implementations.