Easy ways to record many analog values at once? - Page 1
Forum section: electronics / projects

author: Artlav
author_rank: Frequent Contributor
timestamp: October 06, 2015, 09:35:58 pm
content: I want to record data from a dozen microphones (a sound locating system), to be processed on a PC later.They have to be recorded simultaneously, down to microseconds.Obviously, i can go the long way with ADC chips and a microcontroller/FPGA.However, i was wondering if there is a ready-made solution/block/module for this already in existence?Kind of like the DC-DC converter modules vs rolling your own DC-DC converter.I looked at soundcards without much success.On one end, equipment that can record 8-16 channels tend to be too expensive and overfeatured.On the other end, buying a box of $1 USB soundcards does not solve the simultaneity requirement.I looked through places like Adafruit, and they don't seem to have anything related, at least not with enough channels.What else is there?

author: JoeB83
author_rank: Regular Contributor
timestamp: October 06, 2015, 09:47:54 pm
content: Does each microphone need its own track? I'm assuming so, but if not, you could make a simple opamp based mixer.

author: Artlav
author_rank: Frequent Contributor
timestamp: October 06, 2015, 10:17:10 pm
content: Each microphone is a separate track, so to say.The idea is to look at the waves on each of the microphone in the array, determine the phase shifts and use them to calculate the angle to the sound source.So, each microphone should be recorded independently, and there is no "mixer" to be had.

author: Marco
author_rank: Super Contributor
timestamp: October 06, 2015, 10:48:50 pm
content: You could take a bunch of those 1$ USB audio cards and feed one channel for each a sync signal. You'll need to resample to get samples to line up though.

author: LaserSteve
author_rank: Super Contributor
timestamp: October 06, 2015, 11:02:40 pm
content: FM encode or SSB mix (FDM Multiplex) 4 low pass filtered audio channels into four bands in the whole 20hz to 20 KHz bandwidth of the sound card. With care, all four channels can take the same time to upshift or downshift. It is a bit of a filtering design issue. I used to use the Obsolete Teledyne 9400 FV/VF chip for this sort of thing.In the past, the telephone company used analog multiplex groups of 12 or 16 channels with either FM or SSB, for this sort of "pipe bandwidth", then switched to 8 channel, eight bit, Delta-Sigma Codecs. The NRZ codec bit stream was easy to digitize and store.Look into adat/lightpipe/dante/telephone etc for solutionsI know a guy who makes a DC coupled 8 channel to Lightpipe board for cheap, ie 350$. But you need a lightpipe receiver in the PC.This can be done, but these days it might be easier to design your own module from the ground up and connect it to a PC.Steve

author: Marco
author_rank: Super Contributor
timestamp: October 06, 2015, 11:46:20 pm
content: You can get pretty cheap AD7606 break out boards from China.

author: Someone
author_rank: Super Contributor
timestamp: October 07, 2015, 02:48:51 am
content: Typically you use something already designed for the purpose such as several microphone preamp/ADC units via ADAT and all locked to the same clock, or rent a system if you only need it for a short time.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 07, 2015, 02:51:49 am
content: There may be professional recording systems that offer that kind of matching and bandwidth...erm, and what bandwidth was that, exactly? I'm guessing since you demand microseconds, it's well over 48kHz sample rate, but what are we actually talking here?But I don't know any specifically, so I can't be of much help..Tim

author: ivaylo
author_rank: Frequent Contributor
timestamp: October 07, 2015, 05:54:58 am
content: Spooky. This guy asked the exact same question but two years before you -http://dsp.stackexchange.com/questions/11472/audio-interface-or-external-sound-cardUnless it's you, but you haven't found a solution for two years...

author: Artlav
author_rank: Frequent Contributor
timestamp: October 07, 2015, 01:21:57 pm
content: Interesting.Tried using a reference tone generator, then free-handing one PC-connected microphone between the node positions of the array.Then, the reference signal is used to line up the recordings.With non-moving sine wave sources that works surprisingly well.It won't work with non-periodic sources, but all i need is to do a reality check on the simulations...Thanks for the idea.Anyway, sounds like there is no way around breadboarding the thing.Quote from: ivaylo on October 07, 2015, 05:54:58 amWasn't me.It's not exactly a novel idea, so i don't see what is so spooky about it.

