You are not logged in.

The 1st Filipino PC Modding Site

#1 2007-08-13 20:59:26

Site Admin
From: Philippines
Registered: 2007-06-20
Posts: 586

Simple PC Thermometer by Natan Osterman

Building of a simple thermometer for PC will be described in this tutorial. The unit is extremely simple and cheap to build. You will only need one NTC resistor, one diode and capacitor and serial port connector.


- Capacitor 10 uF or more
- Diode 1N4148 or 1N4001 or similar
- Thermistor NTC 10k or similar
- 9 or 25 pin female connector




Built Device


NTC thermistor is connected to other end of black-red wire.

Let's say DTR and TXD are zero at the beginning. Nothing is going on. Then we set DTR to 1 and start counting time. Capacitor is being charged through NTC resistor. The higher the temperature, the lower the resistance and capacitor is charged more rapidly and vice versa. We use DSR pin to monitor the voltage of capacitor. When it is charged enough, DSR goes to 1, we stop counting time. From elapsed time of charging we can calculate resistance of NTC, from resistance the temperature. After each measurement we set DTR to 0 to empty the capacitor through diode.

Theoretical background
Charging of capacitor: Capacitor C and resistor R in series, connected to voltage U0. Typical time constant tau = R * C. Voltage on capacitor versus time t: U = U0 * (1 - exp(-t/tau) ) (Equation is solution of simple differential equation)

NTC thermistor resistance
The resistance of NTC thermistor can be approximated by exponential curve R (T) = R25 * exp(B*(1/T-1/298K)) (R resistance in ohms, R25 resistance at 25°C, B typical constant dependant on NTC value [unit is kelvin K]). Do not worry about those constants, we will not need them.

Calibration of device
You need another calibrated thermometer for calibration of newly built one. The best is good ole' mercury thermometer with 0-100°C range. Measure temperature and write down capacitor charging time (you can get this data in program). Change temperature and repeat process. Be patient! Thermometer need some time to reach external temperature.<br />   
My way of doing it: I bound thermometer and NTC together and put them in plastic bag (to keep water away from thermometers). I put bag in glass with ice cubes. The ice melted, temperature of water began to rise because my room is hot (28°C). On every couple of degrees change, I wrote down temperature and time.

When you have collected temperature vs. time data, enter them in fitting program. MS-Excel can do it. Plot temperature vs. 1/log(time). Fit with linear function. In my case, equation for temperature in Celsius degrees is 2722*1/Log(time in microseconds)-217. Therefore constants are A = 2722 and B = - 217.

Time measurement/program

I wrote small Delphi application. For details, see source. First press "Calibrate" button to calibrate timing procedure. The frequency of your processor will be shown. Then select COM port and press "Open port". At the end you can finally press "Start". Do the calibration process as described above. When you enter correct factors also correct temperature will be displayed.<br />
Download zipped application with Delphi source: …

Pinout of 9 pin serial connector
<p> Data Terminal Ready DTR = Pin 4
Data Send Ready DSR = Pin 6
Transmit Data TXD = Pin 3

Created by Natan Osterman ( (c) 2000

I only drink diluted water.


2007-08-13 20:59:26

pcModz Bot
Registered: 2015-04-29
Posts: 8

Re: Simple PC Thermometer by Natan Osterman


Similar Topics Replies Views Last post
Simple Sidepanel mods ko by dmelsie  [ 1 2 ]
11 11569 2010-01-27 23:49:47 by Reapervon

Board footer

pcModz Ph © 2007 - 2016 All Rights Reserve.