Introduction: RFID DOMINATION TIMER for Airsoft - Arduino + NXP RC522 + LCD
DOMINATOR is a device - stopwatch for sports such as Airsoft, Paintball. The stopwatch uses an Arduino control microcontroller (Arduino Uno / Nano) or a separate chip (Atmel) AtMega328P, which controls the entire system logic. The stopwatch includes an LCD character display measuring 16x2 (16 characters x 2 lines), or 20x4, on which the times of individual teams are displayed. There are 2 teams in the game - RED team and GRE team that play against each other and occupy the imaginary point that is formed by this device - DOMINATOR. At the beginning of the game, the display shows the times 00 hours, 00 minutes, 00 seconds for RED team , GRE team.
Each member of the team is equipped with a card, bracelet or key fob, which communicates on the frequency 13.56MHz with an RFID reader, if it is within its range. Keychains and bracelets can be color-coded (green, red according to team and function ...), which allows them to be distributed more efficiently to players, but also their archiving and storage. If the RED team occupies a point, the team player attaches his card to the reader, thus occupying the point. This action triggers a buzzer that announces a change in the point. Then the RED team's LED at this station will light up and the display will start adding time for that team.
If a GRE team occupies a point and a member of that team attaches the card to the reader, a buzzer sounds again, that team's LED lights up, RED's team time is paused, and team time counts. GRE, which occupied the point. If the card / key fob is attached by the organizer (referee), both times are paused until one of the teams inserts the card. This type of card is thus suitable for starting a break, but can also be used at the end of the game, when it is necessary to stop time to evaluate the game. There is still a fourth type of card in DOMINATOR - eraser, which pauses both times and resets to initial values as after starting the DOMINATOR stopwatch.
Used to restart the game, initialize a new game. The project is suitable for Airsoft events, sports facilities, or Airsoft teams, which can build the equipment. The advantage of the DOMINATOR system is that the system can be cloned and create X points with the same configuration via machine code, which can be fought independently in the game, while the RFID cards will work fully on all DOMINATOR devices. The system is tested, functional, easy to maintain. The NXP RC522 reader works at a frequency of 13.56MHz, registers RFID tags at approx. 3 centimeters (almost physical contact with the reader is required), compatible ISO / IEC 14443-A tag format.
The given tag standard also includes ISIC, bus cards, which function as NFC cards and can communicate their physical address - UID to a reader within range.
Hardware for the project - RFID DOMINATOR:
- Arduino Uno/Nano
- LCD character display 20x4
- I2C converter for LCD display
- RFID reader NXP RC522 (13.56MHz)
- Keychains / cards / wristbands compatible with standard ISO/IEC 14443-A
- 2x LED diodes
Step 1: How It Works From Hardware Side
Principle of hardware functionality:
The RFID reader RC522 communicates with the Arduino via the SPI bus. It reads the UID (identifier) of RFID cards in range, forwards this identifier to Arduino, which executes the program logic. The reader responds to the distance of the chip about 3 cm from the antenna.
Arduino compares the read card address in a multi-condition, applies digital states to diodes, runs a universal counter every 100ms (counts in tenths of a second), controls the counting of both times.The time is sent via the I2C bus to the 20x4 character display, where it is plotted. The display takes up to 30ms at an I2C bus speed of 100 kHz - Standard speed.Maximum time range that can be listed on the system: 99 hours, 59 minutes, and 59 seconds Consumption: approx. 110mAh with 5V power supply.
Convenient to power via power bank, charger from a phone with USB output. To specify an RFID DOMINATOR project: The project is suitable for teams, clubs, sports facilities, events.If RFID cards, bracelets or key fobs are color-coded, they are very easy and universally distributed to players.Tabs are easy to use for all ages. The chip is protected in a plastic case, it does not mind dirt, water ...Suitable for DOMINATION game modes, Capture Point (more than one DOMINATOR can be used in the game), a game mode that has a balanced number of players.The use is mainly for sports Airsoft, Paintball, Nerf Wars.
Step 2: PCB Design for RFID DOMINATOR
The PCB design envisages the use of the Arduino Nano board! PCB is double-sided with overlays, dimensions: 100x105mm PCB production in China PCBs can be made in Slovakia at PB Spoj , or in China - by machine production from GERBER files. One of the most popular and cheapest manufacturers is: JLCPCB. GERBER files can be uploaded directly as an archive, while the PCB is visualized, the layers it records are automatically set, the dimensions of the PCB are set.
Production takes 1-2 days. This manufacturer used to be famous for the action of producing 10 pieces of PCBs for $ 2. Today JLCPCB allows you to produce 5 pieces of this PCB for RFID DOMINATOR for 6.96 €, 10 pieces for 10.16 €. Transport - the cheapest alternative is available for 7.44 € up to DHL with delivery in 3-5 working days, while the cost of transport is 23.16 €. JLCPCB will automatically apply a discount coupon of € 8 for shipping, which will be assigned to you after registration.
Thus, with the cheapest shipping alternative with delivery within 25 days, this shipping is free with the first purchase. It is also possible to use other available manufacturers, for example: PCBWay, AllPCB, NextPCB, SeeedStudio, which have the technology for PCB production by machine method from GERBER files.
Pin headers in PCB design:
- 2x female pin-header
- 15-pin (for Arduino Nano)
- 1x female pin-header
- 8-pin (for RFID reader RC522)
- 1x female 90 ° pin-header 4-pin (for I2C LCD display converter 20x4)
Spacers in the design PCB:
- 4x spacer for character LCD display 20x4 (Ø max 2.5 mm)
- 2x spacer for RFID RC522 (Ø max 3.5 mm) Part dimensions:
- A PDF document with part dimensions is available: https://github.com/martinius96/Airsoft-DOMINATOR-RFID/blob/master/docs/pdf/Rozmery_SUCIASTOK.pdf
Step 3: Wiring Diagram - RFID DOMINATOR
Schematics from Autodesk Eagle software for RFID DOMINATOR
Step 4: Program for Retrieving UID of RFID Card Addresses for DOMINATOR
The program is used to retrieve identifiers (UID) of RFID tags, cards that will be used in the program for RFID DOMINATOR This is not source code for RFID DOMINATOR main app project! The card address is listed in the serial (UART) monitor - 9600 baud / s used. It's a good idea to save and overwrite the report in a clear .xls (EXCEL) document that makes it easier to manage the assigned RFID cards for specific teams and entities
You must import the MFRC522 library into your Arduino IDE to successfully load the source code to load UID cards. Download the RFID DOMINATOR project repository (referenced by the first link at the top of the page), copy the contents of the / src / folder (MFRC522 folder) to the / Arduino / libraries / folder (the path to the folder depends on where you have the Arduino IDE installed), most commonly in Documents / Program Files on older Windows operating systems.
Program is availableat: https://github.com/martinius96/Airsoft-DOMINATOR-RFID/blob/master/examples/GET_UID/GET_UID.ino
These UIDs of RFID cards can be used in main RFID DOMINATOR APP!
Step 5: DOMINATOR App
RFID DOMINATOR app source code and PCB designs available at: firstname.lastname@example.org