Detection of coincident signals from Geiger tubes without pulse extension

Consider two Geiger tubes placed on top of each other, if an energetic particle passes through both tubes, the output of both Geiger tubes will drop at the same time from ~3V to 0V for approximately 300 microseconds (measured with oscilloscope). Otherwise, both Geiger tubes will give these voltage drops randomly in time.

Is it possible to detect both signals simultaneously, and count these coincident signals with Arduino Uno? So far I manage to make it count individual signals from each Geiger tube using attachInterrupt(), but I do not know how to make it count two signals arriving at the same time (or within an acceptable short interval).

This is my progress so far, and it doesn't work the way I intended. I just modified it from earlier work - detecting signals coming from the tubes individually.

const int pb = 5;
int pbValue;
volatile unsigned long CNT_A;    // variable for counting interrupts from Geiger tube A
volatile unsigned long CNT_B;    // variable for counting interrupts from Geiger tube B
volatile unsigned long CNT_AB;   // variable for counting interrupts from Geiger tube A and B 

#include<LiquidCrystal.h>                     // adding LCD from the library
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);        // defining digital pinout for LCD

//========================================================================================
void setup() {
 pinMode (pb, INPUT);
 pbValue = 0;               //initial pushbutton value
 Serial.begin(9600);
 lcd.begin(16,2);           // initializes dimension of LCD display, 16 char x 2 lines
 CNT_AB = 0;                 // CNT value for A and B initially 0
 

 lcd.setCursor(0,0);
 lcd.print("GM Detector V0.2");
 lcd.setCursor(0,1);
 lcd.print("ACJC 2021");

 delay(2000);
 cleanDisplay();
 attachInterrupt(digitalPinToInterrupt(2), GetEvent_A, FALLING);  // detect event in pin 2
 attachInterrupt(digitalPinToInterrupt(3), GetEvent_B, FALLING);  // detect event in pin 3
}

//========================================================================================
void loop() {

 currentMillis = millis();                     // capture the latest value of millis()
 lcd.setCursor(0,0);                           // Sets cursor to character 0, row 0
 lcd.print("COINCIDENCE: ");                   // Prints the defined word
 lcd.print(CNT_AB);

 GetEvent_AB();

 pbValue = digitalRead(pb);
 if (pbValue == HIGH) {
  CNT_AB = 0;
}
}
//========================================================================================
void GetEvent_A() {
  if (digitalRead(2) == LOW)
   CNT_A = 1; 
  else  CNT_A = 0; 
}
//========================================================================================
void GetEvent_B() {
  if (digitalRead(3) == LOW)
   CNT_B = 1;
  else  CNT_B = 0; 
}
//========================================================================================
void GetEvent_AB() {
  if (CNT_A == 1 && CNT_B == 2){
    CNT_AB++;
  }
}
//========================================================================================
void cleanDisplay (){
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.setCursor(0,0);
}

CNT_A and CNT_B doesn't seem to return 0 after each pulse has passed, so the display just went counting really fast after the microcontroller registers a pulse from each tube.

I think I am missing something fundamental here. Perhaps attachInterrupt() cannot be used like this? I am an absolute beginner in any sort of programming. Very limited posts out there to find reference codes on detection of coincidence signal. Any help would be greatly appreciated.

Ideally, if Arduino Uno can count these coincident signals, I intend to use the coincident signal to trigger a sequence of relay switches that controls a camera, LED flash lamps, and a pneumatic valve.

If you've got a falling interrupt on pin 2, there's no reason in the ISR for pin 2 to read pin 2 to see if it is low.
Why not use the ISRs to timestamp the events, using micros()?

Or have pin 2's event handler read pin 3, and vice versa.

The UNO is 5V, your signal is 0-3V.

AWOL is right. You don't need to read pin 2 because you already know it was pin 2 that triggered the interrupt. Even worse, it takes some time for the interrupt to register, pushed the running code out of memory and loaded up the interrupt code. By that time the pin could be high again.

You might be better off using an op-amp comparator circuit to trigger a single pin when both inputs go low.

Also I believe it's against the rules to ask about a cool sounding project and not tell us what it's for.

If you are just interested in detecting coincident pulses, a simple solution is to use a couple of logic gates. Here is one simple example. More complete discussion here.

If you have a Nano Every or one of the newer MCUs with CCL, you could have some configurable logic and an MCU at your disposal. Example: Frequency Divider Using CCL

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.