View Full Version : Paralled Port Programming
has anyone done anything similar to this:
I want to control fans, ie have 3000rpm fans running at 2000-2500rpm so that they are quiet, but also have the ability to change their speeds, so that if im playing a game and the temps go up, i can turn the fans up a bit.
I have thought about a bay controller, i could easily fit the positive wire of a fan through a variably resistor, but i want something thats more slick, and something that doesnt involve lots of knobs and switches in a drive bay.
so what i am planning is software control of my fans, i have already edited a parallel port control program which was written in visual basic so i can switch pins on the port on and off, and i have tested this with a cut open printer cable and a multimeter - the meter goes from 4.2volts to 0.02volts and back again as i turn the pins on and off.
I am thinking of designing a circuit using either transisters as switches, or relays, although im not sure if the parallel port can handle enough current for a relay.... anyone know?
i am thinking that with 2 fans i could use the 8 output pins on a parallel port, each fan having 4 settings, something like low, medium, a bit more than medium and full power, with the pins switching relays, and the relays with different resisters on, so more or less current flows if you see what i mean!
has anyone seen anything about software controlled fans using a paralled (or other) port?
thanks!
~ Gary ~
chedburgh
03-02-2003, 11:02
Some suggestions..
If possible, use C/C++ to gain access to lower level API's/commands. Also consider using a serial port to, theres a lot of code/examples of accessing this on the net.
For the parallel port, take a look at:here (http://www.codeproject.com/system/ppsc.asp)
Do a search at Programmers Heaven (http://www.programmersheaven.com/) for "parallel port", it comes up with a bunch of articles.
Ched
Blue Raptor
05-04-2003, 22:45
wow lucky this thread is here my dad is a DOS and bat man he reckons we can use a n old 486 machine to control a trainset ie change points speeds etc any ideas?
Charlie_M
25-07-2004, 22:30
Well I say my experences but they arnt that extensive. I am a computer science student and so programing is not a problem. So when I saw an artical about controling the parallel port I was interested. (http://www.codeproject.com/csharp/csppleds.asp)
As I understand it the parallel port contains 8 X 5 volt data lines so u can simply control 8 items on or off with very simple circuits. The problem is they are directly connected to the motherboard so the current is limited and poor wiring has lots of scope for messing up your expensive hardware. I followed the examplay above, where you control 8 LEDS's linked to these data lines. I wanted blue LED's but could only afford red ones. Using the sample code wrote a program which controled the port in C# (runs under all windows versions including/98 & all later versions). It was able to make animations with the LED's my, favourite was the kitt, it looked like the front of the card from Knight Rider (a 1980's US TV show).
I am planning to produce a program in c# which runs as a service to control the fans based on the motherboard temperature readings (of the CPU & any othes I can get). I havn't worked out how this is done in C# but there must be an api some where although probably not managed code. Anyone know how its done !
Anyway to cut the risk of pulling too much current I was going to use relays to control the fans. The best way to vary the speed is to pulse the fans. This is apparently the best way to do it was u can get a very constant RPM change. Also for my purposes its much easyer to make because its all done in software.
From a saftey point of view all most as soon as windows starts to load it sets all the data bits on the parrel port to 1 so that would have all fans on full power. The only risk is if the software carshes and the temperature rises. If the software was just end tasked the data bits remain constant.
Why do I want to do this? I am planning to use a semi passive water cooling system which needs no fans on the radiator unless under high load. Also my machine runs windows media center edition so I whatch lots of TV on it and the current noise is too much. Because its water cooled there is no main CPU fan and I certanly would not link it to this system, becuase during the BOIS loading stage the data bits keep changing so there would be little or no CPU fan for some of the time. Which I have learnt from personal experence, is bad
Hope this helps
Charlie :rolleyes:
Charlie_M
31-07-2004, 16:43
After a little more research I have a bit of a problem. I can not find out my mother boards CPU temperature reading programitcally. My MB is an Abit KG7 (I know its a bit old). Still I am planning a new pc in a coumple of months that will be based on the Abit Dura Max MB, so I want it to work with both. Microsoft (bless em) tried to standardise the way u get hardware information using the WMI it seems my MB does not want to supply the data like most MB's.
I have tried other programs which cant read it eather. From what I remember it is possible to read it using Mother Board Monitor. That can use plugins but how you right on in c# i am not sure still a possability. The only problem is that it has ceased development so I am not sure if it would read the Abit dura max.
Can u get external digital thermometers and link them in to the computer. I know (from school) we had ones for sciense experements. I also know they were expensive and is there an api for them.
I think this project could be in trouble before its even started. Any one got any ideas or potential solutions.
Charlie_M
09-08-2004, 19:54
Ok I am not sure how many of you are still interested / reading this, but here goes. I have realised that is vertually impossible to read the CPU temp data off my motherboard with out a lot of help from Abit. Anway I have decide to take an alternative approch, make my own temp probes. This is not as difficult as it sounds.
http://www.electronics-lab.com/projects/pc/013/index.html
However that circuit is for a serial port which has different properties. When a serial port pin is low it is actually at -12 volts and when high its at 12 volts, as I understand it, (I am no expert, its just what I have read). I have made (well only on crocodial clips so far :)) a modified version of the circuit based on the one from the above site. There are atleast 5 inputs pins (the status lines) free on my current parrel port design, and my modified circuit only requres one output per prob.
I was thinking I could make a few. One for my HD and one for the cpu. Then if the CPU gets above optium temp it increase the radioator fans speed. If the HD's get too hot then it increases the speed on the fans near the HD.
Incidently I will be using a Coolermaster Wavemaster case, so if any one has any experence with adding any water cooling to them I would be very interesed to hear. I know the wave master is very popular, but its such an attractive case, and coolermaster make some seriously high qauility kit.
Parallel port and fan control made me think of this thread over at bit tech, http://forums.bit-tech.net/showthread.php?t=55191. Hopefully iy'll be helpful to you.
I would have though MBM would be able to read the abit dura max, as the sensors on the board would be similar or the same as previous abit boards. but that's just my feeling :)
Charlie_M
09-08-2004, 23:21
Thanks for the link its full of usfull stuff, although I have figured out 75% of it over the last few weeks, form other sites. Still its a very usfull link thanks.
I have an Abit motherboard at the momment (for my current Athlon XP machine) and I cant read the temp off that. I doubt I would be able to read it off the newer ones because Abit has its new proprietery overclocking and monitoring system. The dura max requriment is for the next few months when my sister will inherit the current machine. Using a dura max isnt set in stone, but I have always used Abit motherboards in pc's I build and have found it incredably reliable (and pritty good value). Also the dura max does get round intels overclocking protection. Not that my pc is currently over clocked. I got put off a bit when I overclocked my old celeron and courpted the hard drive.
The other bonus of having my own temp probs is I can place them where I want then I can say masure the temp of my HD then ajust the fan in front of it acordingly.
One thing I would say is that it looks like some people on forums not the one u gave me are suggesting powering lights and other devices directly off the parallel port (I only had a quick look so I may be worng). LED's are ok but anything else and I think u may be pulling more than the spec allows in terms of current. I plan to use relays (with a diode for safty asthe coils dischage) to switch the fans and any other devices on and off. I will have to work out te life expectance of the relays though. It just seems safer its not like its some 9 volt batery your pushing too hard its you prized new pc at stake (well hopefully soon :)).
This is all hypothetical at the momment, because no one has made a water block for the new intel sockets. I am sure manufactures will but in the mean time its just a matter of waiting. And building my controller of course :)
Charlie_M
20-08-2004, 01:10
u can read the temps with MBM but that uses the proprietry api of abit. The abuther has stopped developing it because the mother board compaines arent coperating with him. Its always going to be closed source because he has signed loads of non discolsure agreements. I know i could in theory write a plugin but with all the new abit over clocking stuff on the dura max i doubt it would still work with MBM.
Sorry it took me so long to read your post correctly. Dam dyslexica (and another thing why use such difficult word to spell, for a condition affecting spelling. I think they are trying to rub our noises in it :) )
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.