Skip to content

ITBenni/himbeer-verfolgung-rfid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Himbeer Verfolgung

A simple RFID demo using a Raspberry Pi and Python


💡 About The Project

This is a very simplistic project to demonstrate the use of RFID technology. It uses the NXP MFRC-522 chip to communicate with Mifare Classic EV1 1K RFID tags.

It is intended to be used in the lecture "Soziotechnische Studien: Container, Paletten, Verpackungen" taught by Prof. Dr. Martin Binder at PH-Weingarten.

The project can be used in conjunction with this RESTful backend and this web frontend.

Getting Started

This project consists of two components: a hardware component and a software component. To get this project up and running follow these steps.

🛒 Prerequisites

This project is intended to run on a Raspberry Pi. You will need the following hardware:

🥧 Raspberry Pi setup

Installation

Follow this tutorial to setup your Pi up as a headless computer.

In the Imager software select Raspberry Pi OS Lite (64-bit) as operating system. Edit the OS customization settings, so they look something like this:

Replace the wireless LAN SSID and password with the ones from your wireless network.

To access your Pi, either connect it to a monitor and keyboard, or use SSH to access it. In the later case, use these tutorials to connect to your Pi: for Windows/for Mac. To log in, use the username and password you configured in the Imager software.

The ssh command should look like this:

ssh pi@raspberrypi-1.local

At the end of this step, you should have a command line in front of you where you can enter commands. You can check it by running the command whoami which shoud give you pi ;)

Configuration

To use the GPIO-pins of the Pi, use the raspi-config tool to enable the SPI interface under System Options.

Shutdown your Pi to set up up the wiring using the following command:

sudo shutdown now

🪛 Hardware setup

Connect the RFID reader to your Pi. You can follow the instructions in the original post.

It should look like this:

Wiring of the Raspberry Pi and RC522 RFID reader

This Raspberry Pi pinout guide might also be helpful.

🧑‍💻 Software Setup

The following steps should all be completed on your Pi.

Prerequisites

This demo uses the python programming language. It comes preinstalled on Raspbian OS, but running the demo requires a few additional tools. Install them using the following command:

sudo apt install python3-dev python3-pip git

The two important tools used here are pip and git.

Installation

Download the sourcecode from this repository by running the following command:

git clone https://github.com/ITBenni/himbeer-verfolgung-rfid.git && cd himbeer-verfolgung-rfid

Install additional project dependencies by running:

pip install -r requirements.txt

This mainly install the python library necessary for interacting with the RF522 RFID module.

🐛 Usage

The main program resides in rfid.py. Run it using this command:

python3 rfid.py

🤝 Contributing

Any contributions are welcome :) If you find any errors or if you have feedback, please open an issue on Github.

📜 License

Distributed under the MIT License. See LICENSE for more information.

🙏 Acknowledgments

This project stands on the shoulders of giants. Those are:

Without these amazing people this project would't have been possible.