Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
News

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? ;-)]"
This discussion has been archived. No new comments can be posted.

Using Joystick Ports to Measure Case Temperature?

Comments Filter:
  • Netsaints good. (Score:4, Informative)

    by satanami69 ( 209636 ) on Friday June 28, 2002 @04:20AM (#3785229) Homepage
    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 [netsaint.org]
  • by redelm ( 54142 ) on Friday June 28, 2002 @04:28AM (#3785249) Homepage
    It's been awhile since I checked, but the PC original joystick port is extremely primative. You charge some capacitors, then discharge them through the joysticks resistors [~1k IIRC] and measure the time to some cut-off voltage in software! Slow to read, and very CPU intensive. Maybe some modern chipsets do better. Like this, I'd expect PC joysticks are a severe handicap for modern games [USB should be _much_ better].

    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.

  • by Bastian ( 66383 ) on Friday June 28, 2002 @04:30AM (#3785253)
    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.
  • by jantheman ( 113125 ) on Friday June 28, 2002 @04:36AM (#3785271)
    http://www.allthingsspiny.co.uk/pcthermometer.html for one
  • Done it! (Score:3, Informative)

    by orangesquid ( 79734 ) <orangesquid@nOspaM.yahoo.com> on Friday June 28, 2002 @06:12AM (#3785462) Homepage Journal
    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.
  • Why not serial port? (Score:3, Informative)

    by Jess ( 11386 ) <gehinjc @ a l u m .mit.edu> on Friday June 28, 2002 @06:54AM (#3785537)
    Doesn't this box have a serial port? I monitor the temperature of our computer room [ornl.gov] using Dallas Semiconductor [dalsemi.com] DS-18S20 sensors and Digitemp [brianlane.com]. 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)
  • channels (Score:3, Informative)

    by ForceOfWill ( 79529 ) on Friday June 28, 2002 @06:56AM (#3785545) Homepage
    If I remember correctly, a joystick port gives me 2 channels to fool with. ... 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.
    Actually, you have 4 analog inputs and 4 binary inputs (not counting the MIDI TX and RX). Two axes and two buttons each on two joysticks. Here's a pin diagram, looking in at the PC side of the connection:

    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:

    1. +5v
    2. joy A btn 1
    3. joy A x-coord
    4. gnd
    5. gnd
    6. joy A y-coord
    7. joy A btn 2
    8. +5v
    9. +5v
    10. joy B btn 1
    11. joy B x-coord
    12. gnd
    13. joy B y-coord
    14. joy B btn 2
    15. +5v
  • by cybermace5 ( 446439 ) <g.ryan@macetech.com> on Friday June 28, 2002 @03:41PM (#3788443) Homepage Journal
    You don't know what you're talking about.

    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.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...