Technimal

EDGE 2IO — Modbus I/O Module

2-input / 1-output module · Modbus TCP & RTU · mDNS discovery
Model: E02XXXX FW 1.0.3 24 Vdc Ethernet + RS-485 24-pin terminal

Datasheet & User Manual · MODEL E02XXXX · Document rev 1.1 · 2026-06-18

1. Overview

The EDGE 2IO Modbus I/O Module is an industrial I/O device with 2 configurable analog/digital inputs and 1 analog output. It is exposed simultaneously over Modbus TCP (Ethernet) and Modbus RTU (RS-485), sharing one register map, and is discoverable on the LAN via mDNS / Zeroconf. A supervisory platform browses mDNS, reads capability metadata from TXT records, then polls/controls the device — no static IP or manual register-map documentation required for integration.

2. Key Features

I/O

  • 2× inputs, each: Digital, 0–10 V, or 4–20 mA
  • analog output 0–5 Vdc (0–100 %)
  • Single-colour status LED

Connectivity

  • Modbus TCP over Ethernet, port 502
  • Modbus RTU over RS-485 (concurrent)
  • mDNS service advertisement
  • DHCP client (static IP optional)

Configuration

  • All params via Modbus registers
  • NVS persistence (survives reboot)
  • SoftAP web portal for provisioning

Safety

  • Configurable fail-safe output on link/master loss
  • Output OFF at boot until first write
  • 4–20 mA wire-break detection

3. Specifications

ParameterValue
Power supply24 Vdc
Firmwaree02_modbus v1.0.3
Inputs2 × (Digital / 0–10 V / 4–20 mA), software-selectable per channel
Output1 × analog 0–5 Vdc, 0–100 %
Ethernet10 Mbps, full-duplex (RJ45)
SerialRS-485 half-duplex (terminals A / B)
ProtocolsModbus TCP (port 502) + Modbus RTU, concurrent; mDNS
AddressingDHCP client; static IP fallback configurable

4. Pin Layout (MODEL E02XXXX)

24-pin terminal block. Ethernet is on the separate RJ45 jack.

NoSymbolTypeDescription
1VssPowerPower supply ( 24 Vdc )
2GNDGND ( 0 Vdc )
3VssPower supply ( 24 Vdc )
4GNDGND ( 0 Vdc )
5DI1+Digital InputPositive signal digital input ( 24/0 Vdc type )
6DI1-Negative signal digital input ( 24/0 Vdc type )
7DI2+Positive signal digital input ( 24/0 Vdc type )
8DI2-Negative signal digital input ( 24/0 Vdc type )
9O+Analog OutputPositive signal output ( 5/0 Vdc type )
10O-Negative signal output ( 5/0 Vdc type )
11J1DebugFor setting ( shorting J1 and J2 for setup mode )
12J2For setting ( shorting J1 and J2 for setup mode )
13SDAI2CI2C pin
14SCLI2C pin
15AModbusD+ ( modbus rtu signal )
16BD- ( modbus rtu signal )
17V1+Analog InputPositive voltage signal input ( 0-10 Vdc type )
18V1-Negative voltage signal input ( 0-10 Vdc type )
19V2+Positive voltage signal input ( 0-10 Vdc type )
20V2-Negative voltage signal input ( 0-10 Vdc type )
21A1+Positive current signal input ( 0-20 mA type )
22A1-Negative current signal input ( 0-20 mA type )
23A2+Positive current signal input ( 0-20 mA type )
24A2-Negative current signal input ( 0-20 mA type )

Each logical input has voltage (V) and current (A) terminals plus a digital mode; the active source is chosen by the channel's input-mode register (see §5.1). Connect J1–J2 at power-on to enter setup/provisioning mode.

5. I/O Channels

5.1 Inputs

Each input's mode is set by its mode register (0=Digital, 1=4–20 mA, 2=0–10 V, 3=Count). Values are reported over Modbus in engineering units:

