MODBUS Communication Module for Industrial Equipment
Industrial measurement equipment manufacturer
A MODBUS RTU communication module that lets STM32-based equipment exchange data with a flow meter over RS-485. We delivered the Slave first, then built the Master under a follow-up contract.
- Deliverables
- Firmware moduleUnit testsTechnical documentation
- Tech
- C11STM32FreeRTOSRS-485Unity
Problem
The equipment needed MODBUS communication. It needed both a Slave that provides equipment values to the host system and a Master that reads values directly from a connected ultrasonic flow meter.
Constraints
- It had to run on FreeRTOS within a 512-byte stack for the communication task.
- Frame boundaries at 9,600 bps had to be detected precisely using interrupts only, without DMA.
- We needed a way to verify protocol behavior before connecting to real equipment.
Solution
- 1
The protocol logic was separated into pure C with no hardware or RTOS dependencies, tested on a PC first, then loaded onto the equipment.
- 2
The receive interrupt collects bytes, and a frame is finalized when the line goes idle, which keeps frame boundaries correct.
- 3
The Master includes timeouts and retries, periodic polling, and marks a device offline after repeated failures.
- 4
Testing with the real flow meter revealed a register addressing rule that differed from the documentation examples, and it was corrected.
Other projects
- Business Systems
Client Management System for an Education Consultancy
Moved about 5,000 client records to a new system without losing a single one, and brought a 13-step consultation process and 24 reports into one back office.
- Business Systems
Delivery Control System for Institutional Catering
Connected everything from customers' meal orders to drivers' delivery and unloading records, overall control and accounting integration in two web apps and one driver app.
- Platform
Delivery Driver Matching Platform
Built a platform connecting delivery drivers with partner companies in three parts: a driver mobile app, an admin back office and a landing page.