Context
The final project of TF4017 Industrial Internet of Things at Institut Teknologi Bandung (June–July 2025), done in a team of six. The motor kit was already mostly wired when the team received it, so the work centered on the control program, the HMI, and the IoT layer.
Problem
Industrial drives are run by a PLC, watched on a local HMI, and increasingly monitored remotely. This project builds that whole chain on real industrial hardware: closed-loop speed control in the PLC, an operator HMI, a wireless web dashboard, and a database that records how each input changed the motor’s response.
Approach
- Control: an Omron CP2E PLC runs a PID speed controller written in ladder logic (CX-Programmer). Its output sets the duty ratio of a PWM signal to the motor driver, and the operator can set the setpoint, PWM frequency, gains (Kp, Ki, Kd), and direction.
- Speed feedback: an incremental encoder, read through the PLC’s high-speed counter.
- Position feedback: an absolute encoder, read over Modbus RTU (RS-485).
- Voltage: a tachogenerator, read through an analog expansion module.
- Local HMI: a Weintek MT8102iE touchscreen for setting the parameters and showing speed, position, and voltage as numbers and live charts.
- Remote control: the HMI and a Node-RED dashboard exchange data over MQTT on the local network, so the motor can also be operated and monitored from a web page.
- Logging: Node-RED writes each parameter set and the resulting speed and voltage to a PostgreSQL database, with output rows linked to the input that caused them.
My Contribution
- Ladder program: wrote the PLC program, including the PID controller, speed and position calculation, and PWM output.
- HMI design: designed the Weintek HMI screens.
- Modbus configuration: set up the Modbus RTU link to the absolute encoder.
Result
Forward mode runs closed-loop PID speed control. In the 1000 RPM test, the measured speed followed the setpoint with a small error, and the HMI charted speed, position, and voltage. The web dashboard monitored the same values in real time and sent parameters back to the PLC.
Limitations
- Reverse mode is open loop: it has no PWM control and runs at maximum speed and voltage, so PID only works in forward.
- No position control: position is only measured and displayed.
- Database linking: the HMI re-sends the inputs every second, so input IDs no longer line up with the output rows. Sending only on change would fix this.
- Wiring: the kit’s wiring between the PLC, motor driver, absolute encoder, and tachogenerator module still needs tidying.