ModeReported valueExample
Digital0 / 1 (debounced, 3 consistent reads @ 10 ms)1 = high
4–20 mAcenti-mA (mA × 100)2000 = 20.00 mA
0–10 Vcenti-volt (V × 100)1000 = 10.00 V
Countaccumulated rising edges on the digital input (wraps at 65535, resets on reboot)1234 = 1234 pulses

In 4–20 mA mode a reading below ~3.5 mA sets the wire-break status flag.

Invert: any digital input can be inverted (report 0↔1) via the config portal — set the Invert inputs bitmask (bit 0 = input 1, bit 1 = input 2). Applies to Digital and Count modes; use it when the field wiring/sensor is active-low. Default off.

5.2 Output

The output register holds a percentage 0–100, scaled to the 0–5 Vdc analog output (terminals O+ / O−). Writes take effect immediately. At boot and during fail-safe the output is forced to a defined value (default 0 %).

6. Network & Discovery

TXT records (capability advertisement):

KeyExampleMeaning
modele02_modbusDevice model
fw1.0.0Firmware version
i2Input channels
o1Output channels
unit1Modbus unit/slave ID
protomodbus-tcpProtocol identifier
macB4E62DDE225DWiFi MAC (no colons)

7. Modbus Interface

ParameterTCPRTU (RS-485)
RoleSlave / Server (always)Selectable: Off / Slave / Master
TransportEthernet (RJ45) or WiFi, port 502RS-485 (terminals A / B)
AddressUnit ID (MBAP)Slave address = Unit ID register
Default line9600 baud, 8N1 (configurable)
Function codes03 (read holding), 06 (write single holding); as a master it also issues 04 (read input)
Byte orderBig-endian (standard Modbus)

RS-485 mode, baud / parity / stop-bits and the unit/slave id take effect after a reboot (the Modbus controllers are created once at startup).

7.1 RS-485 modes

There is a single RS-485 port, so it is either a slave or a master — never both. Modbus TCP keeps serving as a slave in all three modes.

ModeValueBehaviour
Off0RS-485 idle; TCP only.
Slave1Default. A remote master reads/writes this device over RS-485, sharing the same registers as TCP.
Master2This device polls remote slaves and republishes what it reads into its own registers, so a TCP client reads local I/O and remote values from one table. See §8.1.

8. Register Map (Holding Registers)

Read with FC 03, write with FC 06. Layout: configuration block first, then live I/O.

AddrRegisterAccessPersistNotes
0Unit ID / RTU addressR/WNVS1–247; effective after reboot
1Input 1 modeR/WNVS0=Dig, 1=4–20 mA, 2=0–10 V, 3=Count
2Input 2 modeR/WNVSsame
3Fail-safe output valueR/WNVSpercent 0–100
4Fail-safe timeout (s)R/WNVS0 = disabled
5RS-485 modeR/WNVS0=off, 1=slave, 2=master; effective after reboot
6RTU baud / 100R/WNVS96=9600 … 1152=115200
7RTU parityR/WNVS0=none, 1=odd, 2=even
8RTU stop bitsR/WNVS1 or 2
9Input 1 valueRscaled (see §5.1)
10Input 2 valueRscaled (see §5.1)
11OutputR/Wpercent 0–100 (→ 0–5 Vdc)
12Status flagsRbitfield (below)
13Master poll statusRbit i = poll entry i failed (master mode only)
14–45Master poll resultsRremote registers, packed in entry order (master mode only)

Registers 13–45 exist on every build but read 0 unless RS-485 is in master mode. Addresses 0–12 are unchanged from earlier firmware.

Status flag bits (register 12)

BitMaskMeaning
00x01Ethernet link / IP up
10x02Modbus master polled recently (any transport)
20x04Input 1 wire-break (4–20 mA < 3.5 mA)
30x08Input 2 wire-break
40x10Output forced to fail-safe
50x20RS-485 running as a slave
60x40RS-485 running as a master (polling)

