Go Down

Topic: help on what to use for rapid ADC data aquisition (Read 11941 times) previous topic - next topic

voltagesurge

Dec 06, 2019, 07:11 pm Last Edit: Dec 07, 2019, 08:32 pm by voltagesurge
If I am trying to obtain 10kHz of 12-bit voltage (ADC) data in multiple channels (8 would be good, 24 would be even better) and store the data in at least 20s chunks what microcontroller setup (or rasberry Pi) do you reccomend?

8 channels of 12 bit data is 8*1.5 bytes = 12 bytes.
10 000 of these a second results in 120kB/s of data storage.
Ideally, at least 20s (2.4Mb) of data could be stored at this rate before a short interval and then repeat.

1. would one be able to write straight to a storage device (e.g micro SD card) with any micro controller at the desired rate? - Someone I know tried doing this with an Arduino uno and the data logging was far too slow. would a teensy 3.6 work as it has a native micro sd card slot?

2. I've thought about storing the data on the RAM however microcontrollers tend to only have RAM up to 1Mb, which isn't enough. If there is a rapid way to store it to flash memory of devices with 2Mb or more flash onboard, before dumping that to an SD card, that seems like a solution. I don't know how to do this and haven't found a solution.

3. Is something like a rasberry pi a better option? I'd rather not use one as I'm a coding noob and the arduino IDE seems the most straight forward to use and I want the measuring device to be small but if it's the best way forward I can use one.

and of course, I am open to suggestions that I'm not aware of, any help would be much appreaciated, bear in mind that I'm a coding noob.

MarkT

kb = kilobit, kB = kilobyte.  Factor of 8 different, be careful!

I think the Due has the bandwidth to do this, but its internal ADC isn't great (its really bad in fact).  But it doesn't have enough RAM.

There's probably a suitable data acquisition hat for the RPi that can do this, some of the more exotic Arduino boards or Arduino-compatible boards can likely do this too.

Be aware that audio ADCs do not handle DC and are not calibrated and only run at various fixed high sampling rates.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

gilshultz

As stated on the web Data acquisition (DAQ) is the process of measuring an electrical or physical phenomenon such as voltage, current, temperature, pressure, or sound with a computer. A DAQ system consists of sensors, DAQ measurement hardware, and a computer with programmable software. The first thing you need to do is to clearly define the problem, and what results you want. Once this is done and you have done some research so you are comfortable with your hypothesis it is time to solve it. Then you can look at how to measure the physical components such as time, temperature, etc.  At this point you can determine what type of processing power you need and what computer will do that for you.  This is not a 1 pass solution, you need to go through it many times until there is no changes. Currently it appears you have a solution looking for an answer, that never really works out in the end.  There is a tremendous variety of data on the web about this and how to properly accomplish what you want to do. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

voltagesurge

As stated on the web Data acquisition (DAQ) is the process of measuring an electrical or physical phenomenon such as voltage, current, temperature, pressure, or sound with a computer. A DAQ system consists of sensors, DAQ measurement hardware, and a computer with programmable software. The first thing you need to do is to clearly define the problem, and what results you want. Once this is done and you have done some research so you are comfortable with your hypothesis it is time to solve it. Then you can look at how to measure the physical components such as time, temperature, etc.  At this point you can determine what type of processing power you need and what computer will do that for you.  This is not a 1 pass solution, you need to go through it many times until there is no changes. Currently it appears you have a solution looking for an answer, that never really works out in the end.  There is a tremendous variety of data on the web about this and how to properly accomplish what you want to do. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

I have clearly stated the criterion for my problem (in addition to those criterion, I will need to amplify the signal, as it is small, but I've asked about that in a seperate thread). I have spent hours and hours online looking for solutions and I am still not sure how to solve the problem. I don't think processing power is my problem, it's storing the data at the rapid rate for a prolonged period of time. I know someone who tried doing what I'm doing on an uno and it didn't work at a fast enough rate. Now that could be because it could  be coded in a better way, I'm not sure.

If someone knows the conditions that would make number 1. or 2. work that would be great, I'm new to all this so it may be straight forward and I'm just missing something, but I don't know that

wvmarle

If I am trying to obtain 10kHz of 12-bit voltage (ADC) data in multiple channels (8 would be good, 24 would be even better) and store the data in at least 20s chunks what microcontroller setup (or rasberry Pi) do you reccomend?
12 bit = 2 bytes, assuming you're not going to do fancy things packing your bytes (two data points in three bytes). Just storing it as 2 bytes is a lot easier.
10k sps = 20 kB/s - that is a rate that should be no problem for an SD card to sustain.

Does it have to be on a single device? Or is different devices acceptable? That'd make things a lot easier: one channel on one device and one SD card. You could use a sigal that's connected to an input on all of them to start them at the same time if synchronisation is important.

Note that an Uno is doing only 10 bit ADC.

You may look into the EPS32 as well. The modules come with a lot of on-board Flash for storage, and it has 12-bit ADC with 18 channels. I don't know how good it is, or the sampling rate.

Note that when picking your ADC you have to specify the signal you get to sample as well. Primarily the expected voltage levels and the nature of the source: ratiometric or voltage output.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

ieee488

If I am trying to obtain 10kHz of 12-bit voltage (ADC) data in multiple channels (8 would be good, 24 would be even better) and store the data in at least 20s chunks what microcontroller setup (or rasberry Pi) do you reccomend?
What do you mean in 20s chucks?


gilshultz

You state: "I have clearly stated the criterion for my problem " Really! Start with your small signal, is it pico, nano, mili, micro, volts? How much do you have to amplify it? What are the constants on the signal. What accuracy does the A/D have to have, can your analog design support that, resolution, there are many more questions that need to be answered. Have you considered FRAM (Ferroelectric Random Access Memory)  It's similar to Static random-access memory, only with a ferroelectric layer instead of a dielectric layer. This gives it stable handling (the bytes you write are non-volatile) with dynamic responsiveness (you can write them very fast!). Some of the advantages I see in FRAM are high speed reading and writing, non-volatile storage (it remembers its contents without needing power or battery backup), virtually unlimited read / write cycles - you can't wear it out unlike some other types of non-volatile memory. To get started  try this link: https://www.adafruit.com/product/1897  There board has a write enable input so you can lock it down and read it on another machine without worry about trashing the date.
You state: 8 channels of 12 bit data is 8*1.5 bytes = 12 bytes, that is a lot of overhead as stated previously just to pack it or put into 8 bit memory.  Try this link: https://www.analog.com/media/en/technical-documentation/data-sheets/ADUC812.pdf It has just about everything on it that you want, simply copy the design idea.  Have you considered using a A/D with a parallel output then with a state machine and a counter you can have it sequentially write data int 2-port RAM and then read it whenever.  There is no limit on the amount of RM. I hope you have experience in Analog, 12 bits gets very tough especially on a bread board. If putting it on a PC best get somebody experienced in analog layout. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil


Go Up