Jump to content

high speed ADC aquisition


Recommended Posts

 I am trying to obtain ADC voltage readings at a rate of 10kHz with a resolution of 12 bits or more. This is to be done with a portable, small device, such as a microcontroller with a small power bank attached to it. I would like to be able to use this with 7 data channels, and if possible even up to 24 channels. I have been looking at microcontrollers to do the job, but I'm stuggling to find a suitable one (or maybe I just need guidance on how to use them properly).

7 channels of 12 bit data is 7*1.5 bytes = 10.5 bytes.
10kHz --> 105kb/s of data storage.
Ideally, at least 20s of data could be stored at this rate before a short interval and then repeat.

The open logger looks like it might do the job: https://store.digilentinc.com/openlogger-high-resolution-portable-data-logger/

it claims up to 500kHz sampling rate, and as it can have an SD card, I guess it would be able to do this for a long time. Is the open logger the right tool for the job?

I've been looking at using micro-contollers such as arudinos and Teensys. I am a beginner at coding, so bear that in mind when answering the question.

Would the open logger be able to do 8 channel, 10kHz data aquisition for at least 20s before stopping and starting again? - this is the most important question

Also, would it be able to do this completely portably and not attached to a computer (or anything else apart from a power source)?

Another thing is that this signal will probably need to have some gain and filters applied to it but I think I might make a different thread about that. I guess amplifying the signal I'm measuring before going to a data logger shouldn't be a problem right?

Link to comment
Share on other sites

Hi @voltagesurge,

The OpenLogger should be able to accomplish what you are looking for including the portability portion, though there is a caveat which I will get to later. The way the embedded ADCs on the OpenLogger are set up, each channel is sampled individually, so if you were using 7 channels, the maximum sample rate for each channel would be ~71.42 kHz (500 kHz / 7 channels).

It is also entirely possible to use a different microcontroller that has analog inputs, but the same restriction will apply in that each channel is sampled individually so you would divide the maximum sample rate (usually quoted on the list of features for the microcontroller) by the number of channels. The Arduino IDE (which supports a wide variety of microcontrollers including Digilent made ones, different Arduinos, and the Teensy) has built-in examples for reading in analog data, so that side of coding will not be difficult. Logging that data to an SD card will be where the work is.

With regards amplifying the signal, you can amplify it before it goes to the data logger, but you must still be within the accepted voltage range of the analog inputs. The OpenLogger for example has an input voltage range of -10 V to +10 V. Most microcontrollers typically have a much smaller voltage input range such as 0 V to +3.3 V. What sort of resolution were you anticipating on needing to read for your signal (i.e. millivolts, microvolts)? Additionally, what voltage range are you planning to measure?

Here is the previously mentioned caveat. Because the OpenLogger is a logger (and not an oscilloscope, which makes high speed acquisitions based on an external trigger), it will log data continuously at a certain sample rate and continue till it runs out of space. With the size of SD cards as they are nowadays (up to 32 GB for the FAT32 format, which is the format the OpenLogger needs), you would be able to record these 20 seconds worth of data (and the idle time inbetween) for quite some time, potentially long enough for your needs depending on what your application is.

