PDA

View Full Version : Data Acquisition: Hardware and Software



nerobro
02-18-2002, 01:10 PM
Well.. in our last thread concerning how fast a cocker will cycle, we are down to the fact that we just dont' have the data at hand to get solid answers. I want them.....

So, here's the question. What resolution am I going to need to get good data testing out paintguns. I was sitting and chatting with my friend here and he gave me a rule of thumb, I want 4x the resolution I need to get good data.

I have found PCI A/D cards that'll sample at 50khz and at 12 bit resolution. Which would seem to be adequate for all but really fine edge comparison testing of regulators.

There is also the question of software. I've seen 6-7 software packages out there, they all seem to be in the 250-1000 dollar range. I was wondering what people have tried, and what experiences you've had with them.

What I haven't been able to find is a good source of sensors. Any leads on them would be greatly apreciated. (I do understand they are fairly expensive... I remmber soemthing about the air pressure sensor on the gun dyno at AGD costing $150 if my memory serves)

314159
02-18-2002, 07:23 PM
i am wondering if 8 bit resolution would be enough, if so, i could probally rig up a 8 bit analog to digital converter to a paralell port without too much trouble.

with a little more circuitry, i could do 16bit, but it would half the sample rate.

Redkey
02-19-2002, 09:57 AM
Please correct me if this is wrong....

assume your 500 psi pressure transducer puts out 0-5 v ie 0 volts = 0 psi and the 5v=500 psi. So an output of 1v = 100 psi assuming that your transducer is linear.

at 8 bit resolution you have 256 samples in the 0-5 volt range. Which means the smallest voltage increment you can measure is 5v/256 = 0.0195 v

from our imaginary pressure transduce mentioned above we know that 1v=100 psi so... this means the smallest pressure you can measure is about 1.95 psi.

12 bit resolution means you can break the 0-5 v signal into 4096 measurements... 5v/4096= 0.00122 v which would give you a resolution of about 0.122 psi on our imaginary pressure transducer.

Make sure you size the pressure transducer correctly... you don't want to measure 100 psi on a 3000 psi transducer.

Also... if you're going to be measuring more than one channel your sampleing rate will be reduced. A 50KHz card will collect at 25 KHz on two channels, 16.6 KHz on three channels... etc.

I use National Instruments Labview for my stuff. It offers a HUGE amount of programming capability although it's not easy to program. I think the price tag is about 3k

AGD
02-19-2002, 11:47 PM
We use Labview for all our stuff but it's a bear to get going. You are better off with a good digital ocilliscope that can print out.

AGD

Redkey
02-20-2002, 12:37 AM
perhaps thats why the NI dev folks visit us monthly...

I'm still learning how it works... yes, it is a bear to get going... especially with none NI DAQ cards.

314159
02-20-2002, 09:11 AM
i found plans and code for an 8 bit adc that will run off of the paralell port, (2 chips). this can take a 8 bit sample at the speed you run the paralell port.

i also found plans and code for a 12 bit adc that will run off of the paralell port, but it sends the info serialaly over 1 data pin, so it takes 12 cycles of the paralell port to get one reading.

i think that if i grab an 16 bit adc, some d type shift registers. i can adapt the first plan to read a 16 bit sample in 2 cycles of the paralell port.

i just need to see what speed i can consistantly cycle the paralell port at. but i think that this will work pretty well, and i can get it to work cheap. and if i need more channels, grab a couple of pci paralell port adapters.

Redkey
02-20-2002, 09:17 AM
There are also ways you can use a sound card as a DAQ card. Do a bit of reading on the web to see what you can find for cheap alternatives to using a "real" DAQ card. I'm sure there is plenty of info out there.

Keep us posted on how your project progresses.

314159
02-20-2002, 09:54 AM
i have seen some things about using a sound card as an ocilloscope. but then you would have to make your own voltage divider circut to set the reference point. (if you have a higher voltage than the sound card imput) so it is not an easy solution in itself.

the higest cost item in the paralell port model will be the adc. i think that i can get a good consistant data rate out of it, i hear that 2 mega bytes/sec is about the upper limit of what the paralell port can handle as far as data throughput. so i think that data rates will not be to shaby. i also think that i can throw it together for less than a diecent sound card.

