DOMINATOR via Arduino for Airsoft / Paintball / Nerf Wars

Today, I'd like to introduce you to a nearly dusty project I once created for an Airsoft team. The requirement was to program the DOMINATOR via Arduino, which would be universal and meet the requirements that the correct DOMINATOR should have and slightly changed in terms of control.

What is DOMINATOR actually?
This is a device used to play the King of the Hill gaming mode, the King of the Hill (Point). The device should have a two-time display for both game teams. The one who gets the DOMINATOR gets pressed and the time starts to add to his team. (Both times are initially set to 00 hours, 00 minutes and 00 seconds). The time is added to the moment until the point is occupied by another team and the button does not change the amount of time added to your side. As far as I wanted to distinguish the project, I used an RFID reader that can read the cards and keyboards at 13.56MHz (there is an equivalent to 125kHz) and in this way we can replace the mechanical buttons.
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
How does the system work with the RFID reader instead of the mechanical buttons?
The RFID reader can read the cards and keychains at the aforementioned frequency at a distance of up to 3-5cm. Therefore, the physical presence of a member of the team is required. Each member of the team has a card or a key whose code is pre-recorded and stored in the program. Each code is assigned to the team.

The buzzer alert is also signaled by the buzzer that announces the change. The time will begin to be added to the team that the card or key has attached. In addition to the two teams, I also used special keyrings for the organizer, who can spend the time when the card is inserted, in the event of a player's complaint, interference, injury, or other situation in the game that could bring an advantage to another team. One more user is part of the system - eraser, which can reset and replace times at the same time.

For example, it is used for invalid game startup, invalid keyring (for example, a disabled player). The system is not limited by the number of team members, depending mainly on the memory intensity of running the program, because the whole system works with an internal timer - millis.
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
What hardware was used?

  • Steering Microcontroller - Arduino Nano for Prototype / Atmega328P for Finished Project
  • 2x LED diode - indication to which team is added time (blue / red)
  • 20x4 LCD Display - Real-time time display for teams
  • 2x relay - for connection of lights to 230V (SSR / elmg.) - for example at night -
  • 1x detector
  • 1x RFID reader RC522 at 13.56MHz
  • 12x cards / key chains (5x for teams, 1x organizer, 1x eraser)

Program Principle:
The program works with millis, which is the CPU time since it was turned on. At regular intervals, once every 0.01 seconds, system logic is performed to verify if a team is already adding time, if so, the time is counted and displayed, ie 100x is printed on the LCD display per second, ie 100x refresh / second. Using the 0.001 second interval, the system was inaccurate, and communication at 1000x refresh / second after the I2C bus on the display did not work correctly, as it was time to read the cards themselves. The RFID library for the RC522 reader can indicate the card's recording by activating the detector. Based on the result of verification via a simple if condition with the physical addresses, we activate a variable that works with time and has logic - tenths, seconds, minutes and hours.

There are two subroutines in the system that are bool variables. Each bool variable is for one team. If set to true, the logic for that given team will be executed. If a key ring of the same team is attached, nothing will change. If a key ring is attached to another team, bool for the computer whose time the computer will change to false and for the one who starts counting the time to true. If the key is added by the organizer, both bool variables are set to false. Values - seconds, minutes, and hours are stored in dynamic global variables that work with true boolean values. If the keypad attaches the eraser, both bool variables are set to false and all global variables are set to 0.
Vitalisation of variables:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
Converting a loaded card to a unique shape in the DEC shape + turning on the buzzer at 4kHz for 1s:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
Card Logic Snippet for Team 1 - its bool variable set to true:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
System logic running every 10ms:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
System Logic for First Team:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
Draw Results on Display:
DOMINATOR cez Arduino pre Airsoft / Paintball / Nerf Wars
What is the maximum time range of the system?
The maximum time range for the current position setting on the LCD is a maximum range of 99 hours, 59 minutes, 59 seconds. In fact, the system can run for almost 50 days until millise run.

Who is the system suitable for?
The system is suitable for teams, amateur players who want to admire the game, as well as several-day Fort Benning events, the opportunity to use in both indoor and outdoor spaces, also suitable for the Airsoft / Paintball sports facility. Address setting and the program is uploaded only once and it works continuously until the player is "responsible" when ... They will soon destroy .. The whole system can be installed on the PCB. The size depends mainly on the display used, it can be used 20x4 as the photo above or 16x2, which can significantly reduce the resulting PCB dimension.

Something from testing: - the principle of functionality
Video: https://www.youtube.com/watch?v=cx90uJY1UUM
Wiring Arduino pin -> Peripherals (compatible for R3 boards + Nano)

Arduino and interfacing with LCD with I2C converter
A4 -> SDA
A5 -> SCK / SCL
5V -> Vcc
GND -> GND

Arduino and connection with the RC522 reader
3.3V -> 3.3V
GND -> GND
D9 -> RST
D10 -> CS
D11 -> MOSI
D12 -> MISO
D13 -> SCK

Arduino and the detector interconnection - in the case of a 3-pin need to bring another 5V from Arduin
D5 -> INPUT
GND -> GND

Arduino and LED + relay
5V -> 5V relay
GND -> GND
D3 -> Anode diode + relay IN2
D4 -> Anode diode + relay IN1

Libraries:
RFID - https://github.com/miguelbalboa/rfid
I2C for LCD - https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library

If you are interested in the project, please visit my site where you can learn more about the project: https://arduino.php5.sk/airsoft-dominator.php
The aim of the article was to show the use of Arduin as a game element - DOMINATORA for extreme sports such as Airsoft, Paintball, Nerf Wars.

Comments

Popular posts from this blog

Web scraper via Arduino & NodeMCU & ESP32

ESP32 control via UDP datagrams

Biking on Google Maps - Arduino Leonardo (32u4) - HID device