This low-cost module was designed and built to perform hands-on experiments in Digital Control. The system is controlled using an Arduino Leonardo, heat is modulated with a TIP31C transistor, and temperature is measured using a TMP36 sensor.
It provides a simple and practical platform for learning control theory in a laboratory environment.
β οΈ Note: This project is currently under updates. Features and hardware are subject to change.
/HardwareV2
β New Version schematic, PCB, Gerbers./Hardware
β schematic, PCB, Gerbers./control_temp_LC
β C code for Arduino./docs
β photos
Component | Status |
---|---|
Temperature Sensor Interface | β Completed |
Signal Filtering and Smoothing | β Completed |
PID Control Implementation | β Completed |
Migration from MATLAB Data Logging to Processing 4 GUI | β Completed |
Data Storage and CSV Export | β Completed |
Processing 4 GUI (Monitoring & Logging) | β Completed |
PCB Design with Improved Measurement Stability | β Completed |
π» The project now features a Processing 4 graphical interface that replaces the previous MATLAB-based monitoring, data recording and data logging system.
π§ This new GUI allows real-time temperature monitoring and data recording, alongside the ongoing development of a custom PCB to improve measurement stability and reduce signal noise.
- Controller: Arduino Leonardo or Mega
- Sensor: TMP36 analog temperature sensor
- Actuator: TIP31C transistor controlling a heating element
- Control Strategy: Digital PI temperature regulation
- Sampling period: 0.1 seconds
- Data transmission: Serial communication for data logging and Processing 4 GUI monitoring
- PCB: Custom-designed board for power and measurement stability
- Temperature β Temperature value control (stabilization)
The Module uses a discrete PI controller implemented on a Arduino microcontroller.
The control law in the digital domain is expressed as:
Digital PI controller implemented for temperature measured,
The parameters are adjusted for temperature measured,
To reduce measurement noise, a first-order IIR low-pass filter was applied to the temperature signal before feeding it to the controller and the ARX model.
Where:
-
$$x(k)$$ : raw sensor measurement at time step$$k$$ -
$$y(k)$$ : filtered output -
$$\alpha$$ : smoothing factor,$$(0<\alpha<1)$$
A test was performed using a PI controller applied to the temperature control module.
The experimental results were compared against a linear ARX model identified from system data.
The ARX (Auto-Regressive with eXogenous input) model is defined as:
Where:
-
$$y(k)$$ : system output at sample$$k$$ -
$$u(k)$$ : input signal at sample$$k$$ -
$$( a_i, b_j)$$ : ARX parameters -
$$( n_a, n_b)$$ : model orders -
$$e(k) $$ : disturbance/noise
- β The PI controller improved temperature tracking and reduced overshoot.
- π The ARX model captured the main dynamics, with small discrepancies due to nonlinear heat transfer effects.
- βοΈ The comparison confirms the applicability of ARX models for thermal system control design.
The graphical user interface (GUI) shown in the photograph is developed using Processing 4.
It is designed only for monitoring the temperature module in real time and for recording experimental data.
Key features:
- Real-time plot of temperature and setpoint.
- Display of control output (PWM or equivalent).
- Logging of measurements to files for offline analysis.
- Simple visualization of system behavior during experiments.
β οΈ Note: The GUI is for observation and data recording only; it does not modify the control system or send commands to the hardware.
β οΈ Status: Work In Progress β the GUI is being actively developed and will be added to the repository once sufficiently stable.
The new PCB revision focused on improving the temperature signal stability without changing the control algorithm.
In the previous revision, the temperature reading from the TMP36 sensor showed perturbations during heater actuation by the TIP31C transistor.
This was mainly due to lack of proper analog stabilization near the sensor.
To address this, the following hardware changes were implemented according to TMP36 manufacturer guidelines:
- β Decoupling capacitor added close to TMP36 power pins
- β Analog conditioning resistors changed to SMD
- β All related passive components migrated to SMD footprint to minimize parasitics and noise pickup
No changes were made to the controller firmware or sensor type β only the PCB-level conditioning was improved.
Version | Condition | Plot |
---|---|---|
PCB v2 (Old) | Visible ripple & switching noise on temperature signal | ![]() |
PCB v3 (New) | Stable and smooth measurement β disturbances eliminated | ![]() |
β The addition of the capacitor and SMD passives significantly reduced noise, improving the quality of temperature measurements and the overall stability of the closed-loop response.
![]() PCB Render - Version 3 - NEW VERSION |
![]() PCB Render - Version 2- OLDER VERSION |
The updated PCB and system assembly have been tested successfully.
The following image shows the complete setup of the new prototype version:
The following images shows the complete setup of the previus prototype version:
![]() Device connections |
![]() Complete setup |
MIT License