So i've been playing around with RFID readers and my arduino, I got the ID-12 unit reading tags relatively easily (thanks to all the documentation available for it and the arduino), and have purchased a 13.56ghz reader to try and get the arduino reading my hi-frequency card (a travel card).
The reader I bought is the Micro RWD Mifare reader:
here's the wiring diagram from the site:
So the way I have it wired up:
+5v > 10k resistor > Red LED > pin1
+5v > 10k resistor > Green LED > pin2
GND > pin7
+5v > pin8
Antenna TX1 > pin9
Antenna TX2 > pin12
Antenna GND > GND
GND > pin13
Arduino Digital 4 > pin20(OP0)
+5v > pin21
Arduino Digital 13 > pin24(CTS)
All I'm managing to get out at the moment is '0's whenever I scan the tag. I've no idea what i've got wrong and why it's not reading the full hex value of the card.
I think this is wrong. From the diagram this is the Wiegand output not serial output. Try:-
Arduino Digital 4 > pin23 TX - and make sure this is defined as the input for your software serial.
You don't apper to be doing anything with the CTS line and pin 13 either.
If it were me I would get a scope and see if the Wiegand output is appearing on pins 19 & 20, if so I would use that rather than the serial.
An RWD EEPROM parameter can redirect the serial auxiliary output on OP0 to the main TX output (pin 23). This is to allow both bi-directional command/data communication and the uni-directional auxiliary serial data output with the same 3-wire RS232 interface. Note that when the auxiliary serial output has been redirected to TX pin, there will be NO acknowledgment or data response to commands.
For normal command and data response using the Windows application, the serial auxiliary output MUST be directed to the OP0 pin.
The auxiliary data outputs on OP0 / OP1 are AUTOMATIC and if enabled, occur when a card enters the RF field for the first time. The “beep” output signal delay, the data source and byte order for the auxiliary output and the various Weigand protocol options are all controlled by programmable RWD EEPROM parameters (see page 8). A zero data length parameter effectively turns the auxiliary outputs OFF (factory default set to asynchronous serial output of UID-serial number from OP0 with NO “beep” output).
Maybe I need to set an EEPROM param to get the reader to output serial to pin 23 (though I have less than no idea of how to do this)
I don't really understand what the CTS pin does, hence my use/non-use of it, and i'm hacking bits of code together to get it to do what I need...
I don't have a scope, but I have a mulitmeter, can I use this to check the Wiegand output?
Apologies for the super-noob questions, definitely feeling my way along here. :-/
I think the issue is that i'm getting nothing but weigand protocol replies from the OP0 port. According to the datasheet I need to turn off the buzzer and OP0/OP1 ports:
"Note that Auxiliary outputs (and “BEEP” output) should be turned OFF if standard RS232 command interface is being used to ensure minimum power consumption and no additional delays occur in the polling loop. "
apparently (again according to the datasheet) you do this using EEPROM settings... which I have utterly no idea how to set.
OK, so after reading a bit more (researching RS232 interfaces etc) and trying to really get my head around the datasheet for the RFID reader I think i'm on the right track with the way i've wired it up and basically with the arduino reading the weigand signals from the OP0 port I should be able to get a read from the card.
At the moment all i'm getting is FFFFFFFF (which I think according to the doc is the reader saying it sees nothing. and the 0 when It sees the card. My issue is obviously getting the reader to read the card properly. I think it might be that I'm not sending the correct commands to the reader (it mentions you can send ASCII 'R' to trigger a read)... I thin the 0 is just an acknowledgment that something was read.
I don't think you understand the fundamental way this chip operate. There is the TX and RX lines, these allow you to communicate with the chip and, amongst other things, set up the EEPROM. Page 10 has the details of how to do this:-
incorrect data may render the system temporarily inoperable.
B7 B0
Command: 0 1 0 1 0 0 0 0 (Ascii “P”, 0x50)
Argument1: N N N N N N N N (N = EEPROM memory location 0 - 255)
Argument2: D D D D D D D D (D = data to write to EEPROM)
Acknowledge: 1 X X X F X X F (F = Status flags)
As it is EEPROM once these are set there is no need to repeat this when powering up again.
That means you send it three bytes over the RX line and it sends you an acknowledgement byte over the TX line.
This will allow you to make the settings what you want.
However if you just have Weigand output anyway why not use that. For an example of Weigand protocol interfacing see my project:- http://www.thebox.myzen.co.uk/Hardware/Crazy_People.html