0

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: ( https://github.com/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?

Can 1 wiegand output for 2 controller?

2 Answers 2

4

In the readers there is switch transistors that pull down voltage provided from controllers, in other words is shutting signal to the ground. In my practice i tested many solutions and simplest one is with diodes from each controller D0 D1 in direction to the reader. In that case is not crossing voltage from controllers. For 2 controllers and 1 reader you need 4 diodes - 2 on each line.

Controller 1 - D0 --> anode on Diode 1 --> cathode to common connection for line D0

Controller 1 - D1 --> anode on Diode 2 --> cathode to common connection for line D1

Controller 2 - D0 --> anode on Diode 3 --> cathode to common connection for line D0

Controller 2 - D1 --> anode on Diode 4 --> cathode to common connection for line D1

Common connection D0 --> reader D0

Common connection D1 --> reader D1

Works fine up to 20 meters since every diode makes voltage drop. For diodes 1N4001/4007 works fine. Noise is not a problem, this is very slow connection with 5v amplitude.

1

There is missing information. Assuming a 5V Arduino and all D0s and D1s swing from 5V to 0V as the Wiegand protocol defines. This despite the 12V power supply in the question's diagram.

Examining the driver code on GitHub, we see it's falling edge interrupt driven. So any noise when the line is expected to be at a steady 5V will cause the driver to run. And there are a number of locations in the code where data is dumped because it is considered bad. It appears that any unexpected noise during a valid signal will cause missing data.

Consider the possibility of noise affecting the RFID data. Shorten the length of the RFID's Wiegand cable in an effort to improve the RFID reliability.

Consider re-writing the driver code to improve noise rejection. Currently, it appears the driver code will accept any falling edge as valid data to be processed. Alternatively, the driver code could detect a falling edge then sample the same input a fixed interval of time later. A valid signal is assumed to last longer than noise. Therefor any falling edge interrupt followed by a high sample can assumed to be noise and ignored / not-processed.

2
  • Thanks for your reply, I'm using same source of power 12V for both the access control device and Arduino (VIN), may I know if it's really the problem of rejection, could I use this modue to improve: rfideas.com/products/converters/wiegand-splitter Is it the problem of me using the 1 output of wiegand for 2 controllers?
    – 5h177y
    Commented Sep 28, 2019 at 14:42
  • I don't think you need to split the signal. And the way you power devices sounds fine. Just make sure you are using an Arduino that is running at 5V (not 3.3V) internally. When researching this question, it was difficult to find Wiegand circuit examples. That is why I left that part of the answer brief. It was frustrating that the data rate or termination resistances are not talked about more. I really think you are picking up noise which causes the missing data. And I really think the code could be improved upon as described in my answer. Do test short cables to verify if noise is a problem.
    – st2000
    Commented Sep 28, 2019 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.