The other caveat with regards to your system is the number of channels. 7 channels can be readily supported by a number of devices, OpenLogger and otherwise, but 24 analog channels not so much. You would need to look into either dedicated Analog-to-Digital converters or have a microcontroller that supports multiple ADC peripherals (such as Digilent's Analog-to-Digital converter Pmods).

Let me know if you have any questions about this (and a little bit more about the requirements for your system).

Thanks,
JColvin

Link to comment
Share on other sites

57 minutes ago, JColvin said:

Hi @voltagesurge,

The OpenLogger should be able to accomplish what you are looking for including the portability portion, though there is a caveat which I will get to later. The way the embedded ADCs on the OpenLogger are set up, each channel is sampled individually, so if you were using 7 channels, the maximum sample rate for each channel would be ~71.42 kHz (500 kHz / 7 channels).

It is also entirely possible to use a different microcontroller that has analog inputs, but the same restriction will apply in that each channel is sampled individually so you would divide the maximum sample rate (usually quoted on the list of features for the microcontroller) by the number of channels. The Arduino IDE (which supports a wide variety of microcontrollers including Digilent made ones, different Arduinos, and the Teensy) has built-in examples for reading in analog data, so that side of coding will not be difficult. Logging that data to an SD card will be where the work is.

With regards amplifying the signal, you can amplify it before it goes to the data logger, but you must still be within the accepted voltage range of the analog inputs. The OpenLogger for example has an input voltage range of -10 V to +10 V. Most microcontrollers typically have a much smaller voltage input range such as 0 V to +3.3 V. What sort of resolution were you anticipating on needing to read for your signal (i.e. millivolts, microvolts)? Additionally, what voltage range are you planning to measure?

Here is the previously mentioned caveat. Because the OpenLogger is a logger (and not an oscilloscope, which makes high speed acquisitions based on an external trigger), it will log data continuously at a certain sample rate and continue till it runs out of space. With the size of SD cards as they are nowadays (up to 32 GB for the FAT32 format, which is the format the OpenLogger needs), you would be able to record these 20 seconds worth of data (and the idle time inbetween) for quite some time, potentially long enough for your needs depending on what your application is.

The other caveat with regards to your system is the number of channels. 7 channels can be readily supported by a number of devices, OpenLogger and otherwise, but 24 analog channels not so much. You would need to look into either dedicated Analog-to-Digital converters or have a microcontroller that supports multiple ADC peripherals (such as Digilent's Analog-to-Digital converter Pmods).

Let me know if you have any questions about this (and a little bit more about the requirements for your system).

Thanks,
JColvin

Thanks for the reply. I'll probably stick to under 10 channels. If I went for an 8 channel openlogger solution, would the progamming be straightforward and how would I progamme it (arduino IDE?)?

As it can do well over 10kHz the aquizition rate would be fine for my needs. The question for the openlogger (and other micro-controllers) is how to read data straight to the card at higher than 10kHz, do you know how this would be done?

 

Also, would the open logger be easy to turn on and off? I don't want an hour of continuous data, I'd like ~20s intervals

 

https://www.amazon.co.uk/SanDisk-microSDHC-Memory-Adapter-Performance/dp/B073JWXGNT/ref=sr_1_3?crid=54OF8GNAKX2F&keywords=micro+sd+card&qid=1575882136&s=computers&sprefix=micro+sd+%2Ccomputers%2C136&sr=1-3 would this or this

https://www.amazon.co.uk/SanDisk-microSDHC-Memory-Adapter-Performance/dp/B073JYVKNX/ref=sr_1_9?crid=54OF8GNAKX2F&keywords=micro%2Bsd%2Bcard&qid=1575920451&s=computers&sprefix=micro%2Bsd%2B%2Ccomputers%2C136&sr=1-9&th=1 (the latter is 64GB) card do the job?

Link to comment
Share on other sites

Hi @voltagesurge,

For the OpenLogger, getting it to log to the SD card is as straightforward as setting the "Log to" dropdown setting on WaveFormsLive.com to have it log to SD card. The SD card will need to be 32 GB since that is the largest that the FAT32 format is compatible with, so a 64 GB card will not work as it will be in a different format. When you add channels to be logged on the OpenLogger (as explained in this tutorial, https://reference.digilentinc.com/learn/instrumentation/tutorials/openlogger/datalogger) the sample rate automatically adjusts. With 8 channels, the sample rate will be 62.50 kS/s, and can be decreased to a lower sample rate if that is more appropriate for your system.

As for logging to an SD card via a different microcontroller, the process will depend; there is an SD library built into the Arduino IDE, but unlike the OpenLogger, it will not be logging analog data to the SD card in the same way with regards to logging data as the SD card as analog data is collected.

With regards to turning the OpenLogger on and off, that will not be so easy to do. There is not a built in way to trigger the OpenLogger to reset itself (or send a signal out on a GPIO pin to the reset pin after 20 seconds), so you would need an external system (such as another microcontroller) to send this signal. But this would overall make the system less portable.

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

19 hours ago, JColvin said:

Hi @voltagesurge,

For the OpenLogger, getting it to log to the SD card is as straightforward as setting the "Log to" dropdown setting on WaveFormsLive.com to have it log to SD card. The SD card will need to be 32 GB since that is the largest that the FAT32 format is compatible with, so a 64 GB card will not work as it will be in a different format. When you add channels to be logged on the OpenLogger (as explained in this tutorial, https://reference.digilentinc.com/learn/instrumentation/tutorials/openlogger/datalogger) the sample rate automatically adjusts. With 8 channels, the sample rate will be 62.50 kS/s, and can be decreased to a lower sample rate if that is more appropriate for your system.

As for logging to an SD card via a different microcontroller, the process will depend; there is an SD library built into the Arduino IDE, but unlike the OpenLogger, it will not be logging analog data to the SD card in the same way with regards to logging data as the SD card as analog data is collected.

With regards to turning the OpenLogger on and off, that will not be so easy to do. There is not a built in way to trigger the OpenLogger to reset itself (or send a signal out on a GPIO pin to the reset pin after 20 seconds), so you would need an external system (such as another microcontroller) to send this signal. But this would overall make the system less portable.

Let me know if you have any questions about this.

Thanks,
JColvin

I want to be able to use this data logger in a portable way without it being attached to a computer, without having to learn and write loads of code, and to sample the data at 10kHz on all 8 channels (and the data rate will ideally stay at this value until the machine is turned off, I don't know if there would be buffering for this sort of thing where the sample rate temporarily drops?). I want it to be able to write this straight to an SD card. it needs to be able to be tough (at least with the case protecting it or something) as it will be attached to an object that is going to be jumped on and the object will be exposed to vibration and reasonably high forces (it might be that the case needs extra padding or something).

The main questions (in order of importance) I have are:

1. can the data logger write 500 ksps (and 62.5ksps per channel in the case of using all 8 channels) straight to a memory card, when not connetected to a computer (having some portable power supply like a power bank)? - can it do this easily being programmed using the waveforms software?

2. Is the waveforms software free with the openlogger (I intend to buy it from a supplier overseas as I don't live in the US)? can one just download it for free off the website? - does one just setup the software with the computer. unplug it and then when it is going to be used just switch it on and let it run and then turn the power off when one is finished?

3. can the software be used in a harsh environment/take a hit? I will be using this in an environment where

4. how does the file storage system work? - what formats are possible etc? - I read that there were issues in the past, does the file storage now work smoothly?

Link to comment
Share on other sites

Hi @voltagesurge,

1. can the data logger write 500 ksps (and 62.5ksps per channel in the case of using all 8 channels) straight to a memory card, when not connetected to a computer (having some portable power supply like a power bank)? - can it do this easily being programmed using the waveforms software? -- Yes. You will not use the WaveForms software though, you would instead use WaveFormsLive.com on a web browser to set up the OpenLogger and then under the Advanced options within WaveFormsLive.com choose to Log on boot (tutorial here), which will make the OpenLogger start logging with the saved parameters. The OpenLogger, as a logger, will maintain the constant sampling rate and will not deviate from that until the SD card is entirely filled.

2. Is the waveforms software free with the openlogger (I intend to buy it from a supplier overseas as I don't live in the US)? can one just download it for free off the website? - does one just setup the software with the computer. unplug it and then when it is going to be used just switch it on and let it run and then turn the power off when one is finished? -- Yes, WaveFormsLive.com is free to use.

3. can the software be used in a harsh environment/take a hit? I will be using this in an environment where -- It doesn't seem like you completed your question, but the OpenLogger itself so long as it is not directly being jumped on will be fine. You would likely want to make sure that any wires going from the OpenLogger to the system in questio are secured and do not come undone during the process. The software/firmware will not be affected by vibrations.

4. how does the file storage system work? - what formats are possible etc? - I read that there were issues in the past, does the file storage now work smoothly? -- The OpenLogger stores data to the SD card in a specialized dlog file which will then need to be converted to CSV through this tutorial here.

Thanks,
JColvin

Link to comment
Share on other sites

On 12/13/2019 at 7:19 PM, JColvin said:

Hi @voltagesurge,

1. can the data logger write 500 ksps (and 62.5ksps per channel in the case of using all 8 channels) straight to a memory card, when not connetected to a computer (having some portable power supply like a power bank)? - can it do this easily being programmed using the waveforms software? -- Yes. You will not use the WaveForms software though, you would instead use WaveFormsLive.com on a web browser to set up the OpenLogger and then under the Advanced options within WaveFormsLive.com choose to Log on boot (tutorial here), which will make the OpenLogger start logging with the saved parameters. The OpenLogger, as a logger, will maintain the constant sampling rate and will not deviate from that until the SD card is entirely filled.

2. Is the waveforms software free with the openlogger (I intend to buy it from a supplier overseas as I don't live in the US)? can one just download it for free off the website? - does one just setup the software with the computer. unplug it and then when it is going to be used just switch it on and let it run and then turn the power off when one is finished? -- Yes, WaveFormsLive.com is free to use.

3. can the software be used in a harsh environment/take a hit? I will be using this in an environment where -- It doesn't seem like you completed your question, but the OpenLogger itself so long as it is not directly being jumped on will be fine. You would likely want to make sure that any wires going from the OpenLogger to the system in questio are secured and do not come undone during the process. The software/firmware will not be affected by vibrations.

4. how does the file storage system work? - what formats are possible etc? - I read that there were issues in the past, does the file storage now work smoothly? -- The OpenLogger stores data to the SD card in a specialized dlog file which will then need to be converted to CSV through this tutorial here.

Thanks,
JColvin

I am trying to use the openlogger using waveforms live, and at the moment, it looks like it's working for the most part. One problem is that whilst 'logging to chart' the maximum sample rate for 1 channel is 500kS/S, when using the SD card option the maximum sampling rate is only 50kS/s - meaning that when using all 8 channels the maximum sample rate is 6.25KS/s. Is there a way to increase the sampling rate when storing to a card as I want my device to be portable

openlogger problem.png

openlogger problem2.png

Link to comment
Share on other sites

11 minutes ago, JColvin said:

Hi @voltagesurge,

My understanding is that it should be 500 kS/s for the SD card; I suspect this is an error on the WaveFormsLive side of things, though I have asked @AndrewHolzer for clarification on this.

Thanks,
JColvin

Thank you for such a fast, I'm hoping it isn't limited to 50kS/s for the card function because as far as I'm aware that's the only way I could use it in a portable fashion (apart from WiFi, but that's even more limited I think, and it probably won't work well for my application anyway)

 

edit: if the limitation is the reading speed of the card (I used the one that came with the accessory bundle, I think it's class 10, so I doubt that is the limitation) let me know which card I should have and I can buy accordingly

Link to comment
Share on other sites

Hi @voltagesurge,

I confirmed that 500 kS/s is the accurate logging rate and that it is a bug in WaveFormsLive, so we will make sure it gets updated.

We don't have nice list of SD cards that we recommend, though we have had success with San Disk cards. In general though I would go with a class 10 card.

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

9 minutes ago, JColvin said:

Hi @voltagesurge,

I confirmed that 500 kS/s is the accurate logging rate and that it is a bug in WaveFormsLive, so we will make sure it gets updated.

We don't have nice list of SD cards that we recommend, though we have had success with San Disk cards. In general though I would go with a class 10 card.

Let me know if you have any questions about this.

Thanks,
JColvin

Good that it's only a glitch in the software, do you know when this will be updated? I don't have that long to record the data so I'm just wondering. I take it waveformslive won't have to be taken down for a while to be updated as the current version with the 50kS/s limit is much much better than nothing.

 

Thank you for you helpful posts and good response times

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...