LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting fan speed from IO output?

Hi there.

So I have an arduino hre that is interfacing with labview. Attached to it is a simple optical interrupt, which I intend to end up having a 4 bladed pinwheel pass through in order to make an anemometer. the interrupt gives a simple 1 every time a fan blade passes it. This should be an easy question, But I can't figure it out. How can I get the rpm of the fan from this 1/0 input?

Help will be greatly appreciated,

Ryan

0 Kudos
Message 1 of 4
(4,026 Views)

Interrupts cannot be used via LIFA.  You would need to modify the firmware and create appropriate custom functions to get the information you need.

I implemented quadrature encoders using a library on the Arduino that use interrupt pins which can be found in the Documents section here.  You might be able to get that to work or get something similar to work.

0 Kudos
Message 2 of 4
(3,006 Views)

nevermind. After a great deal of looking, I found a time-based script I was able to adopt

0 Kudos
Message 3 of 4
(3,006 Views)

Another way to measure fan speed is to use a LM2917 frequency to voltage converter. See:

<http://www.ti.com/lit/ds/symlink/lm2907-n.pdf>

If you are familiar with SPICE you could use LTspice to help you choose a value for the filter capacitor.   The LTspice group files have a SPICE model for a LM2917.  At low fan speeds a moving average filter should be used to remove ripple from  the signal.

You may also want to look at this thread LabVIEW interrupt handling to control YF-G1 water flow meter.  The originator was working on a custom version of LIFA for measuring flow rate with a YF-G1 water flow meter. The YF-G1 uses the same principle as your pinwheel. Its output pulse rate is proportional to flow rate.

hrh212

0 Kudos
Message 4 of 4
(3,006 Views)