---
title: "A good retrofit starts by leaving control alone"
locale: "en"
url: "https://irz.fr/en/articles/edge-link-read-before-write-en"
markdown_url: "https://irz.fr/en/articles/edge-link-read-before-write-en.md"
category: "tech"
tags: ["industry", "retrofit", "Arduino UNO Q", "PLC", "IIoT", "OT security"]
published_at: "2026-08-20T10:16:00.000Z"
author: "Camille Morel"
translation: "https://irz.fr/fr/articles/edge-link-read-before-write-fr.md"
---

# A good retrofit starts by leaving control alone

Edge Link shows how to add telemetry, a UNS and local AI to old equipment. Its current prototype is mostly upstream: remote control is exactly the part that should not be treated casually.

A twenty-year-old machine tool can be perfectly capable of making parts while being almost incapable of explaining itself to a modern dashboard. That is why retrofitting is attractive: keep the PLC, put a small box on the DIN rail, extract useful data and avoid replacing a control system that still does its primary job reliably.

**Edge Link**, built by Mukesh Sankhla around an Arduino UNO Q, demonstrates that idea.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb) Its prototype also exposes a boundary that enthusiastic descriptions can blur very quickly: **reading an old machine and sending remote commands into it are two different engineering projects**.

I audited the tutorial and public repository at commit `2047540`, and the current demonstration holds together well as a telemetry gateway and local analytics platform while leaving a closed control loop with a physical industrial PLC outside what the published code actually demonstrates.

## What runs

The enclosure clips onto a DIN rail, with an UNO Q inside combining a Qualcomm processor capable of running Linux and an STM32U585 microcontroller for work closer to the hardware.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)[8](https://docs.arduino.cc/hardware/uno-q/)

That split suits the intended role because the MCU can handle interfaces, I/O and deterministic tasks while Linux takes care of Python services, telemetry processing, the web interface, cloud connectivity and Edge Impulse models.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)

The prototype also carries status LEDs and a six-pin terminal. The tutorial wires that connector as **Rx, Tx, two grounds, 7–24 V VIN and 5 V**.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb) That detail matters because the demonstrated box exposes a simple serial connection rather than a complete industrial physical layer. A real RS-485, RS-232 or CAN installation would still need the appropriate transceiver and electrical interface; the tutorial itself lists those as possible additions depending on the target equipment.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)

> Illustration: Edge Link as a small DIN rail enclosure with terminal block and status LEDs. Mechanically, the box looks at home in an industrial cabinet. Electrically, the demonstrated terminal is still a simple serial interface; real field buses need their own physical layer. Credit: [Mukesh Sankhla / Arduino](https://blog.arduino.cc/2026/08/19/edge-link-is-a-diy-solution-to-upgrade-old-industrial-equipment/).

The gap between “could support Modbus” and “this exact assembly is an industrial RS-485 converter ready for the cabinet” begins right there.

## The virtual PLC

Sankhla is explicit near the end of his tutorial: **he did not have access to a real production line or industrial PLC**.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)

He therefore wrote a Python digital twin inspired by a Siemens S7-300. The simulator models five stations in an LED-bulb production line, an `OB1` scan at roughly 10 ms, data blocks, digital and analog I/O, alarms, counters, recipes, energy use and injectable faults.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

The path that has actually been tested is straightforward:

**PLC simulator on a PC → serial/UART → Edge Link → HMI, cloud storage and local models.**[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

The repository contains that complete chain. Edge Link parses messages such as `PLC_COUNTERS`, `PLC_TEST` and `PLC_ALARM`, retains history, updates its user interface and publishes structured records to Firestore.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

That is real integration work. It simply does not yet prove compatibility with a physical S7-300, an old Rockwell controller or a press whose protocol survives mostly in a binder and the memory of the technician who commissioned it.

## Read first

The most interesting boundary appears when following the code rather than the product claim.

In the published demo, information from the “PLC” flows **upstream**, with Edge Link receiving serial telemetry and processing it locally. A web event called `send_serial_command` sounds more bidirectional than it is because its handler feeds the submitted string into the local parser, chiefly to exercise inference inputs, instead of writing a command back to the PLC UART.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

The project does contain `LINE START`, `LINE STOP`, `LINE RESET` and emergency-stop controls, but those buttons belong to the **simulator’s** web server, where they mutate the Python PLC state directly.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d) No published path carries those commands from Edge Link into a physical PLC.

Even the hardware control shown on the MCU side remains deliberately modest, with RouterBridge calls mostly updating the enclosure’s status LEDs rather than actuating the simulated production process.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

> Illustration: Diagram comparing the demonstrated Edge Link chain with the engineering still required for a production retrofit. Left: what the repository demonstrates today. Right: the interfaces, semantics and safety boundary that still need engineering before the proof of concept becomes a production control interface. Credit: [IRZ illustration](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d).

For an initial retrofit, that asymmetry is arguably a feature. A read-mostly gateway can create value before it acquires any authority to alter the process.

## Give it names

Getting numbers out of a machine is only half the job, since an older controller may expose `DB12.DBD4`, Modbus register 40127 or a vendor variable whose meaning now exists only in a maintenance spreadsheet and somebody’s memory.

The OPC Foundation describes exactly this brownfield problem: existing machines often contain implicit models plus “tribal knowledge”, both vulnerable to misinterpretation or loss when the people who understand them move on.[4](https://reference.opcfoundation.org/specs/OPC-30400-1/5.3)

Edge Link uses a **Unified Namespace**, or UNS, to structure the information it collects.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb) In the repository, records are organised around plant and line hierarchy, historical points, quality tests, alarms and ML inference logs.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)

