Analog Electronics | Embedded Systems

Smart Temperature Monitoring & Control System

This was a course group project combining temperature sensing, analog signal conditioning, embedded temperature calculation, comparator-based control, timer circuits, PWM, and data logging.

Course Group Project Completed
±0.1°C calibrated accuracy 4-coefficient Steinhart-Hart 10 Hz logging ~50% PWM
Prototype & Simulation

Temperature Measurement and Control

01

Temperature Measurement

The measurement system used an NTC thermistor in a Wheatstone bridge followed by analog amplification. The measured bridge voltage was converted into thermistor resistance and then temperature.

A four-coefficient Steinhart-Hart relationship was fitted to the resistance-temperature dataset using Python and the resulting coefficients were used for temperature calculation.

02

Calibration

I used a resistance-temperature dataset covering the operating range and fitted the Steinhart-Hart coefficients in Python. The calibrated system achieved approximately ±0.1°C temperature accuracy during testing.

Thermistor NTC temperature-dependent resistor.
Front End Wheatstone bridge and analog amplification.
Calibration Four-coefficient Steinhart-Hart model.
Software Python / NumPy / SciPy fitting workflow.
03

Comparator Control

Comparator thresholds separated the temperature-control behavior into three operating regions. Approximately 2 V and 3 V threshold levels were used by the analog control logic.

04

555 Timer Circuits

Monostable Timed behavior of approximately 15.1 seconds, tuned using the timing resistance and a large timing capacitor.
Astable Approximately 50.2% duty-cycle PWM using diode-separated charge and discharge paths.
05

Data Logging

Temperature values were sampled and recorded at approximately 10 Hz so the system response could be evaluated over time rather than only through instantaneous measurements.

06

Embedded & Calibration Code

Arduino | Temperature Measurement
#include <LiquidCrystal.h>
#include <math.h>

const int RS = 8;
const int EN = 9;
const int D4 = 6;
const int D5 = 5;
const int D6 = 4;
const int D7 = 3;

const int SENSOR_PIN = A0;

const float SH_A =
    0.001128547485576f;

const float SH_B =
    0.000234281399318f;

const float SH_C =
    -0.000000012298570f;

const float SH_D =
    0.000000087935152f;

const float VCC = 5.0f;

const float ADC_MAX = 1023.0f;

const float VIN_BRIDGE = 9.004f;

const float R_FIXED = 298000.0f;

const float VB_BRIDGE = 0.01502f;

const float AMP_GAIN = 1.1f;
Python | Steinhart-Hart Calibration
import numpy as np

from scipy.optimize import curve_fit


def steinhart_hart(
    ln_r,
    A,
    B,
    C,
    D
):

    inv_T = (
        A
        + B * ln_r
        + C * ln_r**2
        + D * ln_r**3
    )

    return 1.0 / inv_T


# Resistance-temperature data
# was converted to ln(R)
# before fitting.

ln_R = np.log(resistance_data)

temperature_K = (
    temperature_C
    + 273.15
)


params, covariance = curve_fit(
    steinhart_hart,
    ln_R,
    temperature_K
)


A, B, C, D = params
Analog Design Arduino Python NumPy SciPy Steinhart-Hart NTC Thermistor Wheatstone Bridge Comparators 555 Timer PWM Multisim