Thanks for your reply.
I looked at the extender module doc and there is info on what are the pins for. It seems strange to guess that all pins are the same and I can plug my D0 & D1 anywhere.
Do you know some documentation, or you just know it by experience?
The extender is just really a “breakout” of any Gadgeteer socket. So if you plug it into an A socket, then the pin functions match the A socket definition. If you plug it into an X socket, the pin functions match an X. So in your case, because you are looking at a serial device, you want to plug it into a U socket. https://www.ghielectronics.com/docs/120/gadgeteer-sockets has the simple reference for the pin locations
You can connect direct to the Arduino style connections. I have done this myself with the UART and IO and it works fine.
Do you have a link to the RFID module you are using? It would really help to know what D0 and D1 are as you really don’t want to destroy your IO inputs if the voltages are not compatible.
I just checked the 12V powered RFID reader I have here and it uses RS232 levels marked as DO and DI which sounds similar to your unit. What does the datasheet say about your unit?
Just as I thought. This is very likely RS232 output so DO NOT CONNECT to your Cerbuino. (But I see you have from the image)
You can confirm this by measuring the voltage with a multimeter.
D0 and D1 are inputs. They are connected to GND to switch the RED and GREEN LED on the device on.
The output is the purple wire, and this has the Wiegand output you need but it will be at ±12V levels. Check with a meter first. In the standby state it will be somewhere close to -12V.
If indeed it is 12V you need to use a level converter.
You also need a common GROUND connection otherwise it won’t work. Connect GND on the module to GND on the Cerbuino.
The module outputs standard Weigand data via the UART. That should be on the purple wire according to the image you posted.
You need to use the SerialPort class to read it. It’s plain ASCII as I recall from the time I last used it.
DO and D1 are the LED inputs. If you connect these to ground, the LED on the front of the unit should light up. Try this. It should be RED and GREEN LEDs.
I am working on some serial port stuff for the Cerbuino on the same connections as you so once I get this working, I’ll post some code.
Let demistify some things about RFID Reader interfaces.
Majorly, you will find WIEGAND and DATACLOCK interfaces that are known to be simple to use, however they only accept reading from the reader, and thus, do not require request/response plumb to be managed.
D0 and D1 Pins on a reader are respectively LOWLEVEL (0) and HIGHLEVEL (1). This means that when D0 comes to LOW, you have to interpret a 0, and when D1 comes to LOW, it is 1.
D0 and D1 are sequantial sets, and do not need any CLOCK to be synchronize. What you only need to read a WIEGAND sequence is 2 InterruptInput (one for D0 , one for D1) and sharing a common binary buffer.
With DATA CLOCK, there is a clock sync that tell you when to read the DATA value. In tthis case you need 1 InterruptInput (CLOCK) and 1 simple input (DATA) => When the CLOCK goes to LOW, you read the value on DATA, and so on.
Regarding to the size of the Buffer, this is given by the reader. Commonly it is WIEGAND 26 which means 26 bit, including 1 bit start, 24 bit for the UID, and 1 bit stop…But, it can be different to this standard if specified on the reader…
Interesting. The unit that Julien has is almost identical to the one I have but has a different interface. This would explain why he is seeing 5V on the IO connections and based on what you posted, I was wrong about the wiring. I guess we can still all keep learning new stuff
The unit I have is a simple RS232 interface that outputs a serial ASCII stream.
Knowing what you just posted will be very helpful if I come across this again.