Go Down

### Topic: X-Ray PIN diode TTL signal (Read 2827 times)previous topic - next topic

#### danilo_mello

##### Aug 20, 2012, 06:29 pm
hello!

im new to arduino but im already used to programming in C++ and Visual Basic.
Im working with a X-Ray PIN diode detector in a synchrotron radiation laboratory.

The device im using is http://www.xenocs.com/files/Product_Data_sheet_LD/ACC-05_X-ray_Pindiode_detector_system-02-LD.pdf

I can read the X-Ray intensity thru the Fout plug, which is a TTL signal with frequency that ranges from 0-500kHz (That is proportional to the photon flux on the diode). I have a arduino UNO R3 board.

I want the arduino board to make an average of the TTL frequency over 1/10 second and write the information on the serial.
I have read here that the maximum sampling rate of arduino UNO is about 125kHz, which is way below the 500kHz cap frequency of the detector.

anyone know if this is true? can i read the 500kHz signal with arduino uno?

#### AWOL

#1
##### Aug 20, 2012, 09:15 pm
http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### pito

#2
##### Aug 20, 2012, 10:04 pm
>I have read here that the maximum sampling rate of arduino UNO is about 125kHz
That is for ADC - as you work with TTL signal you do not need the ADC to consider - just measure the frequency of that TTL signal..

#### danilo_mello

#3
##### Aug 30, 2012, 08:02 pm

http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/

thanks

but im avoiding using other hardware than arduino. i tried connecting the TTL source to arduino with a simple code, but it started failing with frequencies higher than 1kHz.

i used a similar code to this one (this one has a bug, but the one i used was working fine <1kHz)
Code: [Select]

int pino = 13;
int t0;
int tf;
int delta;
int counter;
int TTL = HIGH;
float freq;

void setup() {
Serial.begin(9600);
pinMode(pino,INPUT);
}
void loop() {

t0 = millis();

while ((millis()-t0) > delta) {
if (TTL == HIGH){TTL = LOW;}
else {TTL = HIGH;}
counter = counter + 1;
}

}
freq = counter/(2*(delta / 1000));
Serial.println(freq);

}

im wondering about using a few flip-flops to reduce the output frequency.

#### AWOL

#4
##### Aug 30, 2012, 08:16 pm
If you want it to work above 1kHz, you'll need to use micros, not millis

Quote
im avoiding using other hardware than arduino.

Did you look at the link I posted?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up

Please enter a valid email to subscribe