Teensy 3.6 - High Speed Data Read/Writing

Status
Not open for further replies.

ConnorM

New member
I am trying to measure accelerations and forces from a bicycle/car crash. I will be attaching accelerometers and force sensors to a crash test dummy and then I will need to log the data and save it to an SD card for manipulation later. I was wondering if the Teensy 3.6 would be a good choice, I have never done any micro controller projects so this is all very new to me.

I need to sample 3 accelerometers at 10kS/s, and about 7 force sensors at 10kS/s (10 Sensors @ 10 kS/s = 100 kS/s). I need these high sampling rates as the peak forces and g's will be occurring over the very short duration of impact. Also, I would prefer 12 bit resolution.

I have done some research on micro controllers and sensing, and with my very very (very) basic understanding here is my understanding of what I need,

10 Sensors --> 10 ADC's @ 12bit resolution preferably (I know that the Teensy 3.6 has 2 ADC's on board but will I need to purchase 8 more in order to sample the other 8 sensors? Sorry if this is a dumb question, I'm very new to all of this) --> Teensy I/O pins --> Teensy reads/writes to SD based on scripts that I load to it?

Could somebody help me with fleshing this out? Any help would be very appreciated.
 
The 3.6 has two ADCs but both can be configured to read more than one channel. The 3.6 should be adequate for your project.

I used it to record data from a MPU9250 with 32,000SPS on three gyro channels, 4,000SPS on three acceleration channels, plus a couple of ADC channels at 4,000SPS. (Using one ADC.) The code isn't likely to be of much use to anyone but the committed FORTH programmer though. Total of about 256KBps data.

http://home.earthlink.net/~schultdw/logger/TeensyLog.html

Since you are planning to sample at 10KSPS I assume that you have good pre-sample filters with corners at 1KHz. If not, why not?
 
Haha I know, I've been trying to research stuff but there is just so much. Anywhere you could suggest to start?
 
if 10bit resolution is acceptable to you,MCP3008 on the spi bus runs a max clock of 3.6mhz, with 8channel ADCs

if your really want 12bit resolution, theres also the MCP3208 8channel ADC SPI chip.. clocked at 2mhz
 
The Teensy 3.6 has 2 independent ADC's. They can be widely configured depending on user needs. If you have 10 sensors then you can put 5 on ADC0 and 5 on ADC1. The sampling and conversion speed can be adjusted to reduce noise and increase sample/conversion time.

At 96Mhz with default speed/conversion and running with averaging set to (1) you can get roughly 200KSPs per ADC (and there is 2){figures based on T3.2 tests, 3.6 is faster}.
I don't see a need for an external ADC, main reason is that whether its a dedicated IC or the Teensy ADC there will be noise, but running the native Teensy ADC should be faster. Faster means you can take more samples which will make any noise more apparent and easier to filter out. You should consider using an external analog reference, biggest reason is you will have access to it for calibration and you will have better control over noise and accuracy of that reference.

There is several ways to use the ADC's on the Teensy. One of them is Pedvide's library, it has several examples. And another interesting thread started recently with a few advanced examples.
If you use the ADC averaging, remember it will take all samples first then average and then move on to next channel so it will increase the time between ADC channel samples. So you may not be able to use hardware averaging, instead having to rely on sampling more often.
You will likely need external filters between the sensors and the Teensy, the level of complexity of those will be dependent on the sensors, the expected noise and the Teensy ADC itself.
You will need to store a good amount of samples as a buffer when sending to the SD Card, pick a quality card, Useful link to a new SDfat library.

Don't be afraid to search the forums, there is a lot of information hidden in hundreds of threads.
 
Status
Not open for further replies.
Back
Top