jed Posted September 16, 2009 Report Share Posted September 16, 2009 I have a sensor (anemometer) that is outputting a TTL square wave, where the pulse frequency corresponds to the wind speed (the calibration is essentially pulses/sec --> MPH or Rev/Sec). I am reading this through a cDAQ-9172 equipped with a 9205 AI module. I was previously planning to use it through a 9401 and use the counters on the chassis, but now those counters are used for some encoders. There is already an externally clocked AI task running on the 9205 (which is ultimately the rate at which I need to sample the anemometer), so unless I can run two tasks with asynchronous timing simultaneously, I cannot process the the signal as analog. So I believe this means I will need to externally convert the pulsed signal (on the order of 0-50Hz) to a voltage signal (unless someone else has a better idea). Can anyone out there suggest a module or device for doing this? Thank you! Jed Quote Link to comment
PaulG. Posted September 16, 2009 Report Share Posted September 16, 2009 (edited) Read twice, post once. My apologies. "Never mind." Edited September 16, 2009 by PaulG. Quote Link to comment
ShaunR Posted September 17, 2009 Report Share Posted September 17, 2009 I have a sensor (anemometer) that is outputting a TTL square wave, where the pulse frequency corresponds to the wind speed (the calibration is essentially pulses/sec --> MPH or Rev/Sec). I am reading this through a cDAQ-9172 equipped with a 9205 AI module. I was previously planning to use it through a 9401 and use the counters on the chassis, but now those counters are used for some encoders. There is already an externally clocked AI task running on the 9205 (which is ultimately the rate at which I need to sample the anemometer), so unless I can run two tasks with asynchronous timing simultaneously, I cannot process the the signal as analog. So I believe this means I will need to externally convert the pulsed signal (on the order of 0-50Hz) to a voltage signal (unless someone else has a better idea). Can anyone out there suggest a module or device for doing this? Thank you! Jed You could sample at a higher rate and post-process to analyse the pulse train (There are vis to estimate duty cycles, pulse frequencies etc). Not as accurate as timers, but should be good enough for your requirements. You could then just ignore the data you don't need on the slower AI channel. Quote Link to comment
vugie Posted September 17, 2009 Report Share Posted September 17, 2009 (edited) You may build simple circuit of resistor and capacitor, and measure RMS of the signal, which will be proportional to frequency. But as these are rather low frequencies better simulate whole frequency range to tune values of elements (using i.e. Qucs as I did for preliminary study): You may also try (as these are low frequencies) to directly connect the signal to LPT port and catch pin state changes. Single ms resolution should be enough for this. But it depend on minimal pulse width - it cannot be too short. Edited September 17, 2009 by vugie Quote Link to comment
jed Posted September 17, 2009 Author Report Share Posted September 17, 2009 You could sample at a higher rate and post-process to analyse the pulse train (There are vis to estimate duty cycles, pulse frequencies etc). Not as accurate as timers, but should be good enough for your requirements. You could then just ignore the data you don't need on the slower AI channel. I thought of that, but the external clock signal will operate over a wide range, sampling about 500-4000 points per run at anywhere from 1000Hz down to 10 Hz. At the high end of the range I won't be guaranteed to get a pulse over a short run time. I thought about letting it free run continuously, but it's impossible to change to the hardware control and back without possibly losing data. And my customer would probably not be happy with "Not accurate, but good enough". Quote Link to comment
ShaunR Posted September 17, 2009 Report Share Posted September 17, 2009 I thought of that, but the external clock signal will operate over a wide range, sampling about 500-4000 points per run at anywhere from 1000Hz down to 10 Hz. At the high end of the range I won't be guaranteed to get a pulse over a short run time. I thought about letting it free run continuously, but it's impossible to change to the hardware control and back without possibly losing data. And my customer would probably not be happy with "Not accurate, but good enough". Ahh. Now we are changing the goal posts I didn't say "Not accurate" I said accurate enough (do you need it accurate to 1us when each event is 1 week apart?). But you have a choice. Buy a timer counter card (problem solved). Or sacrifice a little accuracy (maybe 0.1 hz) and do it with what you have. If you are electronically inclined, freq-volt converter chips are cheap. But you will still only be able to read the freq (i.e the voltage level) as an instantaneous value. You can free-run (as you said) without having to switch back and forth between hardware gating. Just use the clock signal as a window event in the data stream to extract that segment. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.