Closed-Loop Temperature Control (Peltier + TMP117)

RoleControls and embedded implementation · Group 15
ContextNYU ROB-GY 5103 Mechatronics
PlatformArduino Mega · TMP117 · Peltier heating
Outcome70 °F toward 77 °F closed-loop test

Recruiter summary

Overview

Designed and implemented a closed-loop temperature regulation system for a custom acrylic enclosure using Peltier thermoelectric modules and a discrete-time controller derived from continuous-time control theory. The controller was discretized using the Tustin transform and deployed on an embedded microcontroller, enabling stable real-time regulation without relying on a standard PID formulation.

Key contributions


Physical System

Thermal chamber

Actuation

Sensing

Controller hardware

Completed acrylic temperature-control enclosure with Peltier modules, sensor, displays, and Arduino electronics


Control System Architecture

Closed-loop feedback structure:

Closed-loop temperature-control block diagram

Control loop

  1. TMP117 measures enclosure air temperature
  2. Controller computes control effort at each sample
  3. PWM drives the Peltier heating modules
  4. Thermal dynamics produce next temperature state

Thermal System Modeling

Approximated the enclosure as a lumped thermal system with effective resistance and capacitance:

Lumped thermal resistance and capacitance model of the enclosure

This abstraction captures dominant thermal dynamics while remaining tractable for controller design and embedded implementation.


Controller Design and Discretization

Continuous-time compensator

C(s) = 300 · (s + 0.05) / (s + 0.35)

Continuous-time controller transfer function

Discretization (Tustin)

Controller discretized using a bilinear transform with a 0.1 s design interval:

Tustin discretization result for the controller

Resulting implemented difference equation:

C[k] = 0.9656 C[k−1] + 295 (x[k] − x[k−1])

Discrete-time controller difference equation


Embedded Implementation

Controller deployed on Arduino Mega with real-time execution:

Arduino implementation of the stateful controller and saturated PWM output


Validation and Analysis

Validated expected closed-loop behavior using frequency and time-domain analysis:

Compensated open-loop Bode magnitude and phase plot

Modeled closed-loop temperature step response


Engineering Challenges and Solutions

Thermal latency and slow dynamics

Continuous-to-discrete fidelity

Measurement bias

Actuation constraints


Results


Technical Stack


Future Improvements

Continue Exploring

See another system

Interested in the engineering behind this work? I am available to discuss robotics software, embedded systems, autonomy, controls, and robot-learning opportunities.