Jump to content

TTL pulse to voltage/current converter


jed

Recommended Posts

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

Link to comment

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.

Link to comment

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):

post-7450-125317569917_thumb.png

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 by vugie
Link to comment

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". :)

Link to comment

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 :P

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.