BryanLee
Posts: 3
Joined: Fri Jan 19, 2018 2:58 am

[SOLVED] Wiegand Reader - Falling edge

Fri Jan 19, 2018 3:17 am

I'm having a bit of an issue. I'm trying to integrate a ProxPro HID RFID Reader. It outputs using the Wiegand protocol. Data0, Data1, Ground. 5V on Data0 and Data1. I use a voltage divider for each channel to drop the voltage down to about 3.1V (330k and 560k resistors in the dividers).

I hook up my picoscope and I can see the data pulses exactly as I would expect them. Both channels dropping from 5V to 0V for each bit.

Now to hook them up to my Raspberry Pi.

https://bitbucket.org/sivann/wiegand_rp ... ew-default

Is the code I am trying to use.

I hooked up Data0 to Pin 8, BCM 14, WiringPi 15.
I hooked up Data1 to Pin 10, BCM 15, WiringPi 16.


My problem is that I can read the bits from Data0 (the 0's) just fine, but not Data 1's.

To trouble shoot I hooked up my scope to the circuit again (leaving the raspberry pi connected).

I could see that Data0 is properly dropping from a constant 5V to 0 V for each 0 bit.

however, Data1 was only dropping from 3.1V to about 2.8V for each 1 bit. If I disconnected Data1 from the Raspberry Pi, the voltage would drop to 0 for each 1 bit again.

I'm guessing that this lack of significant voltage drop is why I'm not able to catch the falling edge on Data1.

Any guidance?
Last edited by BryanLee on Mon Jan 22, 2018 2:15 am, edited 1 time in total.

BryanLee
Posts: 3
Joined: Fri Jan 19, 2018 2:58 am

Re: Wiegand Reader - Falling edge

Mon Jan 22, 2018 2:14 am

Found it.

I'm using the Raspbian Pi 3 Model B, that may make a difference for this, I don't know.

That being said, serial has been disabled by editing /boot/cmdline.txt.

But what I found out, was that it was the pull up/down resistor on WiringPi 16 pin. It was defaulting to pull-up. Pin 15, was defaulting to no resistor. When I changed the resistor to Pin 16 to none, it operated as expected. So I simply added the following to the setup function:

Code: Select all

    pullUpDnControl(d0pin, PUD_OFF);
    pullUpDnControl(d1pin, PUD_OFF);
Just adding this to see if it will help anyone else in the future.

Return to “Interfacing (DSI, CSI, I2C, etc.)”