ADC and data storage via remote MCU

Discussion in 'Embedded Systems and Microcontrollers' started by Engineering_Junkie, Jun 18, 2017.

  1. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    Good day everyone,

    I'm having a few problems in the design I'm trying to accomplish. Essentially I've been looking for a low-cost MCU that can remotely be triggered to sample two signals. This should be an accurate sample at around 1MSPS per signal for around 10 milliseconds.

    The main problems I've had is finding an MCU that can actually store this data and at this speed. I've looked for low-cost evaluation boards but found nothing. I've been considering building my own board using the STM32F765IG by ST. It features an ADC that could read fast enough and I think the data storage could be possible by using the DMA and either storing directly into RAM or flash( new to this so not sure).

    Does this seem like a viable option or should I look for another board to do this?

    To remotely trigger it I'm thinking of interlinking it on a PCB to a module with wifi, this module will trigger the STM32F765IG to close a switch and start sampling and when it has finished sampling to open the switch and send the samples over wifi to a remote repository.

    Thanks in advance for any help, struggling to find a viable way to do this.
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    4,667
    745
    Let me get this right:
    1 million samples per second
    for 10 milliseconds

    That would be 10000 samples.
    Am I getting it right?
     
    Engineering_Junkie likes this.
  3. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    Yes, well per signal. I'll be sampling two signals, so in total 20000 samples
     
    Last edited: Jun 18, 2017
  4. shteii01

    AAC Fanatic!

    Feb 19, 2010
    4,667
    745
    Ok.
    Assuming, at this point, 8 bit ADC. We are talking 8 bits (1 byte) per sample. So. 20,000 bytes, 20 kB of data memory, not program memory. It looks like STM32F765IG is more than you need. The 2.1 MSPS ADC and fast memory storage does look very attractive.

    Also. Does it need to be low voltage?
     
    Engineering_Junkie likes this.
  5. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    Yes, the voltage will be around 3.3 to 5 V.
     
    Last edited: Jun 18, 2017
  6. MrChips

    Moderator

    Oct 2, 2009
    19,051
    6,121
    STM32F765 is overkill.
    I would suggest getting a STM32F407 DISCOVERY to get you started into the STM ARM programming.

    Yes, you can use DMA to transfer data from the ADC to SRAM.
    The next question is what are you going to do with the data? If you want to be able to transport the data to memory card then you want to think about plugging in a microSD card or USB memory stick. The STM32F746G DISCOVERY comes with a microSD socket (and also an LCD screen).

    Or do you want battery backup SRAM and simply a way to transfer the data to another device?

    Be forewarned that jumping into the ARM world requires a lot of programming experience and effort.

    Edit: Sorry, I reread your post and you say you want to use wifi. Is this mandatory or are there other options? WiFi is still doable.
     
    Engineering_Junkie likes this.
  7. nsaspook

    Expert

    Aug 27, 2009
    6,090
    6,866
    Engineering_Junkie likes this.
  8. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    Completely agree that it's overkill, the STM32F407 DISCOVERY seems like a much better fit. I'd like to temporarily store the data on the device till the sampling period is done and then have it transferred via wifi to a repository. For wifi couldn't I just have an add-on module?
     
  9. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
  10. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    Can I please ask another question? Just want to do a sanity check as I think I've got a solution.
     
  11. MrChips

    Moderator

    Oct 2, 2009
    19,051
    6,121
    What's the question?
     
    Engineering_Junkie likes this.
  12. Engineering_Junkie

    Thread Starter Member

    Sep 9, 2015
    41
    0
    More of a design check. I've changed to buying a Nucleo-F411RE development board and using an external AD7352BRUZ ADC. The adc can simultaneous sample two channels at 12 bit with a rate of 3MSPS max per channel.

    The Nucleo-F411RE has 5 SPI ports and uses a STM32F411RE mcu(100 MHz, 512 Kbytes of flash,128 Kbytes of SRAM), I plan on connecting the ADC to an SPI, driving it at 2MPSP(1MSPS for each channel) and using the DMA of the Nucleo-F411RE to push the data into either RAM or flash. Afterwards I'll send the data via SPI to an particle photon to be sent via wifi to a remote repository.

    Does this seem more viable? Thanks for all the help

    Links:
    Nucleo-F411RE: http://www.st.com/en/evaluation-tools/nucleo-f411re.html
    AD7352BRUZ: http://www.analog.com/en/products/a...multaneous-sampling-ad-converters/ad7352.html
    STM32F411RE: http://www.st.com/en/microcontrollers/stm32f411re.html
    Particle photon: https://docs.particle.io/datasheets/photon-datasheet/
     
  13. MrChips

    Moderator

    Oct 2, 2009
    19,051
    6,121
    I don't have any experience working with Nucleo boards. I have worked with STM32F407-DISCOVERY.
    STM32F407 and STM32F411 have built-in 12-bit ADCs. There is no need for an external ADC.
    The Nucleo board should work.
     
Loading...