Tools Monorepo π οΈ (P1AM DCS/SCADA Control System)
A SCADA-style UCC project using a P1AM-100 PLC with W5500 Ethernet, Modbus TCP, FastAPI middleware, React HMI, SQLite logging, PID, and safety interlocks.
P1AM DCS/SCADA Control System β W5500 Ethernet-Based P1AM PLC Control and Monitoring Tool
URL Link
GitHub Repository:
https://github.com/D-sorganization/Tools Modbus TCP, FastAPI middleware, React HMI, SQLite logging, PID, and safety interlocks.
URL Link
GitHub Repository:
https://github.com/D-sorganization/Tools
WIZnet-relevant Subproject Path:
https://github.com/D-sorganization/Tools/tree/main/src/p1am_control_system
P1AM Firmware:
https://github.com/D-sorganization/Tools/tree/main/src/p1am_control_system/firmware
Recommended Components
- WIZnet W5500
- P1AM-ETH Shield
- Facts Engineering P1AM-100
- SAMD21G18A
- Arduino Ethernet Library
- ArduinoModbus
- Modbus TCP
- P1-04THM Thermocouple Module
- P1-4ADL2DAL-1 Analog I/O Module
- 4β20 mA Analog Input / Output
- Type-K Thermocouple
- PID Controller
- Safety Interlock
- EEPROM / FlashStorage
- Python FastAPI
- React / Vite HMI
- SQLite / SQLModel
- WebSocket Telemetry
- Rust tools_core Optional Acceleration
- SCADA / DCS Middleware
PROJECT DESCRIPTION
π Overview
D-sorganization/Tools is a large tools monorepo containing utilities for data processing, file management, scientific computing, MATLAB workflows, Python tools, web interfaces, and automation.
The entire repository is not a WIZnet hardware project. However, the subproject src/p1am_control_system is highly relevant to the WIZnet Maker Site.
This subproject builds a DCS/SCADA-style control system using a Facts Engineering P1AM-100 PLC with a P1AM-ETH W5500 Ethernet shield. The firmware integrates the P1AM backplane, thermocouple module, analog I/O module, PID controllers, safety interlocks, EEPROM-backed configuration, and a Modbus TCP server.
On the PC side, the project adds a Python FastAPI backend, WebSocket telemetry, SQLite historian, REST APIs, and a React / Vite HMI dashboard. This makes the project more than a simple firmware example. It is closer to a complete field-control stack combining PLC firmware + Ethernet communication + backend middleware + HMI frontend.
In short, this project is an open-source UCC example of using W5500 Ethernet to turn a P1AM PLC into a Modbus TCP-based SCADA control and monitoring system.
π Project / Organization Context
D-sorganization/Tools is a public tools monorepo released by the GitHub organization D-sorganization.
According to the repository structure, the project includes:
- Data processing tools
- File management tools
- Scientific computing tools
- MATLAB modeling and simulation tools
- Python utilities
- Web-based dashboards
- Project automation tools
- UnifiedToolsLauncher-based GUI launcher
- CI, linting, testing, and security scanning workflows
Therefore, the repository as a whole is a broad engineering toolkit rather than a single hardware project.
For the WIZnet Maker Site, the most relevant part is the src/p1am_control_system subproject. This subproject connects real PLC hardware, a W5500 Ethernet shield, Modbus TCP, analog I/O, thermocouples, backend APIs, and an HMI dashboard. It clearly shows how WIZnet Ethernet can be used inside a real control-system workflow.
π Project Popularity and Maturity
This project is different from a small Arduino sketch or a single-file UCC example. It is closer to a large public engineering monorepo.
Its maturity is shown by several factors:
- CI badge and Python 3.11+ support
- Ruff, MyPy, pytest, pre-commit, and security scanning workflows
- UnifiedToolsLauncher GUI architecture
- Python, MATLAB, Rust, React, and FastAPI components
- P1AM control system with firmware, backend, frontend, tests, calibration tools, and scripts
- Live PLC verification and bench handoff documentation
- Modbus TCP, safety interlocks, PID tuning, historian, WebSocket, and REST API support
The value of this project is not that it is a small, widely reused library. Its value is that it demonstrates a complete engineering control toolchain that combines software utilities, PLC firmware, middleware, and HMI design.
π What is P1AM DCS/SCADA Control?
P1AM is a modular PLC platform that connects industrial I/O modules with the Arduino ecosystem. The P1AM-100 controller allows users to build industrial-style control systems while keeping an Arduino-compatible development workflow.
In this project, the P1AM-100 is paired with a P1AM-ETH shield using W5500 Ethernet. The firmware runs a Modbus TCP server, allowing a backend or HMI system to read and write PLC tag values, input routing, output routing, PID configuration, and safety interlock limits.
From a DCS/SCADA perspective, the system works like this:
- P1AM hardware reads analog inputs and thermocouple values.
SignalBrokerstores those values as internal tags.- PID controllers compute control outputs based on mapped tag values.
- Safety interlocks evaluate lolo / low / high / hihi limits.
- W5500 Ethernet exposes the control system through Modbus TCP.
- A Python backend polls the PLC, logs data, and provides REST / WebSocket APIs.
- A React HMI dashboard gives operators a live interface.
This is not just a sensor-reading example. It is a compact, software-defined DCS/SCADA stack.
π What This Project Does
The WIZnet-relevant part of this project is centered around src/p1am_control_system.
Main functions include:
- P1AM-100 PLC firmware build and flash workflow
- P1AM-ETH W5500 Ethernet shield support
- Ethernet-based Modbus TCP server
- P1-04THM thermocouple module support
- P1-4ADL2DAL-1 analog input / output module support
- 10 Hz / 100 ms DCS scan loop
- 32 tag value system
- Input routing and output routing
- Four PID controllers
- Lolo / low / high / hihi safety interlock limits
- EEPROM / FlashStorage-based configuration persistence
- Modbus holding register map
- Heater relay command coil
- Emergency stop / safety inhibit behavior
- Python FastAPI backend
- SQLite historian logging
- WebSocket live telemetry
- REST APIs for routing, alarms, PID tuning, trends, and CSV export
- React / Vite HMI dashboard
- Calibration helpers and bench verification documentation
The important point is that the project includes both embedded firmware and the host-side software needed to operate it.
π Role and Application of the WIZnet Chip
Related WIZnet product: W5500
In this project, the W5500 is used as the Ethernet controller on the P1AM-ETH shield.
The firmware documentation describes the target hardware as a P1AM-100 PLC + W5500 Ethernet shield + P1-04THM + P1-4ADL2DAL-1 stack. The firmware uses the Arduino Ethernet library and ArduinoModbus to run a Modbus TCP server on TCP port 502.
The W5500 provides:
- Ethernet connectivity for the P1AM PLC
- Modbus TCP server communication
- A field communication path between PLC firmware and SCADA backend
- Exposure of tag values and configuration registers over Ethernet
- Remote control of PID, routing, and safety interlock configuration
- Real-time read/write access from the HMI and backend
In this project, W5500 is not just an Internet connectivity add-on. It is the core Ethernet interface connecting the field controller to the SCADA middleware.
π W5500 Ethernet Data Flow
The W5500 data flow is one of the most important parts of this project because it shows how Ethernet connects the field PLC, backend middleware, and HMI dashboard.
1. Field input acquisition
The P1AM-100 reads real-world signals through the P1AM backplane.
- The P1-04THM module reads thermocouple temperature values.
- The P1-4ADL2DAL-1 module handles analog input and analog output signals.
- The firmwareβs
P1AMHardwarelayer reads these hardware channels. - Raw sensor and analog values are converted into internal process tags.
2. Internal control loop
The firmware runs a 10 Hz / 100 ms DCS scan loop.
During each scan cycle:
- Hardware inputs are updated.
SignalBrokermaps physical inputs into tag values.- PID controllers compute output values.
- Safety interlocks evaluate lolo / low / high / hihi limits.
- Relay and analog output states are updated.
- Diagnostic values are refreshed.
This means the firmware behaves like a small PLC/DCS runtime.
3. Modbus register exposure
The internal tag and configuration data are exposed through Modbus TCP registers.
The register map includes:
0..63: tag values100..105: input routing110..111: output routing200..239: PID configuration300..555: interlock limitscoil 0: save-to-flash trigger- additional coils for control actions such as heater relay command or reset behavior
This register map acts as the contract between the embedded firmware and the host software.
4. W5500 Ethernet communication
The P1AM-ETH shield uses W5500 to provide Ethernet connectivity.
The firmware:
- Initializes Ethernet with the W5500 chip-select pin
- Starts an Ethernet server
- Runs a Modbus TCP server on port 502
- Accepts Modbus TCP client connections
- Serves register reads and writes over Ethernet
At this point, the W5500 becomes the bridge between the physical control system and the software system.
5. Backend polling and control
The Python FastAPI backend connects to the P1AM firmware over Modbus TCP.
The backend:
- Polls tag values from the PLC
- Reads routing and interlock configuration
- Writes updated configuration back to the PLC
- Applies operator commands
- Feeds live data into the backend state model
- Runs alarm and historian logic
- Sends updates through WebSocket
So, the backend is not directly connected to the hardware. It communicates through the W5500-based Modbus TCP interface.
6. HMI dashboard visualization
The React / Vite HMI dashboard connects to the backend, not directly to the PLC.
The dashboard can display:
- Live tag values
- Process trends
- Alarm state
- Routing matrix
- PID configuration
- Interlock limits
- Power supply or temperature control panels
- System status and polling state
When an operator changes a setting in the HMI, the command flows back through:
HMI β FastAPI backend β Modbus TCP client β W5500 Ethernet β P1AM firmware β control loop
7. Data logging and historian path
The backend also stores process data into SQLite / SQLModel historian tables.
The logging flow is:
P1AM sensors β firmware tags β W5500 Modbus TCP β FastAPI polling loop β SQLite historian β trend API / CSV export / HMI graph
This shows how W5500 is part of a full data pipeline, not only a communication accessory.
Data Flow Summary
The complete W5500-centered data flow can be summarized as:
Thermocouple / Analog I/O β P1AM firmware β SignalBroker tags β PID / Interlock logic β Modbus register map β W5500 Ethernet β FastAPI backend β WebSocket / REST API β React HMI / SQLite historian
This makes the project a strong WIZnet Maker Site example because it shows W5500 being used as the Ethernet backbone of a practical PLC/SCADA system.
π Features
P1AM-100 PLC firmware
Firmware targeting the P1AM-100 platform, built and flashed with Arduino CLI and the P1AM board package.
W5500 Ethernet / P1AM-ETH
The P1AM-ETH shield provides W5500-based Ethernet communication.
Modbus TCP server
The firmware runs a Modbus TCP server on TCP port 502, allowing SCADA software to read and write registers and coils.
10 Hz DCS scan loop
The firmware processes hardware input, PID computation, interlock evaluation, relay command, and diagnostic tag updates at a 100 ms scan interval.
Analog and thermocouple I/O
The P1-4ADL2DAL-1 module provides analog input/output, while the P1-04THM module provides thermocouple input.
PID control
Four PID controllers can be configured through Modbus registers.
Safety interlock
Each tag can have lolo / low / high / hihi limits, enabling safety-aware process control.
Persistent configuration
EEPROM / FlashStorage is used to save configuration and restore it after reboot.
FastAPI backend
The Python backend provides PLC connection management, polling, historian logging, alarm processing, routing, PID tuning, CSV export, and WebSocket telemetry.
React HMI dashboard
A React / Vite frontend provides an operator interface for monitoring and control.
Calibration and bench workflow
The repository includes calibration helpers, live-PLC verification workflows, and bench handoff documentation.
π System Architecture
The project can be divided into five layers: firmware layer, Ethernet communication layer, backend layer, HMI layer, and data/history layer.
In the firmware layer, the P1AM-100 handles thermocouples, analog input, analog output, relays, safety interlocks, PID control, and configuration persistence.
In the Ethernet communication layer, the W5500-based P1AM-ETH shield provides Modbus TCP communication. Holding registers and coils expose tag values, routing configuration, PID configuration, interlock limits, and save triggers.
In the backend layer, the FastAPI service connects to the PLC through Modbus TCP and provides polling, REST APIs, alarm processing, historian logging, and WebSocket streaming.
In the HMI layer, the React frontend provides operator dashboards, alarm views, routing matrices, tag inspection, trend charts, power supply control, and temperature control screens.
In the data/history layer, SQLite and historian logic store tag logs, trends, alarm events, and exportable CSV data.
π Usage, Market, and Application Value
This project is useful for:
- P1AM-100-based small PLC control systems
- W5500 Ethernet-based Modbus TCP experiments
- Educational DCS / SCADA demos
- Thermocouple and analog I/O process control
- PID tuning experiments
- Safety interlock design
- FastAPI + PLC middleware development
- React HMI dashboard development
- SQLite historian / trend logging
- Industrial Ethernet I/O and Python backend integration
- Test bench automation
- Power supply or temperature control experiments
From the WIZnet Maker Site perspective, this is a strong UCC candidate because it shows W5500 being used as the Ethernet interface in a practical PLC/SCADA architecture, not merely as a simple web server or sensor uplink.
π Similar Existing WIZnet Maker Site Content
It is difficult to find an existing WIZnet Maker Site post that exactly matches P1AM-100 + W5500 + Modbus TCP + SCADA backend. However, the following contents are related from the perspectives of Ethernet I/O, industrial monitoring, relay automation, sensor threshold action, and PLC/SCADA applications.
1. Programmable IoT Edge ESP32 Ethernet IO Module
URL Link:
https://maker.wiznet.io/matthew/resellers/programmable-iot-edge-esp32-ethernet-io-module/
Why it is similar:
This content introduces an ESP32 Ethernet I/O module for remote monitoring, secure I/O control, MODBUS TCP, MQTT, FTP, Ethernet, Wi-Fi, Bluetooth, industrial I/O, and PLC/SCADA applications.
The P1AM control system in D-sorganization/Tools is similar because it also focuses on Ethernet-based monitoring and control. The strongest shared keywords are Modbus TCP, field I/O, SCADA backend, and industrial control.
Difference:
The Programmable IoT Edge ESP32 Ethernet IO Module is closer to a commercial Ethernet I/O device or general-purpose industrial I/O module.
The P1AM control system is an end-to-end development project that includes P1AM-100 PLC firmware, W5500 Ethernet shield, Modbus register map, Python FastAPI backend, React HMI, SQLite historian, PID control, and safety interlocks.
Expansion value:
The existing content shows an Ethernet I/O module. This project shows how Ethernet I/O can be expanded into a complete SCADA middleware and HMI dashboard system.
2. Alert System Using W5100S-EVB-Pico & AWS SNS
URL Link:
https://maker.wiznet.io/gemma/projects/alert-system-using-w5100s-evb-pico-aws-sns/
Why it is similar:
This project sends alerts through AWS IoT Core and AWS SNS when a sensor value exceeds a threshold.
The P1AM control system is related because it also uses threshold-based logic. However, instead of only notifying the user, it evaluates lolo / low / high / hihi limits and can apply safety interlock behavior to the control system.
Difference:
The AWS SNS Alert System is a cloud notification project.
The P1AM control system is field-control oriented. When a value crosses a limit, the system can inhibit outputs, force relay behavior, show the event in the HMI, and store event data in the historian.
Expansion value:
The existing content shows βsensor threshold β cloud alert.β This project expands that into βprocess tag limit β safety interlock β control action β historian / HMI visibility.β
3. WizOnOff
URL Link:
https://maker.wiznet.io/nk_maker/contest/wizonoff/
Why it is similar:
WizOnOff is a standalone automation controller with relays and a DS18B20 temperature sensor. It is related to the P1AM control system from the perspective of temperature-based automation and relay control.
The P1AM control system also performs control actions based on thermocouple values, analog signals, relay commands, and safety limits.
Difference:
WizOnOff is a general IoT relay automation project.
The P1AM control system is closer to a PLC-grade control stack. It includes thermocouple modules, 4β20 mA analog I/O, Modbus TCP, PID, interlocks, FastAPI backend, React HMI, WebSocket telemetry, and historian storage.
Expansion value:
WizOnOff shows temperature sensor + relay automation. The P1AM control system expands that into industrial process control + Modbus TCP + SCADA dashboard.
π Difference and Expansion Value Compared with Existing Maker Site Content
Compared with many WIZnet Maker Site examples, this project is different in several ways.
First, it is a PLC-style control system, not just an I/O demo.
The W5500 Ethernet interface exposes tag values, routing configuration, PID configuration, and safety limits through Modbus TCP.
Second, it includes firmware and backend together.
Many UCC projects provide either embedded firmware or a web UI. This project includes P1AM firmware, FastAPI backend, React HMI, SQLite historian, calibration helpers, and tests.
Third, it has a clear safety interlock model.
The lolo / low / high / hihi limit structure is closer to real process control than a simple sensor threshold alert.
Fourth, W5500 acts as a field communication backbone.
It is not just a web access interface. It connects the PLC firmware to the SCADA middleware through Modbus TCP.
Fifth, it contains real bench workflow details.
The documentation includes P1AM board package setup, correct FQBN warning, W5500 CS pin conflict, module slot assignment, live PLC verification, and calibration workflows.
Sixth, it expands Maker Site coverage into industrial control and SCADA.
It moves beyond sensor, relay, and cloud examples into PLC, Modbus TCP, HMI, historian, PID, and safety interlock territory.
This project can be positioned as:
Ethernet I/O module β Modbus TCP field controller β SCADA backend β HMI dashboard β safety-aware process control
π Additional Insight for W5500 Makers
The biggest value for W5500 makers is that this project uses W5500 as the core network interface of a real control system.
Many W5500 examples stop at a simple web server, TCP client, or sensor data upload. This project uses W5500 in a more industrial way:
- P1AM-ETH shield with W5500 Ethernet
- Modbus TCP server on port 502
- 10 Hz scan loop with Modbus register synchronization
- Analog I/O, thermocouple, PID, and interlock integration
- Backend polling through Modbus TCP
- WebSocket telemetry
- SQLite historian and trend queries
- Operator HMI dashboard and REST API
- Hardware-aware notes such as W5500 CS pin conflict
This makes the project a good example of how W5500 can be used in PLC/SCADA and industrial control workflows.
π Things to Know Before Building
This is not a simple Arduino demo. Before building or testing, users should check:
- P1AM-100 hardware and P1AM-ETH shield are required.
- The correct P1AM board package and FQBN must be used.
- Using the wrong Arduino Zero FQBN can cause bootloader problems.
- The P1AM-ETH shield uses D5 for W5500 chip-select, so D5 must not be used for another GPIO purpose.
- The P1-04THM and P1-4ADL2DAL-1 module slot assignment must match the firmware.
- The Modbus TCP server uses port 502.
- The host PC and PLC should be on the same isolated Ethernet subnet.
- Python and Node.js are required to run the backend and frontend.
- Real relay, analog output, heater relay, and interlock usage must follow electrical and process safety practices.
- Safety interlocks must be validated against the real plant or bench setup.
π Summary
D-sorganization/Tools is a large tools monorepo for data processing, scientific computing, file management, automation, and web tooling. The WIZnet-relevant content is the src/p1am_control_system subproject.
This subproject uses a Facts Engineering P1AM-100 PLC with a P1AM-ETH W5500 Ethernet shield to build a Modbus TCP-based control system. The firmware provides a 10 Hz DCS scan loop, PID controllers, safety interlocks, persistent configuration, thermocouple input, analog I/O, and Modbus register access. The backend expands the system with FastAPI, WebSocket telemetry, SQLite historian, REST APIs, and a React HMI dashboard.
From a WIZnet perspective, the key point is that W5500 is used as the Ethernet backbone between the PLC firmware and the SCADA middleware. It enables a full data path from physical sensors and analog signals to Modbus TCP, backend services, historian storage, and HMI visualization.
On the WIZnet Maker Site, this project can be introduced as a W5500 Ethernet-based P1AM PLC control, SCADA middleware, and HMI integration UCC project.
π FAQ
Q1. What is this project?D-sorganization/Tools is a large tools monorepo. The WIZnet-relevant part is src/p1am_control_system, a P1AM-100 PLC control system using W5500 Ethernet and Modbus TCP.
Q2. Which WIZnet chip is used?
W5500 is used through the P1AM-ETH shield.
Q3. What MCU / PLC does it use?
It uses the Facts Engineering P1AM-100 PLC, based on SAMD21G18A.
Q4. What protocol is used?
The firmware runs a Modbus TCP server on TCP port 502.
Q5. What I/O does it handle?
It handles P1-04THM thermocouple input, P1-4ADL2DAL-1 analog input/output, heater relay, and inhibit output.
Q6. Is it only a firmware project?
No. It also includes a Python FastAPI backend, WebSocket telemetry, SQLite historian, React HMI dashboard, and calibration scripts.
Q7. How does W5500 fit into the data flow?
W5500 connects the P1AM firmware to the backend over Modbus TCP. Field signals become firmware tags, tags are exposed as Modbus registers, and the backend reads/writes them through the W5500 Ethernet interface.
Q8. Why is it meaningful for the WIZnet Maker Site?
Because it shows W5500 being used in a realistic PLC/SCADA workflow, not just as a simple network adapter.
