Using Joystick Ports to Measure Case Temperature? 47
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? ;-)]"
Netsaints good. (Score:4, Informative)
They have a cool hack premade for what you need
http://www.netsaint.org/docs/hacks/hltherm.php [netsaint.org]
Joystick ports are ancient ! (Score:3, Informative)
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.
Barking up wrong tree (Score:3, Informative)
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.
[sigh] ever tried google?... (Score:1, Informative)
Done it! (Score:3, Informative)
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.
Why not serial port? (Score:3, Informative)
channels (Score:3, Informative)
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:
Re:Joystick ports are ancient ! (Score:2, Informative)
Joystick pots are usually around 50K, no you do not remember correctly. And joysticks are not processor-intensive, the A/D conversion simply puts the value on the bus where it can be retrieved. Yes, the joystick port uses charge times to determine the analog value; this is used in hundreds of embedded devices to do simple A/D conversions. It's perfectly acceptable for a joystick application. In fact, I'd bet most USB joysticks do this, anyway. I've programmed USB devices and the timed-charge method is used all over the place where cost is an issue.
There is no problem getting the right thermistors. They are available in practically any reasonable resistance range necessary. Not to mention that 5 volts is about the maximum you'll see in a joystick port, and if you're running enough power to heat the thermistor, something's wrong.
While you are a moron when it comes to electronics, I agree that a 486 probably doesn't have to worry about heating. Unless it's a late-model DX4.