Proof of Concept

KC868-A16 EtherNet/IP

EtherNet/IP controller firmware for the Kincony KC868-A16 (ESP32 + Ethernet)

Status: This project is a proof-of-concept implementation and requires further development, testing, and validation before production use.

Kincony KC868-A16 PCB

Overview

A proof-of-concept port of the OpENer EtherNet/IP stack to ESP32 with Ethernet, targeting the Kincony KC868-A16 Ethernet I/O controller. The firmware exposes 16 relay outputs, 16 opto-isolated digital inputs, and 4 analog inputs over EtherNet/IP implicit messaging, suitable for PLC integration and industrial automation.

This implementation demonstrates the feasibility of running industrial EtherNet/IP communication protocols on cost-effective, widely available microcontroller platforms. The device acts as an EtherNet/IP adapter, supporting both explicit messaging (for configuration and diagnostics) and implicit I/O connections (for real-time data exchange).

Hardware Platform

The Kincony KC868-A16 is an ESP32-based Ethernet I/O controller with the following specifications:

Analog Input Configuration

The device provides four analog input channels with the following mapping:

All analog inputs are sampled at 12-bit resolution (0–4095 counts) with 11 dB attenuation.

EtherNet/IP Assembly Structure

The device implements two EtherNet/IP assemblies for I/O data exchange:

Output Assembly (Instance 150)

2-byte output assembly used to send relay control data from the EtherNet/IP scanner (PLC) to the device:

Byte Bits Outputs Description
0 0–7 Y01–Y08 Relay outputs 1–8
1 0–7 Y09–Y16 Relay outputs 9–16

Note: Bit value 1 = relay on, 0 = relay off. Outputs are active-low at the PCF8574, so the firmware inverts bits when writing to the expander.

Input Assembly (Instance 100)

10-byte input assembly used to send digital input states and analog readings from the device back to the EtherNet/IP scanner:

Offset Size Inputs Description
0 1 X01–X08 Opto-isolated inputs 1–8
1 1 X09–X16 Opto-isolated inputs 9–16
2 2 A1 (INA1) 4–20 mA raw ADC count (little-endian)
4 2 A2 (INA2) 0–5 V raw ADC count (little-endian)
6 2 A3 (INA3) 0–5 V raw ADC count (little-endian)
8 2 A4 (INA4) 4–20 mA raw ADC count (little-endian)

Implementation Notes:

Software Stack & Tooling

This project uses the following software components:

Device Identity

The device presents the following identity information to EtherNet/IP scanners:

Connection Types

The device supports standard EtherNet/IP connection types:

Network Configuration

The device supports both DHCP and static IP configuration:

A minimal web interface is provided at http://<device-ip>/api/ipconfig for network configuration and diagnostics.