The value is larger than a dashboard. A useful retrofit translates “register 17” into something carrying units, equipment identity, meaning and context. Otherwise the opacity has merely moved from a PLC into the cloud, which is a surprisingly modern way to preserve an old problem.

## Local AI

Edge Link ships six Edge Impulse models in the demonstration: five station-specific models and one for the complete line.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d) Simulated features include vibration, temperature, current, pressure, force, optical readings and power factor depending on the station.

Inference runs locally on the UNO Q, leaving cloud storage to retain history and feed visualisation while anomaly detection remains independent of a network round trip.[1](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)

That separation makes good sense for **monitoring**. The tutorial then imagines going further, allowing a local decision to stop another machine after a detected fault, and Arduino mentions safety shutdowns as a possible use.[2](https://blog.arduino.cc/2026/08/19/edge-link-is-a-diy-solution-to-upgrade-old-industrial-equipment/)

Once an inference is allowed to alter the process, the engineering standard has to change with that new authority.

A model that lights a “vibration abnormal” indicator and a model authorised to stop machinery have very different consequences when a sensor fails, an inference is wrong, software crashes or the gateway is compromised. Low local latency does not by itself turn an ML output into a validated safety function.

## A new door

A retrofit can add something the old machine may never have possessed: a path toward much larger networks.

CISA recommends minimising network exposure for control systems, placing them behind firewalls and isolating them from business networks; remote access, where required, is itself a security boundary that needs deliberate controls.[5](https://www.cisa.gov/sites/default/files/recommended_practices/RP_Managing_Remote_Access_S508NC.pdf)[6](https://www.cisa.gov/news-events/ics-advisories/icsa-21-189-01)

This becomes especially important when the new gateway has a **write path** into the PLC. A telemetry-only link exposes observations; by contrast, a bidirectional link gives the gateway new authority over the process and therefore changes the failure modes that have to be considered.

The design questions should therefore be explicit: which variables may be read, which may be written, from which network zone, under what authorisation, and what happens when Edge Link fails, restarts or receives an inconsistent value?

The old PLC has not suddenly become unreliable; the retrofit has attached a new boundary to it, and that boundary deserves to be engineered as carefully as the machine around it.

## Test mode

The repository shows useful offline behaviour by buffering Firestore-bound events locally when connectivity disappears and replaying them after the connection returns.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d) In a workshop where cloud availability should never be required for the machine itself to keep working, that store-and-forward behaviour matters more than a permanently green connectivity icon.

The setup guide also instructs users to create Firestore in **test mode**.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d) That is convenient for a demo and not a setting to carry into a production deployment.

Firebase’s own security documentation warns that open development rules can let anyone who reaches the project read, modify or delete data, and explicitly says never to deploy unrestricted read/write rules in production.[7](https://firebase.google.com/docs/firestore/security/insecure-rules)

To be sure, calling Edge Link an “insecure product” would miss the point: the repository presents a working prototype whose deployment assumptions still sit well short of those expected from a hardened and certified OT gateway.

## Public, not licensed

The simulator and Edge Link application source are publicly visible in `MukeshSankhla/PLC_SIM`.[3](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d) At the audited commit, however, GitHub reports **no licence** and the repository contains no `LICENSE` file.

The code can be read and studied, although calling it an openly reusable software project under a defined open-source licence would be premature until the author adds one.

For a personal prototype the distinction may feel minor, whereas equipment expected to remain maintainable for another decade or two turns the right to modify and redistribute the gateway code into part of the retrofit decision.

## Modernise less

The chance to **modernise one boundary at a time** is the strongest part of Edge Link, because it creates useful observability without immediately changing the control path of equipment that may already be reliable.

Leave the PLC doing the job it already performs, copy the measurements worth collecting, give them stable names, buffer them locally and analyse them beside the machine; only the information that genuinely needs to leave the workshop has to travel further upstream.

Then, if there is a real reason to add remote control, treat that as a separate project with a separate risk analysis.

Sankhla’s prototype already demonstrates that first half surprisingly well, and it may actually be a healthier retrofit while the second half remains visibly unfinished instead of disappearing behind an attractive START button on a dashboard.

## References

1. [Mukesh Sankhla, Edge Link — Hackster.io](https://www.hackster.io/Mukesh_Sankhla/edge-link-26e6fb)
2. [Arduino, Edge Link is a DIY solution to upgrade old industrial equipment](https://blog.arduino.cc/2026/08/19/edge-link-is-a-diy-solution-to-upgrade-old-industrial-equipment/)
3. [Mukesh Sankhla, PLC_SIM / Edge Link repository, commit 2047540](https://github.com/MukeshSankhla/PLC_SIM/tree/2047540d5ed819ba127b210ce6ccb88816d78a7d)
4. [OPC Foundation, Retrofit OPC UA to existing machines](https://reference.opcfoundation.org/specs/OPC-30400-1/5.3)
5. [CISA, Configuring and Managing Remote Access for Industrial Control Systems](https://www.cisa.gov/sites/default/files/recommended_practices/RP_Managing_Remote_Access_S508NC.pdf)
6. [CISA, Rockwell Automation MicroLogix 1100 advisory — network exposure mitigations](https://www.cisa.gov/news-events/ics-advisories/icsa-21-189-01)
7. [Firebase, Fix insecure Firestore rules](https://firebase.google.com/docs/firestore/security/insecure-rules)
8. [Arduino UNO Q product documentation](https://docs.arduino.cc/hardware/uno-q/)