author: Marco
author_rank: Super Contributor
timestamp: October 07, 2015, 02:24:09 pm
content: Bodging a AD7606 break out board to some USB microcontroller devboard with decent throughput (the NXP ones are good at that) shouldn't be too hard either. 8 channels would cost you 35$ in hardware, 60$ for 16 channels.

author: Jeroen3
author_rank: Super Contributor
timestamp: October 07, 2015, 02:50:04 pm
content: A bunch of PCI audio input channels? You can at least calibrate them with a loopback cable.

author: nctnico
author_rank: Super Contributor
timestamp: October 07, 2015, 04:32:41 pm
content: Microsecond accuracy means locking and synchronising all the ADCs. I don't know what the required maximum frequency is but if it is below 3.7KHz an option could be to use codecs used for telephony systems. These codecs can be used to create a 2Mbit stream with 32 channels which in turn can be captured with a PC (for example an E1 interface card). This would require some old school telephony hardware design though.

author: Ice-Tea
author_rank: Super Contributor
timestamp: October 07, 2015, 05:08:53 pm
content: I'm sure there are a lot of "building blocks" around that would suit your need. Per example, a 4A24 (http://www.mesanet.com/analogcardinfo.html) connected to a 6I24 might work, but I have no idea how much money is too much

author: zapta
author_rank: Super Contributor
timestamp: October 07, 2015, 06:20:15 pm
content: Quote from: Artlav on October 06, 2015, 09:35:58 pmWhat's your budget?For the 1$ approach, you can inject periodic time pulses to all the channels and then correlate in the post processing.BTW, some cities have systems like that to detect location of gun shootings.

author: SeedB
author_rank: Newbie
timestamp: March 17, 2017, 04:17:24 pm
content: Quote from: Artlav on October 06, 2015, 09:35:58 pmLook herewww.scadaboard.proDAQ_AD7606_UDP_20kHz – 8-channel Data Acquisition (DAQ) by the AD7606 data acquisition ARMFLY module with a frequency of 20 kS/s/ch. Data is transmitted over Ethernet module to the host computer and displayed in graphical form in the MATLAB system in real time.

author: Avacee
author_rank: Unknown
timestamp: March 17, 2017, 05:05:52 pm
content: I'm unsure if your problem is how to record 12 microphones or how to locate a sound.I did a sound locating system once using a PC soundcard with 2 stereo inputs = 4 channels = 4 mono microphones. My system didn't calculate elevation as the 4 microphones were on the same plane.Put the mikes in pairs and a known distance apart and put Card 1's mikes at a known angle to Card 2's such as 90 degrees .. ie a cross/box shape.The delay offset for Card 1 Channel A vs Channel B will give two possible bearings on that plane - not elevation.The delay offset for Card 2 Channel A vs Channel B will give two possible bearings on that plane - not elevation.Card 1 and 2 might have a small bit of latency in comparison to each but you can analyze the waveform to determine that and process as required.Cross-reference the two directions and there's your source bearing - add more microphones for more resolution and elevation by working in another plane.https://en.wikipedia.org/wiki/Boomerang_(countermeasure)This was the inspiration to make my own - I got bored after the 4 mikes and never did the elevation pair and I certainly never wrote the same level of algorithms to process masses of background noise. But mine worked fine at the local range with little background noise :pSound at sea level is about 1,129ft/344m per second so assuming 44.1kHz input you get a theoretical resolution of 0.02ft (0.3inches) or 0.0078m (7.8mm) - mine was good, but not that good :pIt's easier for sharp sounds with give a really clear peak to match such as the crack of a bullet - bit harder for conversation with less clear peaks.Sorry, its a software solution and not an EE/hardware one.Regarding 12 inputs: there are audio/studio sound cards with 4+ input analogue channels and you can have multiple soundcards per PC - You can get also special boards with 6+ PCI slots.When working for a radio station one project was to beat match the current track with the next track when the system was in automatic mode then fade out and fade in the tracks.Problem was it worked so accurately we got complaints the audio sounded mechanical so I had to add in random delays :p.Which shows that once you've captured a waveform everything is possible!Matching 12 waveforms ... Woo hoo! Good luck.. Let me know if I can help with the software - others definitely have more hardware knowledge than meIf the military can do it with 7 do you need 12? - though you can possibly discard a few that you can't match to anything.

