Hey everyone I'm a 3rd year physics student currently on an internship at a Quantum research facility. My supervisor told me to build a program to detect and count photons using an Arduino Uno or Due and a id100 single photon detection module. The frequency of the photons can range for 10Hz to a 1,000,000Hz.
The photons should be detected when the voltage is spiked. The voltage when the photon is not detected can fluctuate from like 0 to 0.5. And when the photon is detected it might not be a proper square could be more like a parabola and goes upto 2V.
I've never used Arduinos before so I am a bit lost, would appreciate if i can get some advice:
first can the photons be detected and counted?
How big will the error percentage be?
To start with I'm trying to obtain all the values of the voltages the Arduino can output and trying to analyse it, but I have run into a problem which is for a baud rate of 115200 I can only obtain 787 voltage values. Is this the max it can do or is there a way around it?
I know it might be a lot to ask, but this project seems really interesting and would love to actually make it work. Thank you.
This is a misunderstanding, by You, by me or both of us
Please post the code, using code tags, and schematics.
The communication speed through USB (my guess) has nothing to do with the values read by analogRead().
The AD conversion takes some little time so 1.000.000+ samples per second is not possible.
I don't know the DUE... only UNO.
To use a digital input (much faster) the voltage must satisfy the digital logic levels.
void setup(){
Serial.begin(230400); //open the serial port at 9600 bps
unsigned long time;
time = millis();
while(millis() - time < 1UL * 1000UL){
int sensorValue = analogRead(A3); //read the analog input on pin 0
float voltage = sensorValue * (5.00/1023.00);
Serial.print(voltage,DEC);
Serial.println(",");
}
}
void loop(){
//everything already happened//
}
This code is to collect all data points for 1 sec. Do you know how many samples is it possible to get in 1 sec?
You're never going to get near 1MHz using analogRead, more like 10kHz
Try using the analogue comparator interrupt instead (and even then, you're not going to get near 1MHz)
So to point of the experiment is to detect photons for a single photon detection module (id100-SMF20) that sends a pulse when it detects a photon, and the pulse looks like this:
Use the math (5.00/1024.00);.... There are 1024 different levels.
If You drop the float arithmetic's that while loop will be a bit faster.
An amplified signal triggering a digital interrupt increasing a counter would do quite a lot better. If it catches a 10 nS pulse...
Yeah I just realized that the analogRead won't be good enough. But the question I have is will a Arduino Uno or even Due will be fast enough to detect 10ns pulses?
Would you be kind enough to help me through this? I just started this internship a week ago and have no idea about Arduinos. If its too much to ask just guide me please
Ahh I see. I think the pulse is too small and might not be possible with the uno or the due. The experiment was supposed to replace a $10,000 machine. Might not be possible to replace it with a $70 machine.
Stick with it - I really don't remember much about the analogue comparator performance of the uno, and I don't even know if the Due has got one, much less its performance.
You may be able to configure a rising edge interrupt to catch it, though probably not on the Uno with only a 2V amplitude.
Some of the Teensy boards go to much faster speeds - I have a 600MHz one, but it is committed (i.e. soldered) to a bat detector.
Maybe or maybe not. Just as an idea. For example, if the output of the detection module (id100-SMF20) is connected to a fast comparator (similar to LTC6752, 280 MHz), the signal at its output is extended and then the signal from the comparator is fed to the input of two binary counters (74HC4020 or 74HC4040 for example, 20 MHz) connected in cascade. Then the Arduino Nano resets the counters, starts the count, waits a second or as long as necessary, stops the count and reads the outputs of the counters. So Arduino Nano will know how many impulses there were for the time.