Using Joystick Ports to Measure Case Temperature?
cheros asks: "Due to lack of options I had to stick one of my machines in a spot where I'm worried it might get hot, so I am looking for a low cost way to monitor environment temperature. As it's a humble 486 it doesn't have sensors, but it DOES have a joystick port. I'm merely looking for one of 'OK', 'Warm', 'Hot', or 'Get the fire extinguisher!' style status info so I'm not too bothered about granularity. If I remember correctly, a joystick port gives me 2 channels to fool with. I was wondering if anyone has already been playing with the idea to use an NTC (temperature sensitive resistor), and if they got anywhere. In my case it's a matter of scanning the port every so often and sending an SMS email if the situation warrants attention. As a matter of fact, the joystick port also has a couple of switch lines as well - there's all sorts of fun to be had. The last time I've coded was in 6303 assembler on Psion Organisers, so don't expect too much of me in the way of coding skills - it'll take me a while to get up to speed in Perl. Yes, I run Linux [it's a 486 - what did you expect? XP? ;-)]"
I use a program called netsaint to monitor the internal network.
They have a cool hack premade for what you need
http://www.netsaint.org/docs/hacks/hltherm.php
I really hate Dan Patrick.
Your biggest problem is going to be getting thermisters in the right resistance and wattage range. IIRC, most thermisters are in the 10-100k range, and aren't good for many volts [Watts]. Self-heating!
As another poster has commented, why are you worried? A 486 certainly only needs a passive heatsink (if that) and you could probably lose the PSU fan without overheating if the Linux box is fairly idle due to idle-at-HLT powersavings.
Unless you have your computer sitting on top of a furnace, you won't have to worry much about overheating a 486 - my 486 doesn't even have a heatsink/fan, and, come to think of it, I've never seen a 486 with that going on.
Probably the easiest thing you can do is just attatch a heatsink and fan with some thermal compound, and maybe get one of those ball-bearing fans that fits into a PCI slot if you want some extra cooling. That alone should remove any worries you need to have about overheating the computer, so you won't even need a heat sensor.
http://www.allthingsspiny.co.uk/pcthermometer.html for one
-- Mod me down. I am not a karma tart. ffs,gag
I've done this before. I simply picked up a thermistor from radio shack, stuck it in the holes, and then wrote a little program to record the current time, flip the bit, and just sit in a wait() loop reading, and then check the current time, subtract them, and convert. I found a formula on a webpage somewhere that approximated the resistance based on the delay, and then I just interpolated the temperature from the numbers on the back of the thermistor package. The problem I tended to get, though, was that I needed to take several readings and then discard any outliers. Even with realtime priority and -20 niceness on the process, I frequently got timing errors that gave me temperatures 10, 20, or even 50 degrees off.
You could always try to hack the kernel's joystick driver to do this... aim for more accuracy.
I don't have the program I wrote anymore (sorry!) because it was an a very old boxen that has since been replaced, but I remember it was fairly short.
--TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
Doesn't this box have a serial port? I monitor the temperature of our computer room using Dallas Semiconductor DS-18S20 sensors and Digitemp. The sensors can be connected to your computer via the serial port and are relatively inexpensive (approx $3.00 for the sensor, $10.00 for the serial port interface)
8-------------------1 / /
s\ l a m e n e s s
ss\ f i l t e r s
ss9\-------------/15
and the pin meanings:
--
Seeing is believing; You wouldn't have seen it if you didn't believe it.