my time to me is free =]

Redkey
02-20-2002, 02:55 PM
If you're just measuring the timing of something... like the autococker thing mentioned at the start of this thread then you don't really need to be concerned about the scale of the reading. All you really are concerned about is when a voltage spike occurs telling you something happened. You just need to make sure you have an accurate time scale running so you know how much time has passed between events.

If you are measuring actual pressure values then you will need a calibrated signal so you know what voltage corresponds to what pressure.

I wish I had some free time.

steveg
02-21-2002, 07:59 AM
Redkey is right about the soundcard. My soundblaster live
will do two channels of 16bit 48kHz sampling.
wave studio, the included utility unfortunatly doesn't
have a time or amplitude scale
As far as sensors go I wonder if the 24pc pressure sensors
from Honeywell would work They have a ~200mV
full scale output, require 10~16V excitation (2 9V's and a
zener). And best of all they are CHEAP $22 cdn at Electrosonic

here they are http://content.honeywell.com/sensing/prodinfo/pressure/catalog/c15_11.pdf


found a program with time and amplitude its free
http://download.cnet.com/downloads/0-1896426-100-8606398.html?st.dl.1896426-101-8606398.bc.1896426-100-8606398

bjjb99
02-21-2002, 11:34 AM
If we're talking about measuring the cyclic rate of an autococker through the use of pressure sensors, then the Honeywell ones should work pretty nicely.

For measuring the "behind the ball" pressure during a single shot, this sensor probably lacks the necessary response time. The Honeywell sensor listed is quoted as having a response time of one millisecond. The time from when a paintball starts moving till it exits the barrel is only a few milliseconds, leaving us with a small handful of non-overlapping datapoints to generate our pressure curve. To get a good pressure curve, you'll probably want more than a hundred samples during the ball's in-barrel travel.

A ballpark figure assuming 10 msec of in-barrel paintball travel (high, I know) and 100 samples (on the low side) gives us a required response time of 0.1 msec. So a sensor with a frequency response threshold of 10 kHz would be what I'd consider the bare minimum for in-barrel live-fire pressure measurement. If I were actually constructing a measurement system, I'd shoot for frequency responses of at least 50 kHz for the sensor and a data acquisition rate of at least 1E5 samples per second, limited only by whatever budget I have and physical size constraints.

Entran makes a line of miniature and subminiature pressure sensors with resonance frequencies up in the megahertz range. Usable frequency response is, according to them, around 20% of this resonant value, so a 1 MHz resonant sensor would have a usable frequency response of around 200 kHz. Their website does have a price list, and these little suckers ain't cheap at all.

Base page - http://www.entran.com/
Pressure Sensors - http://www.entran.com/ptoc.htm
High Frequency Sensors - http://www.entran.com/epih.htm
Price List - http://www.entran.com/price.htm

BJJB

steveg
02-21-2002, 01:20 PM
Their website does have a price list, and these little suckers ain't cheap at all.

That would be putting it mildly.

Actually I wonder is the response time really is 1ms
on the honeywells.
they are after all analog devices, and being very cheap,
for a sensor, they might be conservatively rated to allow
for manufacturing variences. and you can buy a lot of them
for the price of one entran
Too bad Electrosonic www.e-sonic.com have no stock
(located in toronto on. they are a huge supplier in canada)

I'd be inclined to follow industrial practice, and use
some variety of proximity,reed or optical switch to check
cylinder stroke ends, for a cocker

So we have one that is very affordable but probibly not
suitable and one that is suitable and definitely NOT affordable.

314159
02-21-2002, 01:42 PM
the pressure sensors would be handy for testing out different regs for the front block, different regs for the cocker. and testing out different volumes for the area in front of the valve.

Redkey
02-21-2002, 02:36 PM
Steveg...

not knowing much about sound cards I'm not sure how well they will read a 200mv signal... so, you might need to amplify the signal from the sensor... at low pressures the signal will be pretty small.

I'm not sure how well it will work to use batteries to power a pressure transducer... over time the batteries will drain and your excitation voltage will drop. This means that your output voltages will drop accordingly changing the calibration of your system... assuming you care about the calibration.

