Recently, I was in urgent need for a data logger with a relatively fast sampling rate of at least 10Khz. As usually the need appeared late on Friday and system had to be functional over the weekend so ordering something was not an option.
The signal needing measurement was a short dip of a few hundred millivolts on a 3V line, that repeated periodically. If I could discern its relative amplitude and timing and could store many days worth of that I would be all set. I started poking around what was in front of me. An audio input on my laptop was the first candidate, seeing how it has plenty of resolution and fairly high sampling rates. I divided the signal down and fed it in, then used Audacity recording software to create a “log” at various bit rates:
That worked out pretty well and I was able to zoom in and measure timing down to 100uS. Next challenge was to expand the system to handle more than one channel, ideally at least 8. I also had to minimize parasitic load on the system I was measuring and make sure the output impedance of the circuit is low enough not to be loaded by the audio input.
Meet the big guns- Motu 828mk3 audio interface, normally used for audio recording. With 10 line inputs, 16 or 24 bit resolution and sampling rates of 44 to 192ksps on all channels simultaneously, it sounded like a good choice. And it was readily available:
Now I just needed something to condition the signals with proper input and output characteristics so that it looks like the 1V RMS audio signal (Or at least the positive half of that). Being a weekend, my source of parts was essentially RadioShack with their “vast” selection. To their credit they did have TI’s LM324s in stock.
After a bit of tinkering, the plan emerged- we’ll simply feed the signal into inverting opamp with a small gain, while shifting it so that only the window of interest is looked at. The audio input is AC coupled already, so there is no need to do it twice and affect frequency response any more than we have to.
There were the whole 2 bags of LM324s in stock and I did not feel like driving around looking for more, so I set out to build an eight channel “data logger” .
The board worked pretty well and produced the signals that kept the audio box happy.
As an added bonus since the pulse frequency was sub 10Hz, I could visually see them on the VAU meter of the MOTU box:
With the hardware in place, I needed something to actually record the “log”. Audacity proved to be only capable of working with two channels at a time, and I needed more. Enter Reaper, an audio recording program that can perform multichannel recording. I only needed a week or so of logging, so their evaluation version fit the bill perfectly. Being a relatively high end audio box, Motu’s lowest sampling rate is 44ksps, so recording to compressed files quickly became critical, as i was generating gigabytes of data an hour when first using regular wave format. Once properly setup, and configured to record in compressed Ogg Vorbis files instead, I started getting reasonably sized daily “logs”.that could then be opened in Audacity as audio files and analyzed as needed.
in this particular application, where detailed waveform and timing were more important than accurate amplitude measurements, the audio interface approach proved to be a pretty handy tool.