Introduction: DUEL DISK
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
Supplies
Arduino Uno
MFRC522 RFID Reader x5 SD Card Reader ESP8266 WiFi Module 180 degree torsion spring Screws and Bolts Glue Wires RFID tags USB to TTL converter 3D filament
Step 1: Overview of 3d Printed Parts
The main structure of the duel disk is created from 3d printed parts. It is easiest to break these parts into three unique sections; the left side, the right side, and the center. Additional parts were made for the continuation of the project (see afterthoughts.) Be aware many of these parts have a large surface area for printing and are subject to bed adhesion issues, make sure your printer can handle such large scaled prints.
Step 2: Left Side Construction
With the 3d printed parts simply screw together the various pieces as seen in the photos.
Step 3: Right Side Construction
With the 3d printed parts simply screw together the various pieces as seen in the photos.
Step 4: Center Construction
Put the torsion spring so that it fits within the guides created on both parts. Slide the smaller part into the disk for an easier assembly.
Step 5: Final Construction
Screw each RFID module into the printed parts and then lay the parts out as seen in the photos.
Step 6: Programing the ESP
In order to code the ESP module use the USB to TTL wiring such that (TX:RX RX:TX 3.3v:EN ground:IO0) and 3.3v power and ground. The arduino IDE will also require the addition of the ESP8266 WFI library. The install process of which and additional troubleshooting can be found here https://arduino-esp8266.readthedocs.io/en/latest/e...
The code used is setup such that it includes not only the process that reads the position and name of a card but also the html and css that makes up the web interface.
At the start of the html that makes up a website set to a string to be used later. This html sets a refresh rate to the website and structures the window to look like a table with names within it.
In the setup() the serial communication and wifi processes are being started at 9600 and ssid[] and pass[]. the value within ssid and pass will need to change based on the wifi you plan on connecting to.
The loop() is a simple procedure of running the website as long as a client is connected and parsing the serial line for a phrase ended by #. Given that phrase is found based on what position it is in the string will be shortened and the name remaining will be put in the corresponding table slot.
Attachments
Step 7: Programing the Arduino
The code used works assuming a .csv is loaded onto the SD card named DATA.csv. The csv will also have to be edited based on the rfid tags being used. The library used is also a custom less documented one than the standard MFRC522 library. This one features the use of a software SPI as the rfid readers I used have difficulties running simultaneously. There is also a code included that allows for the scanning and entry of new rfid tags. This can also be done manually through the use of some predefined example code within the MFRC522 library and then inputting the values into the csv.
The startup procedure within the code allows for the inclusion of the basic libraries needed and all variables used to store IDs and names. Setup also allows for the initialization of serial and sd processes.
Loop is set the poll through each reader constantly using the rfidswap function to switch between each reader initializing it. Following the reader being initialized it pings for a card and given that a card is found and ID is returned as a hex value and split into the cardNum array to be used as comparison later. Then the dataGrab function is ran which ends up sending the cards position and name. Following that the reader is put into sleep mode and the remaining code within the function serves to prevent the serial line from having too much data passed through it and a forgiveness feature to prevent the card being read as gone if it shifted out of range of the reader for a short duration.
The dataGrab function opens the DATA.csv file and reads each line comparing the cardID within the csv to the cardNUM array made earlier. Given the values match the information is sent into the serial line with a format set for the ESP to read.
Step 8: Circuit Setup
The wiring will consist of three unique parts similar to how the construction went. The WiFi module simply requires 3.3v power and ground connection and the TX and RX lines go to the opposite on the Arduino (TX:RX RX:TX.) The SD module will require 5v power and ground and the remaining SPI bus wires will fall into the standard arduino pins (CS:10 MOSI:11 MISO:12 SCK:13.) The remaining rfid modules follow a standard pattern with all unique lines merging except the MISI line which serves to provide the individuality of each module. As such the wiring (RST:9 IRQ:8 SCK:7 MOSI:6 SDA:5) will require that each MISO line gets a unique pin on the arduino (from left to right RFID module 5,4,3,A0,A.) as well as 3.3v power and ground. The white lines serve as a guide to how the wires can be run. It is important to note the the moving side should be able to have enough wire length to reach throughout its whole range of motion.
Step 9: Functionality and Additional Features
At this stage the project is fully functional in that it moves and accurately displays the cards on the web interface. Given that this project was made with goal in mind for the end of a one semester timeline some concepts were omitted in favor of an addition at a later date. However, some of these additions were mocked up in some spare time. In the photos you can see just a simple arm rest for the duel disk to to mount onto. There was also an additional poster board added as an exterior finish to help clean up the design.