VOGONS


First post, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

I was reading an old Silicon Chip magazine from 1992 and found an article about using a joystick port to use as a temp sensor or light sensor I'm interested in the temp sensor part to use on my 486's CPU to monitor its temperature or to add another temp sensor to monitor the ATX power supply because at the moment I have to leave the PC case lid off as the power supply gets too hot, I'm using an ATX power supply with an ATX to AT converter.

It says the joystick card in the picture uses a NE558 quad timer IC, which is basically four independent 555 timers and that only one connected thermistor on the X plane is needed to monitor one temperature, could a modern flat cable type temp sensor be used to monitor a 486 CPU's temps and another sensor on the Y plane to monitor the power supply? I haven't looked at any of my sound cards with a joystick port to see what IC it has to register joystick X, Y input but does this sound doable from a soundcard or a dedicated joystick card if it has a different chipset?

Reply 1 of 10, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie
GabrielKnight123 wrote on 2023-04-18, 13:01:

I was reading an old Silicon Chip magazine from 1992 and found an article about using a joystick port to use as a temp sensor or light sensor I'm interested in the temp sensor part to use on my 486's CPU to monitor its temperature or to add another temp sensor to monitor the ATX power supply because at the moment I have to leave the PC case lid off as the power supply gets too hot, I'm using an ATX power supply with an ATX to AT converter.

It says the joystick card in the picture uses a NE558 quad timer IC, which is basically four independent 555 timers and that only one connected thermistor on the X plane is needed to monitor one temperature, could a modern flat cable type temp sensor be used to monitor a 486 CPU's temps and another sensor on the Y plane to monitor the power supply? I haven't looked at any of my sound cards with a joystick port to see what IC it has to register joystick X, Y input but does this sound doable from a soundcard or a dedicated joystick card if it has a different chipset?

In theory, one gameport should be functionally equivalent to another gameport, except for the presence/absence of the MIDI interface (which also changes one pin assignment IIRC). I'm not sure how much you can rely on that 2.2K load resistor always being 2.2K though. Might take some trial and error.
Each axis on the joystick is supposed to range from 0 to 100K ohms. If you could find a temp sensor that was compatible with that range it would make things easy. From my time of working on automotive fuel injection systems I recall the temp sensors used there would be around 2K ohms at ambient temperatures and resistance would decrease from there as temperatures rise. So that would not be suitable for direct connection. Maybe putting a 220 ohm resistor between the input pin and ground would reduce current going into the gameport enough to get a usable range from that kind of sensor. What are the specs on the sensors you're looking at?

GBAJAM 2024 submission on itch: https://90soft90.itch.io/wreckage

Reply 2 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I like the old gameport..
It seems that IBM always had higher intensions for the port.

Notice the "analog input card" string on the PCB of the "IBM Game Control Adapter":
It has a through hole area for installing components.

Manual

What must be kept in mind, though, is that the listings don't contain a calibration routine.
As PCs went quicker, it became necessary to compensate.
More modern gameports are speed-compensated, thus.
They either contain a little trim pot for manual adjustment or do it automagically.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 3 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I'm currently checking my book/magazines..

A 100 KOhms thermistor is okay for the reference hardware, an IBM PC 5150/60.
For IBM ATs and later, a 69 or 47 KOhm thermistor (negative, NTC) is recommended.

If I understand correctly, calibration must be done with minima/maxima before.
The values must be within the range of both the thermistor and gameport (255 to 0).
That's why 4°C and 40°C are being mentioned, I suppose. And a cup of water.
The temperature sensor must be made water proof first.
The thermistor (on a cable) is enclosed in a metal tube, which must be sealed with glue.
Edit: Beware of shorts. A piece of styrofoam can be used for thermal insulation (behind the NTC, in the tube).

Edit: The book I'm currently reading uses Kelvin scale internally and QB's LOG function..

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 10, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

For now I haven't got any temp sensors but in the back of my memory Ive seen or had a flat ended sensor from a pentium 3 or 4 that could be wedged into a graphics card or CPU it was orange in colour and a little see through, I'll go through my boxes of parts to hopefully find an 8bit joystick card and if I find one I'll ask where to go next but I'm not sure a metal cylinder could fit between my 486 overdrive and heatsink but maybe it just has to go on the heatsink can someone fill me in on that

