Proof of Concept

EIP Ground Truth

ESP32-P4 EtherNet/IP adapter with IMU ground-truth for counterbalance

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

ESP32-P4 (Ethernet)

Overview

A comprehensive EtherNet/IP communication adapter for the ESP32-P4 microcontroller, integrating sensor support, Modbus TCP, and web-based configuration. The device serves as a bridge between EtherNet/IP networks and local I/O, sensors, and other industrial automation components.

This project implements a full-featured EtherNet/IP adapter device on the ESP32-P4 platform using the OpENer open-source EtherNet/IP stack. The device provides IMU-based ground-truth measurements for counterbalance applications, calculating roll, pitch, ground angle, and opposed-cylinder pressures.

Hardware Platform

This project targets ESP32-P4 with Ethernet connectivity:

IMU Integration

The device supports 6-axis motion sensor support with automatic fallback:

IMU Capabilities

Both sensors provide the following measurements:

Calculation Precision

All sensor calculations use 32-bit float precision (IEEE 754 single precision):

EtherNet/IP Assembly Structure

The device exposes three EtherNet/IP assembly instances:

Input Assembly (Instance 100) - 32 Bytes

Contains IMU sensor data and other input data:

Offset Size Field Name Description
0-3 4 DINT 0 Roll angle (degrees × 10000)
4-7 4 DINT 1 Pitch angle (degrees × 10000)
8-11 4 DINT 2 Ground angle from vertical (degrees × 10000)
12-15 4 DINT 3 Bottom cylinder pressure (PSI × 1000)
16-19 4 DINT 4 Top cylinder pressure (PSI × 1000)
20-31 12 Reserved Available space for other sensor data

Note: Byte offset is configurable (0-12) to avoid conflicts with other sensors.

Output Assembly (Instance 150) - 32 Bytes

Contains control commands and configuration parameters:

Configuration Assembly (Instance 151) - 10 Bytes

A 10-byte configuration assembly is available for device-specific configuration parameters.

Modbus TCP Server

Standard Modbus TCP/IP server (port 502) provides additional protocol access:

All assembly data is stored in little-endian format (Modbus converts to big-endian for transmission).

Network Configuration

The device includes RFC 5227 compliant Address Conflict Detection (ACD):

Web-Based Configuration Interface

Essential device management via web interface:

Access the web interface at http://<device-ip>/ after the device has obtained an IP address.

Sensor Configuration

Configuration via web API:

The device automatically detects and uses MPU6050 if available, otherwise falls back to LSM6DS3.

Software Requirements

Connection Types

The device supports standard EtherNet/IP connection types: