rapid data acquisition over short period

Howdy,

I would like to synchronize sampling from an analog signal (from a photodiode) with an LED pulse. The problem is the timing which is rather fast (1 microsecond). I would like to produce a 1 microsecond flash with the LED (via digitalWrite) and then use the analog pin to collect a single data point from the photodiode. I would then wait 2 microseconds and then repeat, for a total of 100 samples. The fastest I can get is 40 microseconds between samples. I realize this is a big ask and that the arduino is not built for such fast data acquisition speeds. However, because I am only interested in 100 samples, Im hoping there might be a way to do this. Im hoping someone has a suggestion (direct pin access?) or something else that they might recommend. Thanks in advance for any tips/suggestions.

Regards,

Kenneth D. Hoadley
Ph. D candidate, Marine Science
University of Delaware

(direct pin access?)

Do that to get the fastest possible (2 clk pulses)

You need arduino DUE for your project, it has fast ADC. Regular UNO needs >6 usec to complete 1 conversion.
Better if you don’t access to digital pin at all, even using direct access, drive your led’s pin via OC (output compare) feature of arduino timers.

Howdy,

Thanks for the input. Magician, sounds like the DUE is the way to go. However, Im not sure I understand the OC feature. Should I use this for the photodiode input as well, or can i use direct access or simply analogRead for that. Thanks in advance.

Start reading from this topic
I would connect led to pin 2, it's already outputs timer clock. Timer also trigger ADC conversion, simultaneously. You may vary frequency of the process, and when you firmly grasp the idea, you could activate more ADC channels to get burst of the samples from led''s flash, or introduce a phase shift to capture transition . Don't forget a resistor in series with led, DUE is fast, but more fragile

Hello Magician,

Sorry for the delay. Sounds like this is the way to go. I did the easy part and ordered up a Arduino DUE which just arrived. Im now trying to make more sense of the code from the link you suggested, however Im afraid it may be a bit over my head. Any additional cheat cheats you might recommend I read to help me along my way? Thanks again for your help.

The "holy book" that everyone, who is playing with DUE must have, is SAM3X datasheet. Get it from atmel.com
Plus google .