Grove - 125KHz RFID Reader


Hi guys,

I’ve purchased a Grove - 125Khz Sensor to use on the GrovePi.

I’d like to know if this sensor is compatible and if you have any sample code on how to get it up and running?



We have not tested this RFID shield but since it is Serial, you can connect it to the Raspberry Pi Serial Port “RPISER” on the board. Refer

To check if the data is coming to Raspberry Pi, follow this tutorial and set the Baud Rate to 9600. Place the RFID card over the reader and the card ID should come on the screen.




Thanks for confirming this is a serial sensor. Greatly appreciated.

Once I get everything up and running I’ll go through the tutorial, take a video and post the link to your forum.


Hi Karan,

I ran :

import serial
ser = serial.Serial(’/dev/ttyAMA0’, 9600)
while True:
print ser.readline()

but the command prompt stays blank regardless of a card swipe.

The sensor is connected to the Rpiser on the board as you suggested. The jumper is in U mode.


The code does look right and it should be reading the card ID.

Please try the following:

  1. Make sure that it works with Arduino.
  2. Try using Minicom instead of the python code.

Since we don’t have an RFID reader with us, it may take some effort to get it working with the GrovePi. If this does not help please let us know.




Thanks for your help with this. I read into the pyserial documentation and realised that I might need a timeout on the serial command.

import serial
ser = serial.Serial(‘/dev/ttyAMA0′, 9600, timeout=1)
while True:
print ser.readline()

I haven’t had time to play around with the timeout value but this seems to work correctly or at least, the number is displayed in the shell.

Thanks for your help.


Getting some sensors to work with pyserial is a bit tricky. We first try it out with a Serial Terminal like minicom or X-CTU and if the device works there, then we use pyserial. If it does not, then we take out the logic analyzer and try to figure out what’s not working.

Do try out a Serial terminal and arduino first.