Will the teensy 3.0 work for this project

Status
Not open for further replies.

BlackBelt2025

New member
I am working on a research project at my university. Basically, we need something that can read 4 analog inputs, do some relatively simple calculations, update some state, output 1 (preferably analog, but digital is acceptable) signal, and repeat. Ideally, we would like this entire process to run at 100kHz or more, but it absolutely must be faster than 80kHz.

Is this possible on a teensy 3.0? Our input and output ranges would be -2.5V to +2.5V, and we need at least 12-bit resolution.

Sorry if this question is basic, but I am predominantly a software guy, so much of the electrical jargon is unfamiliar to me.
 
Sadly, Teensy3's A/D is just not fast enough for this application. In 8 bit mode it might be able to maintain 400 ksamples/sec, but in 12 bit mode it's slower. The input range is either 0 to 1.2V or 0 to 3.3V, so you'd also need an amplifier to scale your -2.5 to +2.5V signal to that input range.

Of course, if you use an external A/D chip, this project might be possible. You'd need to maintain a data rate of 600 kbytes/sec, which is probably achievable with the SPI port. You might need to use native code instead of the Arduino SPI library or Arduino emulated registers, because those don't support the SPI port's 4-word FIFO. The FIFO really helps for maintaining throughput.
 
In my experience, I was able to do 100kHz sample rate for one signal, while writing to a microSD card (sdfat library - fast write). I think I could do 4 signals at 40Hz, or something like that.
I got the impression that writing to the sdcard was limiting the sample rate due to the rapid interrupts colliding with each other.
If you didn't need to write to the sdcard it could probably go much faster. I could try that when I get a chance. But I'm not sure how much processing it takes to output a voltage instead.

I think I remember that changing the bit resolution almost made no difference at all.

And I'm not using DMA, which I imagine it would be much faster with it.

Anyways that's my experience, but of course Paul knows a lot more than I do.
 
Status
Not open for further replies.
Back
Top