1

I have situation where I need to read RFID cards. There is already installed Roger security system, Roger gate control board and two rfid readers in parallel. By default board and RFID readers communicate in RACS(some sort of coded protocol) but at the moment system is configured to communicate in Wiegand26. Earlier I used chinese wiegand26 reader with Arduino with no problem.

With Arduino I need to read card read by RFID readers. Then I process data and make HTTP POST request. Arduino is supplied from Roger board ~13.5V DC I do not get anything in arduino, even if I connect RFID readers directly to arduino.

  • CLK is D0 to Arduino Nano pin 2
  • DTA is D1 to Arduino Nano pin 3

This question is not related only to Arduino.

I want to ask is it possible to do? To read data maybe I need some additional electronics?

What i also noticed that when Arduino is connected in parallel the Roger board not always reads the card from RFID readers.

Roger PR402-BRD And two readers PRT62LT enter image description here

This is copy of Electronics.stackexchange

2

It looks to me like the Wiegand interface is an open-collector interface (like I2C), which is why they can be wired in parallel like that.

As long as the Arduino has both connections set to INPUT (not INPUT_PULLUP and certainly NOT OUTPUT) it shouldn't interfere at all.

By the way, for Wiegand, the two signals are DATA0 and DATA1. To transmit a 0 the DATA0 line is pulled low. To transmit a 1 the DATA1 line is pulled low.

You should also check that the idle voltage on the lines is indeed 5V as it should be. Anything more than that could cause the Arduino to chip the voltage to 5V through its internal ESD protection diodes.

Also you must ensure that the Arduino has its ground pin connected to the ground connection of the Wiegand system (which it should be since you are powering it from that).

  • i am using github.com/monkeyboard/Wiegand-Protocol-Library-for-Arduino library pinMode(D0Pin, INPUT); // Set D0 pin as input pinMode(D1Pin, INPUT); // Set D1 pin as input attachInterrupt(0, ReadD0, FALLING); // Hardware interrupt - high to low pulse attachInterrupt(1, ReadD1, FALLING); // Hardware interrupt - high to low pulse – Martynas Jun 26 '15 at 14:18
  • As you can see pinMode(D0Pin, INPUT);. Checked the voltage and for my surprise its ~11,5V DATA0 - GND -> 11,5V and same with DATA1 - GND -> 11,5V and yes as you said Arduino chips it to 5V when connected – Martynas Jun 26 '15 at 14:24
  • That could be your problem then - the Arduino would be trying to clamp that to 5V which would cause problems I would guess. It could also damage the Arduino. You would probably need to isolate the Arduino from those lines. Optocouplers would probably be your best bet. – Majenko Jun 26 '15 at 14:25
  • Hmm, but if i will put optocouplers then led in optocoupler will lower the voltage too? I mean resistor+led in series. – Martynas Jun 26 '15 at 14:26
  • Depends on the amount of pullup resistance. Another option could be to use MOSFETs. You can calculate the pullup resistance by measuring the current to ground then using Ohm's law - you can then work out a suitable resistance for the LED. Or with a MOSFET you just need to ensure the threshold level is in the right region to switch on/off at the right times. There's all sorts of ways of doing it. Op-amps could even be used to apply a fractional gain. – Majenko Jun 26 '15 at 14:28
1

If you would like to use more than 1 Wiegand reader, technically it should be possible to use AVR pin change interrupt. In this case you can use ANY 2 pins, even analog pins.

For example, see http://thewanderingengineer.com/2014/08/11/arduino-pin-change-interrupts/

UPD: There is informationon Wiegand timing, might be useful: http://proxclone.com/wiegand.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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