8.1 RS-485 master mode — polling plan

In master mode the device polls up to 8 entries, each a block read from one remote slave, repeating the whole sweep every sweep interval (default 1000 ms, min 100 ms). Entries are configured in the web portal (§11.2) as slave,fc,start,count.

FieldRangeMeaning
slave1–247remote device address on the RS-485 bus
fc3 or 43 = read holding registers, 4 = read input registers
start0–65535first register address on the remote device
count1–16how many consecutive registers to read

Results are packed in entry order starting at register 14, up to 32 registers in total. Example:

EntryConfigured asLands in
P05,3,100,4registers 14–17 (slave 5, holding 100–103)
P17,4,0,2registers 18–19 (slave 7, input 0–1)
If a remote device stops answering, its result registers keep their last good values and the entry's bit is set in register 13. Always check register 13 before trusting a value — a held reading is indistinguishable from a live one otherwise.

Unused or invalid entries are skipped and take no result registers; they are reported on the serial console at boot. A total exceeding 32 registers drops the overflowing entries.

9. Status LED

StateLEDMeaning
ProvisioningFast blinkConfig mode (SoftAP portal active)
InitializingSlow blinkBooting, network not ready
RunningSolid ONNormal operation (Modbus serving)

10. Fail-safe & Boot

Boot sequence: init I/O + safe output (LED slow-blink) → bring up Ethernet, acquire DHCP → start mDNS + Modbus TCP/RTU slaves (LED solid) → enter input-poll loop.

11. Configuration (Manual)

11.1 Via Modbus

Write configuration registers (0–8) with FC 06. Config values persist to NVS. Transport/serial params (unit id, RTU baud/parity/stop/enable) apply on the next reboot; input modes, output and fail-safe values apply live.

11.2 Config mode — SoftAP web portal

Every firmware (Converter and Timestamp) uses the same way to enter config mode; only the settings shown on the page differ by firmware.

You can also configure a running device over the network. The same page is served on the device's normal LAN address (http://<device-ip>/) during operation — no jumper needed. It asks for a password (any user name; default edge12345, change it under Security on that page), because it shows the stored WiFi and MQTT passwords. Use the SoftAP route below when the device has no usable network yet.

Enter config mode (identical for all firmwares):

  1. Short J1–J2 (terminals 11–12) at power-on / reset — the LED blinks fast.
  2. Join WiFi AP E02-xxxxxx (password edge12345).
  3. Open http://192.168.4.1/.
  4. Save & Reboot → settings persist to NVS and the device reboots into normal operation.

Common to all firmwares — network:

FieldPurpose
WiFi SSID / PasswordWiFi STA join (blank SSID = WiFi off)
WiFi static IP + IP / Gateway / Subnet / DNS1 / DNS2fixed IP on WiFi (unchecked = DHCP)
Ethernet static IP + IP / Gateway / Subnet / DNS1 / DNS2fixed IP on Ethernet (unchecked = DHCP)

Converter firmware — Modbus settings (shown only on the Converter build):

FieldPurpose
Unit ID / RTU addressModbus slave id
Input 1 mode / Input 2 mode0=Digital, 1=4–20 mA, 2=0–10 V, 3=Count
Fail-safe output % (0–100)output applied on Modbus loss / boot
Fail-safe timeout s0 = disabled
Invert inputs (bitmask)bit 0 = input 1, bit 1 = input 2 (report 0↔1)
RS-485 Modbus RTU modeOff / Slave / Master (applies on reboot) — see §7.1
Baud / Parity / Stop bitsRS-485 line settings, both modes (applies on reboot)
Sweep interval msMaster mode: how often the whole polling plan repeats (min 100)
P0 … P7Master mode: polling plan, one entry per box as slave,fc,start,count; blank = unused. See §8.1

Timestamp firmware — MQTT / event settings (shown only on the Timestamp build): broker host/port, client id, username, password, device code, NTP server and Input edge. See §15 · Provisioning for the full list.

