1

I have been working on an access control project which started out as scanning QR codes using a Pi camera and then triggering a relay using the Pi to open up electro-magnetic locks.

I would like to expand this feature now to allow scanning of RFID cards and have discovered that there is a myriad of options to consider.

For example, here are some of the questions / rabbit hole I have jumped into after digging through all the information online:

  1. Started with using an RC522 RFID module.

this led me down the path of further questions like..

  1. The module using SPI which restricts the cable length? Plus I would also like to have a buzzer and an LED indicator at the reader, which would be too much of a custom job to setup.

so I started looking at ready made RFID card readers in the market, and this came up with

  1. Wiegand wiring/protocol card readers or RS485 wiring and unknown protocol card readers? Do all RS485 readers communicate over something like Modbus or are they all custom and private protocols designed only to work with their own control panels?

  2. Even if I do manage to find something which is opensource, I'd then have to consider how do I connect the Wiegand/RS485 wiring to the Pi?

  3. I looked up RS485 to USB converters and then realised that is a whole other topic about serial data translation and libraries. This also means the encoding and decoding needs to match on the reader and the Pi library I assume?

I tried digging through the forums but haven't managed to find anyone else using an off the shelve RFID card reader (complete with buzzer and LED) with the Pi?

Would appreciate if anyone could share any similar posts they've come across or point me in the right direction with the questions above.

Thanks in advance!

EDIT: After digging deeper, if I were to go down the path of using the Wiegand wiring interface, is it possible to connect more than one Wiegand card reader to the Pi?

fabbbles
  • 43
  • 6

1 Answers1

1

On the RFID modules I've used, the LED and buzzer are usually wired independently of the Wiegand RFID sensor, and as such are controlled just as you would if they were separate components (though the LED may already have an in-line resistor). Typical wiring connections look like this:

  1. DC12V
  2. GND
  3. WG data0(RS485+)
  4. WG data1(RS485-)
  5. BUZZER
  6. LED
  7. WG26 or WG34 output format select

You will have to make sure to account for voltage mismatches between the data lines of the RFID module you select and the RasPi GPIO pins (i.e. 12V vs 3.3V) by using a level shifter.

The PiGPIO library has a Wiegand decoder example that makes reading the card pretty straightforward.

John S
  • 359
  • 1
  • 7