high frequency data acquisiton

Status
Not open for further replies.
Hi everyone, first time posting, thank you for reading my thread. I am trying to use the teensy 3.0 to record values from an analog input. The problem is I can't seem to get the teensy to read faster than 1khz. Ideally I need to be able to sample at a minimum of 10khz (enough to graph a 10khz sine wave) and write the values to a text file. I tried using arduino's analog read, and then using a separate program to log the data from the serial port in a text file, but it is still not fast enough. Any help you can give would be greatly appreciated.

-egyptiandude
 
10kHz sampling isn't enough to sample a 10kHz sine wave. It would give you only one sample per complete period of the waveform. The theoretical minimum sampling frequency is twice the maximum signal frequency.

What are you trying to measure? Is it an audio signal?
 
Yes essentially would be something I am looking at.

10kHz sampling isn't enough to sample a 10kHz sine wave. It would give you only one sample per complete period of the waveform. The theoretical minimum sampling frequency is twice the maximum signal frequency.

What are you trying to measure? Is it an audio signal?
 
Start by reducing the ADC averaging (use analogReadAveraging(0) ) and reducing the analog resolution to 10 bits.

While the MK20 chip of the Teensy theoretically offers ADC speeds up to 460kS/s, it's pretty hard using it with anything above a few kHz sampling rates. If you want to reliably and accurately sample audio signals (or other signals in the kHz range) you will need some analog signal conditioning on the analog inputs, e.g. unity gain opamps, in order to maximize input impedance matching (so the S&H capacitor of the ADC gets charged instantly). Also, you will need to implement better filtering on the power supply lines cause there's some high frequency noise on them (probably coming from the MK20 chip).

Also worth mentioning are dedicated, high-frequency, high-accuracy ADC's which you can connect to your Teensy over SPI. Costs a few bucks more, but can solve a lot of problems like speed and noise.
 
Need to look up something called Nyquist here, - that's why the minimum of 2x the frequesncy needed
 
Not only that, but as Epyon mentioned, good quality sampling requires care in all parts that can affect the signal.

Just because you only want to sample 10 kHz signals doesn't mean that 20 kHz sampling will be OK -- you have to ensure that there are no signals present that are greater than 10 kHz -- even if you don't want to sample them.
 
Status
Not open for further replies.
Back
Top