Security: Modbus is unauthenticated (per the standard). Deploy only on trusted networks. Change the default SoftAP password per site policy.

12. Firmware Update

Update the firmware over USB from a Chrome / Edge browser — no tools to install. Open the web flasher, pick the model and version, connect, and flash:

flasher.technimal.co.th

Stored configuration (unit id, modes, RS-485, etc.) is preserved across an update unless you choose Erase device.

13. Calibration

For best accuracy, calibrate the analog inputs with a 2-point reference per mode (e.g. apply 0 V & 10 V on a voltage input, 4 mA & 20 mA on a current input) and confirm the reported values match a reference meter.

14. Troubleshooting

SymptomCheck
No IP / not discoverableEthernet cable & RJ45 link; DHCP server present; LED stuck slow-blink = no IP yet
TCP master can't connectConfirm the device IP, port 502 open, only the needed master polling
RTU no responseRS-485 mode = 1 (slave) in reg 5; matching baud/parity/stop & slave address; A/B terminals (15/16) & ground
Master poll fails (bit set in reg 13)RS-485 mode = 2; remote slave address / FC / register range correct; matching line settings; A/B wiring & termination
Analog values wrongCalibrate the analog inputs (§13); verify the input-mode register & wiring (V/A terminals)
Output not changingWrite percent 0–100 to register 11; check fail-safe isn't active (status bit 4)
Can't enter config modeShort J1–J2 (terminals 11–12) at power-on; LED should switch to fast blink

15. Timestamp Firmware (variant)

An alternative firmware for the same board that timestamps input edges (proximity / counting sensors) and streams each event to the new_owl IIoT platform over MQTT — instead of the Modbus register interface. Select Timestamp Firmware in the web flasher. Same pinout & terminals.

ItemBehaviour
InputsBoth 2 digital inputs are edge event inputs with a selectable capture edge (rising / falling / both, set in the config portal). No input-mode selection — single fixed function.
Per eventPublishes {"tags":{"inK":1},"ts":<epoch_ms>} to device/<device_code>/telemetry (K = input 1–2).
TimestampEach edge is stamped locally from an SNTP-synced clock (epoch ms). The server honours the device timestamp, so buffered / back-dated events keep their real event time.
Store-and-forwardRAM ring buffer (2048 events) retries on network / broker outage or backpressure; QoS 1 with delivery ack (an event leaves the buffer only after the broker confirms).
BrokerMQTT (EMQX), plain TCP port 1883.

Throughput & buffering

Two independent ceilings apply — how fast edges can be captured, and how fast events can be delivered to the server. Event timestamps are stamped in the interrupt at microsecond resolution, so timing stays accurate even when delivery lags.

LimitValueSet by
Capture rate (per input)set by the configurable debounce (default 1 ms → up to 1 kHz): edges closer together than the debounce on the same input are discarded. Max rate per input ≈ 1000 / debounce_ms. Inputs are debounced independently, so the aggregate is 2× that across the 2 inputs.debounce setting (config portal)
Timestamp resolutionmicrosecond (captured in the ISR) — buffered / back-dated events keep their true event timehardware timer
Sustained delivery (to server)one QoS 1 publish at a time (waits for the broker PUBACK before the next), so the continuous rate ≈ 1 / broker round-trip: ~200–1000 ev/s on the same LAN, ~65–200 ev/s over WiFi to a LAN broker, ~10–30 ev/s across the internetQoS 1 ack round-trip (network)
Burst headroom2048 events — short bursts above the sustained rate are buffered in RAM and drained later. If the average input rate stays above the sustained delivery rate, the buffer fills and the oldest events are dropped.RAM ring buffer size

Typical proximity / counting use (< 50 Hz) sits well within every limit. For higher sustained rates: shorten the debounce (cleaner signals only), or batch several events per MQTT message (requires a matching change on new_owl).