bjjb99
I'm not sure how the resonant freq relates to the response time. The transducers I have are rated as 0.1 msec full scale response time... meaning it would take the transducer 0.1 ms to go from 0 to 300 psi. I'm not sure if the reaction time is linear, meaning, 0-150 psi would take 0.05 ms or 0-75 psi would take 0.025 ms. I'm still putting my system together... I'll know more whenever I get around to finishing it.

A 1Mhz res freq with 20% usable is 200khz (as you mention) which is 0.005 ms. But, 0.005 ms to do what? goto full scale? Show a difference between 100 and 105 psi? Hmmm... I'll have to get more information on this.

You're right about slow response times, although with a proper data collection system you should be able to collect more than enough data points. It's just that with a "slow" transducer you won't get very useful data.

fun stuff... just wish I had more time to work on it.

Redkey
02-21-2002, 02:42 PM
steveg (again)

If you're just concerned about the cycle rate then just count balls out the barrel.

Use an IR emittor aimed at an IR phototransistor at the end of the barrel and count pulses with respect to time.

steveg
02-21-2002, 07:44 PM
Red, after much searching, the line inputs on the soundblaster
are 1V max, or 1000mV so 200mv should be no
problem at all.
The drain on the batteries would be pretty small, use them
for a while and then throw them into your revi.Or find a
12VDC regulated wallwart. remember the object is to keep
this within a hobby budget (Imagine Steve rolling around
on the floor laughing, after saying budget and hobby in the same sentence),
however $700 for a sensor, no matter how nice is a bit much.

As for as counting balls out the end of the barrel, a spare viewloader optical sensor pair might work.
Even easier would be the above program(for the time scale)
the computer,soundcard,and mic, that you allready have.

That still would not answer how fast the hammer and cocking
cylinder operates that, being the original idea of this thread.

steveg
02-22-2002, 07:53 AM
I guess that, at this point, what is needed is for some kind
soul with the real thing, NI labview, high speed pressure sensor, etc,
to compare the results with soundblaster,audacity,and honeywell 24pc
or other affordable sensor to see if anything useful or usable comes
out. We're playing with pbmarkers here not running oil refineries;)

bjjb99
02-24-2002, 09:32 AM
Redkey

I'm not sure exactly what is meant by "usable" frequency response. At first I had figured it would simply be the reciprocal of the full scale response time, but now I'm not so sure... there may be an additional conversion factor in there (square root of two, a pi, or something equivalent). I'll check around with some instrumentation guys I know; if they can add anything I'll post it here.

I agree about being able to collect a whole mess of datapoints with a fast data collection system (supersampling), and yet have most of those datapoints contribute little to the overall information content of the data when using a slow pressure transducer. There is a computationally intensive (and error prone) way out... if the response curve of the pressure transducer is well-characterized and normalized, you can deconvolve that response function from your supersampled data and remove, to some degree, the slowness of your sensor. If done improperly, you end up with results that are far more useless than the original inputs. :)

steveg

All this talk about testing has got my geek urges going. I'm going to start looking around at work for some of the data collection equipment required to develop a test system. As stated previously in one of the Deep Blue threads ("Things to ponder with how much pressure you need", I think), a decent digital oscilloscope may well do the trick with appropriate calibration. I doubt I'll find pressure transducers lying around, but if I can borrow a decent 'scope, I can at least test the cheaper transducer options out of my own pocket.

This will be one of those open-ended projects... no idea as to schedule, feasibility, etc.

BJJB

nerobro
02-25-2002, 04:35 AM
We here are working on the same level ;-) Between my buddy and I we have the ambition, an o-scope, a buttload of comptuer hardware.. and enough spare cash to get a few transdoucers.. As for gates and reed switches.. the local ratshack can handle that.

one of these days this thread will come out of the depths of the archives when we all get the hardware togother.

Redkey
02-25-2002, 09:43 AM
I too have all the stuff to do this and several other interesting projects... it's just a matter of free time.

I think the biggest issue will be finding all the PB gear to test. I cannot justify spending all the money to go out and buy one of every regulator just to test the differences in recharge rates.

If people start performing their own testing any results should be throughly documented along with the test method and equipment used.