1

For my work, I need to acquire data at a high sample rate (>100kSa/sec) using Arduino Portenta H7, which has 3 X 16-bit ADCs. Portenta H7 has STM32H747XI microcontroller. I don't want to use Serial.print command as I came to know that this command takes much time to execute, which makes achieving the targeted sample rate impossible. What are the other possible ways to store the data from Arduino while maintaining this high sample rate? For example, saving the data and then printing them all at once at the end of testing( 3-5 second testing period). e.g. using an SD card or through saving in Arduino internal memory? Can you suggest techniques employed for high-sample rate data acquisition from Arduino?

RowanP
8696 silver badges21 bronze badges
asked Feb 2, 2021 at 13:46
6
  • How big is a "sample"? How many samples before "end of testing"? Commented Feb 2, 2021 at 13:50
  • Thank you. I want to acquire 2 analog signals - 16 bit each- at a rate of 100kSa/sec. Probably 3-5 seconds testing period. Commented Feb 2, 2021 at 13:53
  • So about 2 megabytes. What kind of Arduino? "Arduino" is a brand name, not a product. Why does it have to be an Arduino? Commented Feb 2, 2021 at 14:07
  • @ElliotAlderson that lowercase "portenta" seems to be Arduino Portenta H7 which uses STM32H747XI, with 1 MiB of RAM, of which most should be accesible via DMA. That's an amazingly powerful MCU with lots of memory, the Portenta seems like a neat little devkit. Basit please edit relevant details into your question. Commented Feb 2, 2021 at 14:53
  • @JanDorniak Thanks, my brain completely skipped over that. Commented Feb 2, 2021 at 15:12

1 Answer 1

1

The Portenta has a beast of an STM32H7 Cortex M7 and a minimum of 8M bytes of external SDRAM in addition to the 1M on-chip.

You need to capture 2channels x 2 bytes x 100K/s x 5s = 2M bytes of data, so storing it on the on-board RAM and spitting it out later seems like a viable and low-risk approach.

A slow serial link might take a few minutes to transmit 2M bytes of data, but you have various other options if that is objectionable.

answered Feb 2, 2021 at 14:55
2
  • Thank you Spehro. My apologies if it's too basic a question, as I have no previous experience with these microcontrollers due to my mechanical background. Could you please suggest some reference or sample code I can take guidance from, for storing the data and later retrieving it from Portenta's RAM? I really appreciate your help.I am currently using Arduino IDE for my sketch. Commented Feb 2, 2021 at 15:36
  • I don't know what Arduino ecosystem code is available. There are H7 ADC examples available in the STM32Cube IDE. The ADC will be what you want examples for. Commented Feb 2, 2021 at 15:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.