Pages: [1]   Go Down
Author Topic: Initial thoughts for a PC "thermal control" device  (Read 1324 times)
0 Members and 1 Guest are viewing this topic.
London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greetings, makers...

I've recently embarked on the Arduino journey, and thought that the best way to learn is to have a real project to work on.

I think I've come up with something that could start fairly simple, is modular enough to break down into separate sections, and yet will result in something (at least gratuitously) useful.

The idea is an "environmental control" device for a desktop computer.  I've just build a high-end watercooled PC, and have one of these NZXT Sentry LXE gadgets to read 5 temperature probes and control 5 fans.  Of course I now have 7 fans and a pump to deal with, so I thought "I can do this"...

The plan is for a device with the following capabilities:

  • Display temperature from 5 probes
  • Display RPM from 10 tachometers (basically from the fans and from the pumps)
  • Drive 10 fans, with speed controlled by the user, or based on the temp readings
  • Generates some sort of alarm if a temp reading goes high
  • Provide some metrics and/or control via the Serial I/O

I think these are mostly independent from each other, so I can play around with "driving a PC fan" for example, completely separately from "how the heck do I display 15+ pieces of information", and again separately from "reading temperatures from a thermoprobe".

Some of those are trickier than others, which is where the fun comes in smiley

Perhaps a proof-of-concept of one temp, one fan, one readout, would be a good start?

So, comments?  Are there any parts of that which will be particulary gnarly that will need fixing first?
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49396
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Are there any parts of that which will be particulary gnarly that will need fixing first?
If the speed of any fan/pump is particularly high, and I imagine that they all are, you will need to detect speed using interrupts. Each time the fan/pump outputs a signal, an interrupt handler needs to be called to record that fact.

Count the number of external interrupts you can have on your particular Arduino. I think that you will find that you do not have enough.

Does the pump actually have a way to measure it's speed? Does the pump speed really matter?

For that matter, do the fan speeds really matter? Either they are going fast enough to cool the PC or they are not.
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Count the number of external interrupts you can have on your particular Arduino. I think that you will find that you do not have enough.
Good point. I just looked around and the examples I've found do indeed use interrupts to catch the blips from the simple hall-effect sensor on each fan.  Maybe I can find some clever circuitry or chip or something, to turn a rapid pulse into something a bit more simple for me smiley  Maybe just a simple ripple-counter.  Might still use a lot of pins though.

Does the pump actually have a way to measure it's speed? Does the pump speed really matter?
It has the same output as a fan, so doesn't really make a difference.  More the question is like your next one.  Now I've built the system, the water pump is actually silent, so I wouldn't want it controlled, just metered.

For that matter, do the fan speeds really matter? Either they are going fast enough to cool the PC or they are not.
When you have 7 really fast fans, they kick out a lot of noise.  Fine if you're in the middle of a deathmatch or something, but when you're not using the PC, it's LOUD.  It's just not necessary.  The case should only cool what it needs, not go flat-out 100% of the time.  When the CPU and GPUs are idle I can actually manage with passive-cooling only.
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49396
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The case should only cool what it needs, not go flat-out 100% of the time.
understood. But, do you really need to know how fast the fan is spinning? Or, is controlling the speed of the fan, using PWM with "faster"/"slower" values sufficient?

Does knowing that one fan is spinning 7104 RPM while another is spinning 6519 RPM matter? If not, if you just want them all to go faster or slower, then all the interrupts needed to read the speed are not necessary.
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe just a simple ripple-counter.  Might still use a lot of pins though.
Hmm, I've just done some back-of-the-envelope calculations, and as fan-speeds are somewhere between 1500 and 5000 RPM, that's only between 25 and 80* RPS, so I wouldn't need a huge counter, a 7-bit counter might be suffient.

Ten of those, connected via some sort of multiplexer, sounds a bit scary, but I should in theory be able take the 10 readings for each, once per second, no problem.  The 7-bit counter shouldn't overflow in that time.  Wiring the prototype will be a nightmare though smiley


(* I think the fans will emit two pulses per rotation, so these numbers might be double this.)
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does knowing that one fan is spinning 7104 RPM while another is spinning 6519 RPM matter? If not, if you just want them all to go faster or slower, then all the interrupts needed to read the speed are not necessary.
smiley-eek Didn't think of that.  I suppose I could bypass all the trickery and just focus on goal-seeking.

If Colder Than Threshold Then Slow Down Fans, Else Speed Up Fans.

Speed display would be nice for the geekery of it, but it's nice to know I can put it into it's own "feature", and proceed with the other elements independently.
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

Portland, OR
Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PWM outputs could also be an issue depending on which arduino you have although you can either try to software PWM for more pins, use a mega, or offload the PWM generation to another chip.
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, okay, that's a good point smiley  I might have to find some way of setting up a set of external PWM drivers of some sort.
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A second opinion may sometimes be useful.
If the speed of any fan/pump is particularly high, and I imagine that they all are, you will need to detect speed using interrupts. Each time the fan/pump outputs a signal, an interrupt handler needs to be called to record that fact.
I would say the exact opposite is true. Avoid interrupts if at all possible for high frequency signals. The issue is that each and every interrupt  (2 per rotation for PC fans) carries an overhead (some 50+ cycles minimum) and eventually your poor Arduino will do nothing, but process interrupts and so no capacity left for display refresh and other things. Interrupts are effective for infrequent events. Using pulseIn at the required display refresh interval is a good alternative.

Quote
Count the number of external interrupts you can have on your particular Arduino. I think that you will find that you do not have enough.
Every pin on the AtMega/Arduino can be configured for pin change interrupts so this is no limitation.
Logged

Portland, OR
Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes and no BenF, yes you can set up the interrupts on any pin but now your ISR is even bigger as it needs to handle the details of determining which pin actually caused the interrupt from that port. When combined with the high frequency interrupt issues you mentioned trying to run a lot of them can become impractical.

I'd go with PaulS and not worry about absolute speed on the fans and just go with faster/slower based on temp.
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2520
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wouldn't it be simpler to throw the tach signal through a pwm filter and read it as an analog voltage? It wouldn't be nuts-on precise but still fine for your purposes.
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 168
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is getting a bit input-specific, so I replied in my "Multiplexing many inputs" thread to keep this a bit more general about the whole idea, rather than implementation-specific smiley  I'm still getting the hang of where to post what sort of questions...
Logged

Current Projects: Rodentometer - Hamster Endurance Moni

Pages: [1]   Go Up
Jump to: