[closed] Need help connecting wiegand 26 reader to arduino

Hi there,

I'm trying to connect a wiegand 26bit reader to my arduino uno - but I can just not make it work.

My wiring looks like this:

The back of the reader tells me that the orange wire is D0 and the brown one is D1.

And my code like this:

#include <Arduino.h>
// Wiegand lib https://github.com/monkeyboard/Wiegand-Protocol-Library-for-Arduino
#include <Wiegand.h>
WIEGAND wg;
int wiegandD0 = 2;
int wiegandD1 = 3;
void setup() {
  Serial.begin(9600);
  wg.begin(wiegandD0, wiegandD1);
}
void loop() {
  if(wg.available()) {
    Serial.println("Got wiegand input");
    long input = wg.getCode();
    Serial.print("Pressed: ");
    Serial.println(input);
  } else { 
    Serial.print("No wiegand input detected");
  }
}

What I want is that when I press a button, I get the output printed to serial.
But no matter what I do I will not get output to my Arduino.

Are there any obvious things that I'm missing?
Can someone help me with this?

Please let me know if you need more information.

Do you have a link to the reader datasheet ?
Also, just for completeness, I suspect your D0 and D1 are in fact DO and DI

(data out and data in)

Here’s hoping those signals are TTL levels, and not RS232

Sadly I have no datasheet - what I do have is the manual.

Does that help in any capacity?

Yes, it tells you which connectors inside the unit are to D0 and D1 connectors. That's the only help it gives.

Based on that document I would say it is not safe to connect this unit to an Arduino.

That PDF’s a lot of use - but not much use !
You were right, D0 & D1 are certainly zero and one, but they appear from the scant notes to be for adding a second reader… ?

I would have hoped COM to be for COMms, but their schematic shows it is a relay COMmon pin, along with NC/NO and CPEN (Push button?)

I do appreciate the use of a BellEnd… never seen that before !
Along with the wifing line makes you appreciate chinese documentation and translation.

It doesn’t look like there are any references for serial control options.

Thank you @PaulRB & @lastchancename

I've now tried another device and as soon as I tried it - it worked.
So the old one is going back to the vendor.

Avoid this if you want to use wiegand 26

HFeng IP68 Waterproof RFID Access Control Keyboard Wiegand 26 Door Access Control System Outdoor Rainproof 125kHz with 10pcs EM4100 Key Chain Tags

Hi,
i'm interested to this project...

  • simple
  • ardiono pro micro
  • wiegand reader (D0 D1)
    got this error with compiler

Compilation error: 'WIEGAND' does not name a type
Any idea.. ve2dsk

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