Autonomous RFID field exploration — multi-project system based on ESP32 and Raspberry Pi
The research project presents a distributed control system architecture for a mobile robot, based on two computational units, aimed at the automatic identification of RFID tags distributed on a board in a square grid layout.
Hardware Architecture
The system consists of two computational nodes communicating wirelessly:
- Master unit (master)— a quad-core Raspberry Pi single-board microcomputer. It is responsible for managing the board exploration process and communication with the robot.
- Execution unit (slave) — a small mobile robot equipped with a dual-core ESP32 microcontroller and an RFID reader.
Unlike the initial versions of the system [1, 2, 3], which were based on dedicated class (2,0) microrobots and C/C++ software, the presented solution utilizes widely available hardware platforms and software written in accordance with the IEC 61131-3 standard.

Software and Control Organization
The software controlling the entire system was developed in the ST (Structured Text) language as a single integrated project within the CPDev programming and execution environment. During the implementation stage, sub-projects were extracted from it for the individual CPDev virtual machines (runtime), expanded to include mutual data exchange.
The task allocation among the processor cores is as follows:
Raspberry Pi — Master Unit
- Logic cores — The CPDev1 and CPDev2 virtual machines run on these cores. They are responsible for the exploration algorithms and generating movement commands.
- System handling — The remaining two cores, operating under the Linux operating system, handle the virtual machine interfaces, execute system functions, and ensure Wi-Fi communication.
ESP32 — Robot Control
- Core 1 — Hosts the CPDev3 virtual machine, which receives commands from the master unit.
- Core 2 — Handles direct motor control.
As part of the implementation work, the factory software was replaced with a custom solution utilizing PID and bang-bang controllers.
Communication and Data Exchange
The system features a uniform data exchange mechanism, independent of the transmission medium.
- Within the Raspberry Pi (CPDev1 ↔ CPDev2)— The exchange of global variables occurs via shared memory.
- Between units (CPDev2/3 ↔ CPDev1)— Communication takes place wirelessly (Wi-Fi), maintaining the exact same variable addressing mechanism.
Experimental Results and Limitations
The operation of the control system was verified during laboratory tests. Despite the use of proven control algorithms, the problem of a gradual degradation in positioning precision was encountered. Due to the lack of an absolute positioning system (e.g., GNSS RTK), mechanical inaccuracies and disturbances cause the robot to deviate from the designated route
until an RFID tag is ultimately missed.
Tag omission handling procedure — In the event that the robot does not encounter the expected tag, it stops and signals the omission. Resuming exploration requires intervention in the form of manually repositioning the robot over the last identified tag and issuing a command to continue.
[1] M. Hubacz; D. Mazur; B. Pawłowicz; M. Salach; M. Skoczylas; B. Trybus, Navigation and mapping of closed spaces with a mobile robot and RFID grid, Archives of Control Sciences, 2023.
[2] Ł. Gotówko; M. Hubacz; B. Pawłowicz; M. Salach; M. Skoczylas; B. Trybus, Room mapping system using RFID and mobile robots, POLSKIE TOWARZYSTWO INFORMATYCZNE, 2022.
[3] M. Hubacz; B. Pawłowicz; B. Trybus, Using multiple RFID readers in mobile robots for surface exploration, Springer, 2020.