Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Couting bubbles simultaneously on 96 inputs

Good morning,

We are working on a research project related to biomethanisation. We have 96 small digestors and we intend to measure the volume of biogas generated in each of them. The gas flows are very low so we intend to count gas bubbles in glass tubes filled with colored water.
We have one of these bubble counters (http://www.ncbe.reading.ac.uk/NCBE/MATERIALS/MICROBIOLOGY/bubblecounter.html) and we intend to fabric 96.
When a bubble pass in front of the sensor, the voltage pass from 2,25V to 0,83V and come back to 2,25V. The signal is detected by a LCD counter (LR 96702). It's an analogic signal, not a square signal and we know the puse length is above 50 microseconds (detection threshold of the lcd counter).

We need to regularly acquire (for example each hour) the number of bubbles generated by the 96 digesters so we want to connect the 96 bubble counters to a DAQ system.

I'd like you help us to choose the more adequate (and low cost) material for our application and I have several questions to ask :

- Can we use a board with numeric inputs? Are these inputs able to interpret a sine pulse as a square pulse? Or do we need to transform the signal?
- Do we need counter inputs? Or is it possible to count the pulses (detected by classical numeric inputs) in software with labview?
- If we need counters, is NI 7811R a good choice for our application?
- If it is possible to count the pulses in software, is NI 6509 a good choice?
- What cables and terminal blocks do we need? (shielded?)

Thank you in advance for your help.

Sébastien LEMAIGRE

CRP-Gabriel Lippmann
Département 'Environnement et Agro-biotechnologies'
BIOFAR-EVA
41, rue du Brill
L-4422 Belvaux
GD LUXEMBOURG

Tel:  +352-47.02.61.458
Fax: +352-47.02.64
e-mail: lemaigre@lippmann.lu

0 Kudos
Message 1 of 5
(5,123 Views)

Well, you've got some trade-offs.  96 channels is a fairly high channel count to deal with.  Couple options:

1. Use the 6509 board with "change detection" feature.  From a DAQ standpoint, this will be the simplest and cheapest.  However, you'll need 96 instances of interface circuitry that will transform the analog "pulses" into DIO-compatible signals such as TTL.  I'm not familiar with whether there are any multi-channel off-the-shelf modules to help you out there.  You'll also need to do some processing on the DIO bits in order to count transitions on each one individually, though it'll be fairly straightforward.

2. Use high-channel-count Analog DAQ board(s) to continuously sample the analog signals directly.  The DAQ part of the cost will be higher than going with DIO, but you won't need any interface circuitry.  You will, however, need significantly more sophisticated algorithms to interpret the analog "pulses" in terms of counts-per-channel.  Not crazy hard, but you'll probably get into lots of little hard-to-anticipate exceptions to the norm.  Some bubbles are smaller and may make pulses of shorter duration and less voltage drop. Sometimes two bubbles connect and make a long pulse -- should you count once or twice?  And so on.

3. The 7811R is not something I can comment about usefully, except that it appears there's a non-trivial learning curve to become decent at programming for the FPGA's.  Unless I already had the board or had familiarity with the programming, I'd personally opt for one of the other approaches.

-Kevin P.

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 5
(5,116 Views)
Hello Kevin and thank you for your answer,

1. Is it possible to do this simultaneously with the 96 inputs of the board? I don't know how numeric acquisition on multiple channel works. Is there multiplexing between channels? Must we consider sampling rate "shared" between the inputs (like in analogic acquisition)?
Why must we transform our signal if a simple lcd counter can "see" the pulses? Why need daqcard a specific conditionning signal?
If we need to transform the signal, are you sure you cannot be more precise? What kind of hardware do we need? Is it expensive or hard to design?

2. For this option, what would be the cheapest hardware? What about 3 NI 6224? The sampling rate is 250 ks/s but if we use all of the 32 inputs the sampling rate for one single input would be 250000/32 = 7812,5 samples/s. Am I right? I guess it would be enough to detect the pulses. But this is an expensive option...

3. For our application, do you think it would be more efficient to use hardware or software counting? What are the advantages of hardware counting? If it is not useful, I guess we can forgot the NI 7811R since it seems to be hard to program.

I know I ask a lot of questions! I am sorry....

Thank you in advance,

Sébastien
0 Kudos
Message 3 of 5
(5,100 Views)

I don't have all the answers, but here's a best shot:

1. The 6509 DIO board appears to be divided up into 12 separate 8-bit ports.  I suspect that the DAQmx driver will allow you to address all 96 bits simultaneously in your application software by specifying something like  "Dev1/port0:11" or maybe "Dev1/line0:95".    So if you use a DIO approach, you'd be monitoring all bits simultaneously and would have some means to capture those bits whenever there was a falling edge on any of them.  I don't know what rate of DIO transitions the board will support though.

I just followed the link to the bubble counter for the first time.  Looks like a pretty small outfit since the website mentions a support person by name.  You should talk with them and see whether they would be willing to make you 96 "special" bubble counters that produce TTL output instead of the analog pulse.  I'm no circuitry expert, but it seems like something in the neighborhood of a simple comparator with hysteresis.  With a quantity of ~100, they may be willing to do it -- there are probably other potential customers who'd like such an option.

If you were to build the circuit yourself, I don't think I have the expertise to give you specific details.  You really want to have a good understanding of the range of variation you can expect in the analog pulse and how you want to interpret the borderline cases.  The basic idea is a comparator where the output is a TTL High or Low depending on whether the input voltage is above or below a pre-set reference voltage.  You'd want some hysteresis / filtering in there so that you don't toggle multiple times during the voltage fall and rise if there's a lot of noise riding on that signal.  There's a good chance that the people who already made the special-purpose bubble detector have some good experience to draw from in designing the right type of conversion to TTL.

2.  Multiple AI cards would be expensive.  Yes, the multiplexing ones will divide the max sample rate down according the the #channels.  It will also mean you have to process a *lot* of data.  There could be some tricky issues to make your memory handling efficient as you process 96 separate data channels.

3. You're going to use some software either way.  If you start by conditioning the bubble signal then capturing with DIO, you'll still need to search out and count each channel's individual transitions.  There are functions that can makes this fairly simple to program.  If you acquire AI however, you'll first have to design your own software algorithm to detect the transitions and then you'll count them.

The key advantages to HW-counting would be CPU & memory efficiency, and avoiding all the work needed to design, test, and fix a software signal processing algorithm.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(5,091 Views)

I've just started learning about the 6509, and there are programmable input filters that can eliminate glitches/spikes and provide debouncing for digital switches/relays through a software-selectable digital filter. This might simplify the circuit if you can use the 6509 to provide filtering. Change detection for a channel can be on the rising edge, falling edge, or both.

I've been using the 6509 to trigger a LabVIEW timed loop and send TCP messages on a P4 3 GHz pc. I've used the rising edge of a TTL sync pulse input from a waveform generator to a single 6509 DIO line at 2.4 kHz with no problems. Bubble arrival rate would need to be "reasonable"

0 Kudos
Message 5 of 5
(5,063 Views)