Pages: [1]   Go Down
Author Topic: ADC Sampling Rate  (Read 4044 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone, I'm a Mech. Eng. student so i don't understand a lot of this computer "stuff." To be blunt I have a variable PhotoDiode sensor with a max output of 17MHz and min of 12.5kHz depending on the setting. The ATMEGA328 specs say it can sample at 20MHz, which I know won't be enough for the max setting (aliasing will occur) but will probably be fine for the other settings. The problem is the Arduino Nano 3.0 (w/ATMEGA328) specs say the analogRead function can only process at 10,000 samples/sec, which I think is 10kHz. So does this mean that the Arduino Nano can't be used at all for A/D conversion of the PhotoDetector or will it just store the input sample data until it can convert the data?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 632
Posts: 34510
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
i don't understand a lot of this computer "stuff."
Sorry but I can tell from your questions.

Quote
The ATMEGA328 specs say it can sample at 20MHz
No it can't that is the clock maximum speed not the sampling rate. And an arduino only runs at 16 MHz.

Quote
PhotoDiode sensor with a max output of 17MHz and min of 12.5kHz depending on the setting
That is probably the rate at which it CAN be used at not what it WILL be used at, the actual frequency you get out depends on how fast the light is flickering.

Quote
analogRead function can only process at 10,000 samples/sec
Yes that is true for all arduinos.

Quote
or will it just store the input sample data until it can convert the data
No, I think you are misunderstanding the nature of electronics, what exactly do you want to do?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response! I'm trying to set up an Arduino Nano 3.0 to read a Photodectector and also have the Arduino Nano export that data to an external storage device. The light passing over the photodetector will not be moving at any speed near the kilo hertz range so detection in the MHz range is not necessary, I just want to know what ADC setting I should write into the code to avoid aliasing but still have accurate data.  
Logged

Denver
Offline Offline
God Member
*****
Karma: 20
Posts: 779
Inactive - PM
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


From http://arduino.cc/en/Reference/AnalogRead
Quote
It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.
Logged

"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom."
~ Clifford Stoll

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 632
Posts: 34510
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As you are talking about aliasing then you are getting some sort of data out of the changing light level. It helps if we know what you are doing so we can spot any snags you have missed. For example is it an optical pickup for a guitar?
Logged

Pages: [1]   Go Up
Jump to: