ECE497 Project - RFID Scanner

Team members: Matthew Howlett

Grading Template
I'm using the following template to grade. Each slot is 10 points. 0 = Missing, 5=OK, 10=Wow!

 00 Executive Summary 00 Installation Instructions 00 User Instructions 00 Highlights 00 Theory of Operation 00 Work Breakdown 00 Future Work 00 Conclusions 00 Demo 00 Late Comments: I'm looking forward to seeing this.

Score: 100/100

(Inline Comment)

Executive Summary
Eventually there will be a picture that summarizes this project.

Have you ever wanted to protect your beaglebone from the people on the internet and require physical presence to operate? With an RFID Scanner and touch screen you can prevent tampering. So far the touch screen from class displays images. I have made several attempts at adapting two libraries for the RFID Scanner and the touch screen. The RFID library allows operation of the scanner over a 3.3V SPI interface. The RFID library for arduino proved too much of a hassle so I am using Peakup's version that has core functionality mostly finished for the Beaglebone. Tweaks had to be made to get it to work discussed below. The touch screen library uses SPI to draw visuals as well as operate the resistive touch screen. The arduino library was designed to operate over an explicit set of hardware, has missing features such as touch capablities and not put together elegantly. So the final project has resulted in being able to scan an RFID card, log to google sheets, display the id number to a screen and ring a bell corresponding to the ID number.

Timeline
10/20/18 RFID reader and TFT screen hardware obtained

10/25/18 RFID reader operational

10/31/18 TFT screen operational

11/5/18 Integration done

Packaging
I will be using the breadboard given as much as possible since the pinouts of the rfid reader and the TFT9341 do not correspond well with the pinout of the beaglebone.

Installation Instructions
Wire the beaglebone as shown below:



1. Clone the git repo found here: https://github.com/howletmj/ECE434.git

2. Go to the ECE434/FinalProject/MFRCBellDisplay directory.

3. Enter the make command.

4. Run the setup.sh script.

5. Configure the logtosheets.py to your own google sheets document.

6. Run MFRC522

User Instructions
Scan an RFID card supported by the RFID scanner. The id number will appear on the display, the id number will be logged to google sheets, a servo will ring one of four bells three times.

Highlights
Reads Specific ID cards that are not the Rose-Hulman Ids. Shows the ID on the TFT display. Logs the id to a google sheet and rings one of four bells 3 times.

Challenges
Converting the arduino libraries proved too much of a challenge due to the lack of documentation on the modules, not put together well and lack of functionality.

Getting the BeagleBone green wireless to pass the loopback test. The loopback test is a standard SPI port test where the MISO and MOSI ports are tied together. What you write to the SPI bus should be what you get back. When run I would get garbage returned. I learned that the pins need to be configured for SPI, two capacitors on bottom of the board next to the SD card holder needed to be removed and finally GCC has strict data structure rules in regards to SPI. If the notation is not exactly right, GCC will still compile but will not write to the SPI bus.

The BeagleBone green does not bring out the second channel of the first SPI bus and the second SPI bus was on the pins used for WIFI. I had to move to a beaglebone black for SPI pins. I also had to turn off the HDMI port in order to free up more PWM pins.

The servos require an additional power supply unit to supply power that the beaglebone cannot provide alone. The beaglebone can supply enough power to turn a servo unloaded but cannot with anything attached. The pwm needs to be set at 50Hz. The servos I was using for the bells accepted pwm signals with duty cycle of 9% to 15%.

Theory of Operation
Utilizes the SPI bus and PWM for the servo motors to ring bells. SPI bus has a clock wire, a master out wire, master in wire and a slave select line for every slave device. Requires more wires than I2C but can push faster data rates for short distances.

Work Breakdown
1. Gathered libraries needed for converting from Arduino to beaglebone C++.

2. Attempt at converting libraries.

3. Loopback test for SPI bus.

4. Fix issues with SPI bus.

5. Verify Scanner works correctly.

5. Get C program to write to LCD screen.

6. Setup servos for bells.

7. Write uids to google sheets.

8. Final Documentation

Future Work
I will in the future try looking through the datasheet for the touchscreen and see if I can write a basic driver to read touch position on the screen.

Conclusions
The embedded systems community is alive, thriving and constantly updating. The beaglebone allows people to do a lot of things in a very accessible way. This project allowed me to explore the ability to pull things designed for arduinos and micro-controllers to a higher level platform. While constantly updating, open source has issues with keeping documentation of issues and problems in previous versions up to date. If I had more time I would try to get the touch screen portion of the LCD displays working. It would be cool if someone was able to incorporate Blynk into the project so that you could have live updates of who scanned their rfid card.