Pages: [1]   Go Down
Author Topic: Arduino reading 4 or more fan tachs  (Read 412 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone! I've been playing with some fans I had lying around and was interested in learning how to use the tach of the fans.  I've read many articles to use either Pin2 and/or Pin3 of the arduino and use interrupts.  That would only allow me to read 2 fans max.  I was wondering if I could use the analog inputs (with a low-pass filter) to read the fan tachs.  I do not care too much about the accuracy.  I'm more interested in just being able to know if the fan is still working (or spinning).  What would you guys suggests for something like this??  Thanks in advance!
Logged

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Approx. what is the fan tach frequency? It's often a fraction of the fan RPM. You may be able to use the  millis() or micros() to measure the delay between tach pulses (period)  and then convert the period to frequency (f = 1/t) . An RC network (integrator) on each fan tach and analogRead() to measure the output voltage from the network would work, which essentially converts the pulse rate to a voltage and won't be terribly accurate but should be good enough for what you want.
Logged

Online Online
Faraday Member
**
Karma: 80
Posts: 3790
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm more interested in just being able to know if the fan is still working (or spinning).  What would you guys suggests for something like this??

Eyeball, Mark-I

 smiley-cool

Are you limited to an Arduino with only 2 interrupts though?- Mega has more....
Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

texas
Offline Offline
God Member
*****
Karma: 27
Posts: 862
old, but not dead
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're not terribly concerned about absolute accuracy, pin change interrupts should work.  Especially if you just want to know that they are running.  Many pins can support the PCINT.  Inside the ISR you'd just need to determine the pin(s) that caused an interrupt and set flags that main level checks.  If main level processing sees a flag going unset for x amount of time (or y loop iterations), then the fan must not be running.
Logged

Experience, it's what you get when you were expecting something else.

Pages: [1]   Go Up
Jump to: