Project Description:
This project aims to design a multifunctional, highly reliable control unit suitable for various industrial or automation applications. The core utilizes an STC8H8K64U microcontroller as the main controller, combined with isolated power supplies, optocoupler inputs/outputs, RS485/RS232 communication interfaces, and an ESP8266-01S wireless module. It also supports SPI/I2C. Screen Display
Core Functions
: Isolated DC-DC Power Supply: Supports 9~36V input; isolation design prevents external interference and protects the main control circuit.
Optical Input/Outputs:
10 optocoupler inputs are used to isolate and read external signals, such as sensor or switch status.
10 optocoupler outputs are used to control external devices, such as motors and indicator lights, achieving electrical isolation and improving system safety.
Communication Interfaces:
RS485 Isolation: Prevents damage to the main control circuit due to incorrect RS485 interface connection
. RS232 Isolation: Prevents damage to the main control circuit due to incorrect RS232 interface connection.
ESP8266-01S: Can be used for remote control and data transmission, connecting to STC8H8K64U via UART interface
. Display Interface: Supports LCD/OLED displays with SPI or I2C interfaces for displaying system status, parameters, or error signals.
Buzzer: Used to provide audible alerts or alarms. When the system detects an abnormal state (such as sensor failure, equipment overload, etc.), an alarm sound can be emitted via the buzzer to promptly notify the operator for handling.
Hardware Design:
Optocoupler Input:
Default

input low level, input status indicated by LED.
Optocoupler Output: Output status indicated
by RS485 Isolation: Short-circuit H1 when a terminating resistor is required RS232 Isolation: Buzzer . Software Design: Communication adopts the standard MODBUS RTU protocol, and data exchange is achieved through the RS485 interface. Currently, MODBUS function code 03 is implemented to read the optocoupler input status; function code 06 is implemented to control the optocoupler output and buzzer status.


