Build a cheap RFID Tag reader for UK Livestock using RaspberryPi Zero

Following retirement from my career as a medical doctor, I now have a smallholding of some 40 acres with three flocks of rare breed sheep numbering about 150 in total.

Recent regulations from the European Union require that all sheep are tagged with EID ear tags and a comprehensive record of all intervention is kept and available for inspection. To date, this has involved the manual recording of all activity into a manual database, an activity, which is extremely time-consuming!

Using the electronic tags for recording these interventions would make the whole task simpler, more accurate and less time consuming but to date the commercial equipment available costs from £600 — £1500, totally unaffordable for a small scale farmer.

I was lucky enough to get my hands on a RaspberryPi Zero a couple of months ago and about the same time came across Priority 1 Design in Australia who makes an RFID reader card for the princely sum of about £25.

Primarily designed to be used with a laptop PC, the card has a serial data output through a USBconnector and in that mode works exceptionally well. I decided that a fully portable reader that could be easily carried and available for tag reading in the field would be very useful (this is actually the form in which most of the agricultural equipment is packaged), the project was born.

Setting up a Raspberry Pi as a sheep tagger

I have connected a Rapberry Pi Zero to the RFID reader and mounted the package in what is now affectionately known as ‘the cricket bat’. Combining a 16x2 LCD display, a clock, a beeper module and several LEDs, powered by two LiPOs in parallel, has created a device which should have battery life in excess of four hours, gives a visual and audible indication of a successful tag read and displays full Tag ID together with date and time. The data is stored in a CSV text file in the /home directory in the form rfid_date.txt.

The enclosure for the electronics was constructed from 6mm plywood and bits of scrap timber, cost zero. I estimate the total spend on this project has been about £60, a huge saving on the commercially available offerings and affordable by any small farmer.

Some issues to be aware of:

  1. Slow boot up time (about 45 seconds!) but I am using a full Raspbian Jessie distro.
  2. The RFID reader comes with a wiring output for the beeper but although this works well with my other Raspberry Pi boards with the normal USB I could not get this to work with the OTG output of the PiZero. The buzzer board is wired to a GPIO pin and software operated. It works well, albeit with a small delay after the LED indicates a successful read.
  3. The case has to be opened at the end of the day to either download the txt file from the SD card directly, or to connect to network to download remotely. I may try connecting an Ethernet board to SPI output and wiring permanently at a later date.
  4. The agricultural EID tags operate at a frequency of 134kHz. Widely available electronic card reader boards on Ebay mainly operate at 125kHz and are not suitable for reading UK sheep tags. Priority1designs in Melbourne, Australia are the only supplier of a suitable hardware solution that I can find. Their service and documentation is excellent and at a very reasonable price; I can highly recommend them.

Paul Buckley,

Like what you read? Give Lucy Hattersley a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.