N4AIA04 cheap modbus rtu Meets Python: Simplifying Modbus RTU Analog Data Acquisition

Introduction

Looking for a compact and affordable way to acquire industrial analog signals through Python?

The Eletechsup N4AIA04 4-channel analog input module provides an easy-to-integrate solution for monitoring voltage and current signals over an RS485 Modbus RTU network. It supports a combination of 0–5V, 0–10V, and 0–20mA/4–20mA input ranges, making it useful for sensor monitoring, industrial automation, remote measurement, and DIY control systems.

Python developers can also explore the open-source GitHub project cheap_modbus_rtu, which explicitly lists the Eletechsup N4AIA04 among its supported hardware devices.

GitHub repository: https://github.com/ul-gh/cheap_modbus_rtu

Official product page: https://eletechsup.com/products/n4aia04-dc-12v-4-20ma-0-5v-0-10v-voltage-signal-acquisition-rs485-modbus-rtu-module

1. What Is the Eletechsup N4AIA04?

The N4AIA04 is a compact analog signal acquisition module designed to read voltage and current signals and make their values available through Modbus RTU over RS485.

Key Specifications

Feature Specification
Analog input channels 4
Channel 1 0–5V voltage input
Channel 2 0–10V voltage input
Channel 3 (C1) 0–20mA / 4–20mA current input
Channel 4 (C2) 0–20mA / 4–20mA current input
Communication interface RS485
Protocol Modbus RTU
Supported function codes 03 and 06
Voltage resolution 0.01V
Current resolution 0.1mA
Stated measurement accuracy 1%
Supply voltage DC 8–25V
Typical operating current 10–14mA
Dimensions 45 × 30 × 15mm
Weight Approximately 10g

The combination of voltage and current inputs allows one module to monitor different types of analog signals without requiring a separate acquisition device for every signal type.

For the exact channel mapping, wiring, register addresses, and calibration procedure, refer to the official Eletechsup documentation.

2. Python Integration Through cheap_modbus_rtu

The GitHub project cheap_modbus_rtu, maintained by ul-gh, is a lightweight Python library for controlling Modbus RTU hardware.

Its README explicitly lists several Eletechsup devices, including:

  • N4AIA04 — four-channel analog input

  • R4DIF08 — eight-channel digital input

  • PWM8A04 — PWM output module

  • N4DAC02 — two-channel analog output

The repository provides a useful starting point for developers who want to integrate compatible hardware into Python-based applications rather than building every communication layer from scratch.

GitHub: https://github.com/ul-gh/cheap_modbus_rtu

Why This Matters for Developers

Using a device-oriented Python library can help simplify several parts of an integration project:

  • Connecting Python applications to Modbus RTU devices over a serial interface.

  • Organizing device-specific communication functions.

  • Building monitoring scripts and automated data collection tasks.

  • Integrating analog acquisition into larger software projects.

  • Reducing the amount of repetitive low-level communication code.

The repository's README identifies the N4AIA04 as supported hardware. Developers should still check the current source code and test their own hardware, serial settings, and firmware revision before deploying a system.

3. Example Application: Reading a 4–20mA Pressure Transmitter

Consider a pressure transmitter with a 4–20mA output.

The transmitter can be connected to an appropriate N4AIA04 current input, subject to the transmitter's wiring and power requirements. The module then makes the measured current available to a Modbus RTU master.

A Python application can use the reading to calculate pressure, display a measurement, record historical data, or trigger an alarm.

For example, suppose a pressure transmitter measures a range of 0–50mbar and outputs 4–20mA.

The conversion formula is:

Pressure (mbar) = (Measured current − 4) × 50 ÷ 16

Examples:

Measured current Calculated pressure
4mA 0mbar
8mA 12.5mbar
12mA 25mbar
16mA 37.5mbar
20mA 50mbar

This calculation is performed by the application. The N4AIA04 measures the current; the software maps that reading to the engineering unit specified by the sensor.

The same approach can be used with compatible current-output flow sensors, level transmitters, and other industrial instruments.

4. From RS485 Measurements to a Python Monitoring System

A typical system can be organized as follows:

Analog sensor → N4AIA04 → RS485 network → USB-to-RS485 adapter → Python application

The Python application can then:

  1. Poll the N4AIA04 using the appropriate Modbus RTU commands.

  2. Read and interpret the register values according to the official protocol document.

  3. Convert raw measurements into engineering units.

  4. Save the measurements to a database or CSV file.

  5. Display live values on a dashboard.

  6. Generate alerts when measurements exceed configured limits.

Before implementing the application, confirm the module's slave address, baud rate, serial format, register mapping, and scaling rules. The library's device definition and the official product protocol should be checked together.

5. Potential Applications

Industrial Monitoring

Read analog outputs from compatible pressure, flow, or other process sensors and transfer the measurements to a PC-based monitoring application.

Building Automation

Collect compatible analog signals from HVAC equipment and environmental monitoring instruments through an RS485 network.

Laboratory and Test Equipment

Use Python to automate measurement collection, logging, and basic analysis for experiments or test benches.

DIY Automation and Home Assistant Projects

Developers can use Python as a starting point for custom monitoring software or explore other Modbus integration projects when they want to expose analog measurements to a home automation platform.

Actual integration depends on the selected software, register configuration, and hardware testing.

6. An Open-Source Starting Point for Eletechsup Users

The cheap_modbus_rtu repository is a useful example of how Eletechsup hardware can be incorporated into an open-source Python development workflow.

It provides a public software reference that specifically names the N4AIA04, giving developers a starting point for investigating device integration and building their own applications.

This is evidence of public software support, but it should not be interpreted as proof of a particular commercial deployment or as a guarantee that every hardware configuration has been tested.

Conclusion

The Eletechsup N4AIA04 combines four-channel analog signal acquisition with RS485 Modbus RTU communication in a compact, low-power module.

For Python developers, the cheap_modbus_rtu GitHub project offers an additional starting point by explicitly listing the N4AIA04 as supported hardware.

Together, the hardware and software reference can help developers explore applications involving 4–20mA sensors, voltage monitoring, industrial data logging, and custom automation systems.

Explore the N4AIA04:
https://eletechsup.com/products/n4aia04-dc-12v-4-20ma-0-5v-0-10v-voltage-signal-acquisition-rs485-modbus-rtu-module

Explore the Python GitHub project:
https://github.com/ul-gh/cheap_modbus_rtu

SEO Keywords

Eletechsup N4AIA04, Modbus RTU analog input module, Python Modbus RTU, RS485 analog signal acquisition, 4–20mA current sensor interface, 0–5V analog input, 0–10V voltage measurement, Python industrial automation, Modbus RTU Python library, pressure transmitter monitoring, industrial data acquisition, RS485 sensor integration, open-source Modbus hardware.

Back to blog

Leave a comment