Provisioning

Create the device on the new_owl server, then copy its MQTT fields into the config portal (short J1–J2 at boot → http://192.168.4.1/):

Portal fieldFrom the new_owl device
Broker host / portyour EMQX broker (platform host : 1883)
Client IDmqtt_client_id
Usernamemqtt_username
Passwordmqtt_password
Device codedevice_code → topic device/<code>/telemetry
NTP servera reachable NTP host (default pool.ntp.org) — needed for event epoch time
Input edgecapture edge: 0=rising, 1=falling, 2=both (default 0)
Debounce msblanking time after an accepted edge, per input (default 1, 0=off, max 10000) — see below

Tuning the debounce

A noisy or bouncing sensor can register several edges for one real pulse, inflating counts. Raising the Debounce ms value ignores further edges on that input for the given time.

Do not set it higher than needed. The debounce is also a hard rate limit: real pulses arriving closer together than the debounce are silently discarded. Keep it below the shortest genuine gap between pulses — max rate ≈ 1000 / debounce_ms (e.g. 50 ms caps that input at ~20 Hz).

The device log (viewable in the web flasher) prints a status line every 5 seconds:

status: link=1(eth=1,wifi=0) mqtt=1 time=1 | in=[01] buf=0 captured=12 sent=12 dropped=0 bounced=37
SymptomMeaningAction
bounced rising, counts now correctdebounce is filtering the noisekeep the current value
bounced ~0 but counts still too highthe extra counts are not bounce (wiring / EMI / wrong edge)check wiring and Input edge, not the debounce
real pulses missingdebounce exceeds the pulse intervallower it
Inputs use no internal pull — the board's opto-isolated input circuit drives the level (idle high, pulled low when 24 Vdc is applied across DI+/DI−). Pick the Input edge to match your sensor: capture on the assertion (24 V applied → falling) with 1, or on release (rising) with 0; both give the same pulse count. WiFi & static IP are configured as usual; the device also connects over Ethernet. Events captured before the clock syncs or while offline are buffered and sent with their correct timestamp once connected.

16. Edge-MQTT Firmware (variant)

A third firmware for the same board. It samples the I/O on a fixed interval and publishes the readings as named tags to the new_owl platform over MQTT — what the legacy Edge firmware did over CoAP, but with every setting entered in the web portal instead of being pushed by the server. Select Edge-MQTT Firmware in the web flasher. Same pinout & terminals.

ItemBehaviour
Sourcesthe 2 local inputs, plus any registers read from remote slaves in RS-485 master mode. Only channels you give a tag name to are published.
Per publish{"tags":{"<your_tag>":<value>,...},"ts":<epoch_ms>} to device/<device_code>/telemetry — the same shape the Timestamp firmware uses, so new_owl auto-creates the tags from the names you choose.
IntervalPublish interval s in the portal (default 60 s, range 1–3600).
Store-and-forwardRAM ring of 48 payloads; samples taken while the broker is unreachable are sent later with their original timestamp. QoS 1 — a payload leaves the buffer only once the broker confirms it. Oldest is dropped if the buffer fills.
Not includedno Modbus slave interface (nothing reads this device), and no commands from the server — it only publishes.

Naming the tags

Portal fieldMeaning
Input 1–2 tagtag name for that local input. Blank = not published.
Poll entry P0..P7one remote read per box, written as tag,slave,fc,start,count,dtype,order. fc: 3=holding, 4=input. dtype: 0=u16, 1=s16, 2=u32, 3=s32, 4=float32. order: 0=high word first (Modbus default), 1=low word first. count is how many registers make up the value (1 for 16-bit, 2 for 32-bit). Each entry becomes one tag; a blank tag is not published.
An entry whose last sweep failed is skipped rather than published with a stale value, so a dead slave leaves a gap in the series instead of a flat line. MQTT, NTP, WiFi and static IP are configured exactly as for the Timestamp firmware (§15).