author: bobaruni
author_rank: Regular Contributor
timestamp: March 17, 2017, 05:59:22 pm
content: Quote from: Avacee on March 17, 2017, 05:05:52 pmBy laying out the microphones in a optimal way, you should be able to triangulate the point source in 3 dimensions with less than 12 mics, perhaps 6 or less connected to an AD7606 and some clever DSP software.

author: fcb
author_rank: Super Contributor
timestamp: March 17, 2017, 07:46:49 pm
content: Is it for a science project or is there an intention to commercialise it? If you just need to get going, then things like the JoeCo recorders will work. But they aren't low cost. I'd probably just roll my own (Stereo ADC and a DSPIC33+SDCARD) for multiple pairs of channels just slave the extra other ADC's/DSPICS/SDCARD to the master via the I2S bus. There is probably something arduino like out there that could be paralleled.I've gotten 4 channels (2 stereo pairs) into a DSPIC before by inverting the SCLK on one pair - but this would mean a 1/128 sample phase difference, and it won't scale nicely.On the other hand, if you can use USB to a PC to store the data, then you could use an FT232H in 8 bit FIFO mode. Connect your 6 stereo AD's in parallel, a little bit of glue logic (74F counters) to create the LRCLK (48KHz) and SCLK (48KHz x 64?) And feed channels 1-2 into DB0, channels 3-4 into DB1, etc... and your LRCLK into DB6. You'll have to unpack on the PC, but pretty quick to prototype.

author: DaJMasta
author_rank: Super Contributor
timestamp: March 17, 2017, 10:08:24 pm
content: This is a very common feature of studio or live sound reinforcement gear - lots of inputs required for micing a whole stage or orchestra or something, and unlimited expandability with external timing connections to sync up inputs. These do tend to be more expensive, but it would probably only be $100-200 for a mixer or basic interface capable of 8-12 channels of input that works through a single PC connection - you would then need to make sure that it can send them as single channels (not all can, but there are certainly consumer level USB devices that can do quite a few), and you would need to make sure your receiving applications are capable of processing that many audio streams - OS sound system support sometimes doe not support multi-input capture, but every DAW will support it and every piece of serious gear will.Going with discrete input devices is going to be cheaper, but you're going to run into two problems: software and driver support because they'll be treated as individual audio input streams and you want to be aggregating them all together in a single software application, and that the individual clocks will desync over time. Yes, resampling or offset calibration for the different operating frequencies will eliminate most of the problem, but you've got to incorporate that into your software.As mentioned, there's also the option for a multi-channel ADC board, and if you don't mind doing a little prototyping on the front end, something like an 8 or more channel audio ADC development board could be a perfect choice. They'd likely have driver level support for a raw datastream from the ADC (which may be easier to deal with than multi channel audio drivers depending on your application), and probably also normal audio drivers and while you'd probably have to do some preamplification and mic biasing on your own hardware, you'd also solve any desync issues by having it all done with one digitizer.

author: Avacee
author_rank: Unknown
timestamp: May 04, 2017, 09:33:47 am
content: I remembered this thread when reading this article and thought a few of those with an interest would enjoy it.http://www.bbc.co.uk/news/science-environment-39621766Basically some smart people used the audio from security camera footage to determine who fired first by not only sound triangulation but also the sound characteristics of the gun and determining which direction the gun was pointing when fired by the sound and echo from various buildings.Spoiler: ................... The person who claimed he was defending himself was proven to have fired first.Edit: Just noticed the OP was wanting to deal with the inputs from 12 microphones which is the number used by the smart people in the picture

author: danadak
author_rank: Super Contributor
timestamp: May 04, 2017, 12:33:43 pm
content: One approach use PSOC, PSOC 4M or 5LP series. They have versionswith 1 or 2 (respectively) Sequencing 12 bit SARs on-board that can achieve~ 1.2 uS /channel, 4 channels for the 4M series, 8 channels for the 5LPseries. Also have DMA, and ARM Core and onboard reference. In case of5LP digital filter block as well. Note if you relaxed conversion time evenmore channels can be done with SAR.For example 12 channels would be 12 x 1.2 uS = 14.4 uS total. Actuallynow that I think about it its 1/2 for the dual SAR part each SAR handling6 channels, 7.2 uS total.Here is an example using DMA to xfer samples from A/D to DFB.Just a thought.Regards, Dana.