PC Data Acquisition

This is slightly OT for all the groups I'm posting to, but something many of you should have done.

I have a need to sample one channel of data at between 200 and 2000 samples per second, 12 bits or so, and store it away.

The signal happens to be on a 4-40mA line already, to make life easy for getting off-the-shelf hardware.

I need to store hours of guaranteed-uninterrupted data, or failing that, store data that's timestamped at the measuring device (not just in the PC software) so that I can see what's missing and deal with it. (dropouts of even a half second or so would be OK, as long as the timestamps are correct).

The mental model I'm carrying around is a laptop PC, connected to some little box via USB, quietly buzzing away in a corner making multi- megabyte files with the information I want.

I assume that this is a no-brainer with National Instruments hardware and software -- am I correct? If not, is there a solution that you can recommend? Do you have a favorite other than NI?

TIA.

Reply to
Tim Wescott
Loading thread data ...

For one time deal: take your favorite micro eval board from the shelf; connect it to USB to RS232 dongle; put together simple application; record file from terminal program on PC. All preparation should take less then half an hour.

Vladimir Vassilevsky DSP and Mixed Signal Designs

formatting link

Reply to
Vladimir Vassilevsky

It's for a customer over 1000 miles away whose hand I cannot easily hold.

And it needs to deal with 4-40mA, for which I have no hardware.

But it's a tempting idea.

Reply to
Tim Wescott

I'd look at Measurement Computing

formatting link
as well. They've been around since the Dark Ages (when Computer Shopper magazine gave the mailman a hernia). I keep one of their USB acquisition modules in the toolbag for ad-hoc setups. Easy to interface to custom software (DLL and docs are included) but they do have stand-alone data logger software available. A free version is included with most of their modules.

Reply to
Rich Webb

I usually use this for such jobs:

formatting link

Plus a few resistors. It also comes in a version for LAN connection in case that's more practical.

It comes with a light version of Azeotech SCADA software which is really handy if you don't want to mess with computer programming or Excel-VBA too much. If you get stuck both Labjack and Azeotech have rather responsive forums where their respective support staff chimes in. And if someone screws up a PID you can become the expert and help them out :-)

Reply to
Joerg

Like a resistor? :)

Reply to
John Devereux

Wow. I was actually just wondering about something like this the other day. And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

Reply to
Rob Gaddi

You already own A/D hardware and software that can sample two 16-bit channels at up to 44 kHz with an amplitude of roughly one volt. These days it's integrated but the board used to say "SoundBlaster" on it. Just bypass the DC blocking caps on the input.

With some soundcards, it's possible to record from the left and right channels separately. You could feed the same signal to both channels and then stagger the file gaps so that one of the channels is always recording. I'd do something like "new file every 5 to 10 minutes"; that way you can go with the file timestamp and the sample count to establish an exact time of the event of interest. Use something like Audacity to look at the files, or use SoX (Sound eXchange) to convert the .WAV files you will probably get into raw binary files, which you can then concatenate back together, or scan through in your favorite programming language.

If you can, it might be worthwhile to run the application on the target PC for several hours and see how bad the PC's internal clock drifts. Some are good and some can be out several seconds over the course of a day.

If you use Windows, try to have the machine not be on a network, and shut off all the Windows updates, anti-virus updates, etc. These can randomly munch large amounts of your disk and CPU and maybe affect the data acquisition.

They probably sell a card or USB dongle that can do it, in conjunction with Labview. Be sure you are sitting down when you ask about the price, and plan on having a fairly stout PC to run Labview on. Measurement Computing probably sells something equivalent for slightly less money. If you don't already own Labview, and you have the ability to write your own code, you can probably reduce the cost somewhat; despite NI's advertising, a first-time Labview user is *not* going to get something to work in 5 minutes.

Matt Roberds

Reply to
mroberds

And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

It should just enumerate as an FTDI serial port, so there would be no need for drivers and DLLs.

Reply to
John Larkin

And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

Not quite. It has a whole slew of settings that are handled by the driver, AFAIK. It even has a simple set panel where you could goose a DAC, set a port or read an ADC value (they all show up in the window). Then there's things like streaming mode and so on. It also needs to know whether it has foreign device connected to it and whether they should be addressed with RS232, "Her Majesty" or SPI.

Reply to
Joerg

And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

These use the FTDI chip, which is the most common and most reliable USB-serial interface:

formatting link

formatting link

formatting link

These generally have a control panel app, and maybe a data logger. But they are also easy to access from a programming language, as a COM port.

Reply to
John Larkin

day. And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

I have used a larger FTDI chip with analog plus digital I/O in a design quite a while ago.

However, the Labjack is a very different class of device. It's not just a simple I/O pod, there is a uC on there with firmware and all. It can run some simple local stuff such as timers and timed acquisition. You can't do that with just an FTDI driver. Sometimes there are applications where a brief hiccup in the PC or USB link could cause a *KAPOOF* situation, where you need some local smarts on the control pod.

Reply to
Joerg

Got a parallel port? Should be LPC... Intel sez it's up to 2Megabytes/s. Not sure if true..

Snippets:

formatting link

Reply to
Johann Klammer

And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

Maybe 1% of the cost of a NI solution.

Reply to
Spehro Pefhany

And the fact that it comes complete with cross-platform drivers and Python bindings makes it pretty seriously nifty.

And no membership fees for continued support. My own Labjack is many years old. Got stuck somewhere recently, asked, received a response within the hour, problem fixed.

Reply to
Joerg

Does it harm if 50/60 Hz mains hum is inserted into the ADC input ? Missing samples could be detected by discontinuous in the 50/60 Hz tone.

Are you sure about 4-40 mA ? Standard industrial devices are 4-20 mA ?

Use the current loop to modulate some voltage/frequency converter and use standard sound card to detect the signal. An audio transformer will take care of any ground loop (hum) problems.

Reply to
upsidedown

you really mean 4-40mA not the usual 4-20mA ?

anyway it is just a resistor

if you can live with 10 bits, something like this won't even need a pc

formatting link

-Lasse

Reply to
langwadt

Oops...

Reply to
Tim Wescott

In America everything is a little bigger :-)

These are cool, but not enough memory for Tim's job:

formatting link

Reply to
Joerg

;)

yeh and much too slow, maximum is 1Hz, he wants +200Hz

-Lasse

Reply to
langwadt

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.