Reply 5 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++
GabrielKnight123 wrote on 2023-04-22, 11:26:

For now I haven't got any temp sensors but in the back of my memory Ive seen or had a flat ended sensor from a pentium 3 or 4 that could be wedged into a graphics card or CPU it was orange in colour and a little see through, I'll go through my boxes of parts to hopefully find an 8bit joystick card and if I find one I'll ask where to go next but I'm not sure a metal cylinder could fit between my 486 overdrive and heatsink but maybe it just has to go on the heatsink can someone fill me in on that

Hi there again! The metal cylinder is mainly used to make the thing water proof, so it can be more easily calibrated using cups of cold/warm water.
I think it can be used without that, too, the sensor just needs some sort of housing to make prevent shorts. Maybe some shrink tube is good enough, not sure.

I'm sorry that I can't be more helpful so far. :(
I have two more books including PC joystick experiments..
I'll have a look in the next few days.

PS: It's also possible to use an I2C or one wire temperature sensor, like the popular DS18B20 (digital).
However, I'm not sure how to access it from GW-BASIC/QB. So far, I merely used it on a Raspberry Pi.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 6 of 10, by doshea

User metadata
Rank Oldbie
Rank
Oldbie

I think that back in the early '90s we often called this "environmental" sensing as people were interested in getting data about the environment outside their PC - I don't think many people had reason to be concerned about the temperature of their CPU back then! 😁 For what it's worth I don't recall any concerns about specific models of joystick card/port - I assume they're all reasonably similar, or else joysticks wouldn't be portable - but I'd certainly expect to need to calibrate it.

Reply 8 of 10, by mkarcher

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2023-04-19, 14:25:

If I understand correctly, calibration must be done with minima/maxima before.
The values must be within the range of both the thermistor and gameport (255 to 0).

There is no range of the game port on a standard PC gameport. You trigger the one-shot device, and then you need to time in some way how long the one-shot device stays active. This time is proportional to the resistance applied to the port. The "range" depends on how you measure the time. Many PC/XT games counted polling cycles of the status port, and indeed used an 8-bit register to keep or return that count. This started to fail on AT-class machines, at least when they hit 10 MHz, because that count overflowed. You could also use a 16-bit register per axis. Or you could use the PIT chip to take the time instead of counting CPU loops, so the result is independent of the CPU speed (that's what the original IBM BIOS did).

There are some sound cards that have integrated timing circuits (like the AD1816 gameport), so the CPU doesn't have to poll for the end of the one-shot pulse, and those cards may have a limited range, but as long as you use the classic gameport features only, the range only depends on your code and not on the port.

Reply 9 of 10, by Jo22

User metadata
Rank l33t++
Rank
l33t++
mkarcher wrote on 2023-08-07, 22:02:
Jo22 wrote on 2023-04-19, 14:25:

If I understand correctly, calibration must be done with minima/maxima before.
The values must be within the range of both the thermistor and gameport (255 to 0).

There is no range of the game port on a standard PC gameport. [..]

Thank you for your explanation. 🙂👍
The gameport is an interesting device, next to the 5150 cassette i/o (the reception side, esp.).

My wording wasn't very good, also, my apologies.
I should have made clear that I was thinking of the range of Basic's STICK command here.
It's been used in the sample code of the article that GabrielKnight123 mentioned.

That being said, the range might be smaller than I thought, actually, so I was wrong either way.
It has a return range from 1 to 200, according to some sources. I need to check that next time I'm on my vintage PC. 😅

Edit: I meant STICK function, of course. It's not a command in the common sense.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 10 of 10, by doshea

User metadata
Rank Oldbie
Rank
Oldbie
Jo22 wrote on 2023-08-08, 21:24:

It has a return range from 1 to 200, according to some sources. I need to check that next time I'm on my vintage PC. 😅

That's what the QuickBASIC 4.5 online help says.

Some old IBM BASIC manual I looked at just says "The range of values for x and y depends on your particular joysticks." which I imagine is always true, but some hints on the maximum values that could be returned would have been helpful 😁

I only skimmed it but https://www.epanorama.net/documents/joystick/ … c_joystick.html says the BIOS returns a value in the range 0..511 where 0 indicates a timeout.