Electronics > Beginners

help with rapid ADC data aquizition

<< < (5/8) > >>

rstofer:
On the back side of the Teensy 4, there appears to be a pad layout for an SD socket:
https://www.pjrc.com/store/teensy40.html

The Teensy 4 might be out of the power budget:  It requires 100 mA when running full speed.

Using the Arduino IDE would be my absolute next-to-last choice.  The only IDE that is worse is chisel and stone tablet.  OTOH, once TeensyDuino is installed, the Arduino IDE will sort out which toolchain to use and that's a handy feature.  It uses a particularly regrettable color scheme and, via Google, there are alternatives that don't display the error messages in invisible red-orange against black.  It also doesn't support the notion of multiple files in a hierarchy or tree structure.  That chisel looks better and better.

There is an add-in tool for Microsoft Visual Studio called Visual Micro that provides an identical Arduino capability with a more  professional IDE.  I don't know if it works with the TeensyDuino toolchain.  There is a difference between Microsoft Visual Studio and Microsoft Visual Studio Code - discussed after Eclipse.

I hesitate to recommend Eclipse simply because start-up configuration can be a challenge.  It's a nice IDE but it might be an advanced topic.

I have been using Visual Studio Code for a Lattice FPGA project and it's pretty nice.  There is an Arduino add-in but, again, I don't know if it works with TeensyDuino but it does allow for other ARM32 chips so I don't see why it wouldn't.  It requires the complete Arduino IDE and TeensyDuino is an add-on to that environment so it probably shows up in Visual Studio Code.  Do a test:  Add TeensyDuino to your Arduino installation, install Visual Studio Code (Community Edition) and then install the Arduino extension.  See how it all works out.  VS Code is a very advanced editor - way beyond my need, but it's pretty nice.

The only problem I have with VS Code is that it doesn't know how to print - anything.  One of the gurus pointed out that he had never needed to print his code for mark-up or review.  Well, goody for him!  I'm a mere mortal, I need printed copies.  Not a big deal, I can use Notepad++ to open the files and print them.  Actually, Notepad++ is a pretty nice editor and, while I haven't chased it down a rabbit hole, it appears it can be used with Arduino.  Google has some info.

Lots of choices and the Arduino IDE isn't in my selection set.

rstofer:
Maybe something like this?

https://store.digilentinc.com/openlogger-high-resolution-portable-data-logger/

powerfly:

--- Quote from: jhpadjustable on December 07, 2019, 03:40:44 pm ---
--- Quote from: powerfly on December 07, 2019, 01:41:35 pm ---An alternative that I think you mentioned at the end of your comment is to store maybe like 0.5Mb of data on the native RAM and whilst the other code is still reading data in, to dump that 0.5 Mb to a memory card, is that what you were saying?
--- End quote ---
More or less, reserving some space to buffer some of the filesystem metadata. Take care that you don't surpass your filesystem's limitations. You might find it easier on the whole to work in terms round wall-clock time, maybe do 2-second chunks instead, which is more than enough time to create or append a file on the flash.

--- End quote ---

how can you actually acheive this (code wise), how can I get the 10kHz aquistition rate not to slow down when dumping 512KB of data to an SD card?

radiolistener:
powerfly, you can allocate two buffers. While first buffer is capturing, you can write second buffer to the sdcard. Then swap them and repeat.

tooki:

--- Quote from: jhpadjustable on December 07, 2019, 03:40:44 pm ---Your Arduino mate was doing it wrong. He would have had better luck if he batched up a whole sector of data before writing it out, and I bet he was also formatting the output as text instead of binary.  (But the Arduino fans don't usually think at this level...)

--- End quote ---
Arduino’s raison d’être is to make it easy for beginners to, well, begin. It’s quite uncalled for to disparage beginners for not being experts in electronics and/or programming.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod