Can 1 wiegand output for 2 controllers?

Hi everyone, recently I have this project which needs to read 2 wiegand signal using Arduino Mega 2560.

I have an access control device which will output wiegand signal once the user is allow to enter, and there's a RFID reader which will transmit the card no in wiegand signal to my access control device.

So I need to get card no from the RFID reader and also from the Access control device, so I connect them like the attachment given, using a library here: ( GitHub - ugge75/Wiegand-V3-Library-for-all-Arduino ), everything works fine at first, but once a while, I can't read signal from the RFID Reader, and sometimes I can. Could anyone let me know why is this happening?

Sorry but that is a rather rubbish diagram. No PIN numbers, no part numbers and the code not posted the way we specify here.

Please read the how to use this forum sticky post.

Thanks for your reply and sorry for that, I'm rather new to this, just found the "How to use this forum" post after your reply.

The pin is 18(D0),19(D1) from RFID reader to Arduino. From the Access control Device to Arduino, it's 2(D0), 3(D1).

My code is in the wiegand library's example: Wiegand-V3-Library-for-all-Arduino/Wiegand.ino at master · ugge75/Wiegand-V3-Library-for-all-Arduino · GitHub

After done some researches on Google, I could only found this: I'm not sure if this ( Wiegand Splitter | rf IDEAS ) is needed for this project, since I'm using 1 wiegand output for 2 controller.

I'm not sure if this ( Wiegand Splitter | rf IDEAS ) is needed for this project,

No, you should be able to do this project without this.

Your link points me to a .ino file. I am on a mobile device and they can’t cope with .ino files. This is why we ask you to post any code in a in a window using code tags.

I have a project where I read three wiegand RFID readers, but this is on a Uno so it won’t work on a Mega. I suspect that the problem is in the software but Wiegand outputs normally need pull up resistors and you haven’t got any shown on your diagram.

I'm not using any resistor, because I'm just follow the original library's wiring diagram ( Wiegand-Protocol-Library-for-Arduino/README.md at master · monkeyboard/Wiegand-Protocol-Library-for-Arduino · GitHub ), but I'm using the V3 library: ( Wiegand-V3-Library-for-all-Arduino/README.md at master · ugge75/Wiegand-V3-Library-for-all-Arduino · GitHub )
The code are following:

#include <Wiegand.h>


#define FALSE 0			
#define TRUE  1	


WIEGAND wg;

void setup() {

  Serial.begin(9600);
  
  // PIN assigment and declaration for Arduino Mega 
  //GATE A 
  wg.D0PinA =2;   
  wg.D1PinA =3;   

  //GATE B
  wg.D0PinB =18;  
  wg.D1PinB =19;   

  //GATE C
  wg.D0PinC =20;  
  wg.D1PinC =21;  

 // Reader enable
	wg.begin(TRUE, TRUE, TRUE);  // wg.begin(GateA , GateB, GateC)

}

void loop() {
	if(wg.available())
	{
		Serial.print("Wiegand HEX = ");
		Serial.print(wg.getCode(),HEX);
		Serial.print(", DECIMAL = ");
		Serial.print(wg.getCode());
    Serial.print(", Gate= ");
    Serial.print(wg.getGateActive());
		Serial.print(", Type W");
		Serial.println(wg.getWiegandType());    
	}
}

I'm not using any resistor, because I'm just follow the original library's wiring diagram

So use a pull up resistor on each Wiegand input to your Arduino. A value of 4K7 should do.

I have not used that library but it could be that once it is in the process of reading one Wiegand stream it is blocking the input from the other.