This is an old revision of the document!


Darts Game

Introduction

A smart darts game in which the throw of the dart is not needed. This is meant for people that want the fun of playing darts, without the risk of poking holes in the walls. I came up with this idea while looking for a darts game and realizing that I can just build it myself. The basic concept is that the “dart” you are holding while playing is plotting your throw on the board, by just analyzing the fake throw acceleration and angle. Once the throw is confirmed, the corresponding LED on the board lights up.

General Description

The project is split in 2 parts: The dart and The board:

The Dart

I am using an ESP32 for this since is has built-in wi-fi for wireless communication with my PC and Free_RTOS for light sleep functionality. The acceleration and gyroscopic angles are measured by a MPU6050, that has a motion detection interrupt available. Using the interrupt, I can just alert the board when a throw is in process. This way, my ESP can stand by in light sleep most of the time, preserving energy. When a throw is detected, the accelerometer reads data until it reaches maximum velocity, then the board sends the throw data to my PC via bluetooth. At the same time, a distance measurement protocol activates: the dart “syncs” with the board, using an infra red LED and a ultrasound distance measurement unit. The distance from the board is necessary for the trajectory calculation.

The Board

Since I only have one ESP board, I will be using my laptop to receive the data from the dart and transmit it along to my Arduino controlling the board, using UART. If needed, the PC can also process the data before sending it. For the visual feedback of the throw, I will be having 82 LEDs attached to the dart board. One for each segment. When the dart would hit a segment on the board, the corresponding LED lights up. I am multiplexing them by connecting a pair of antiparallel LEDs between each of the pins used. That way, with only 10 pins, I can control up to 90 LEDs, of which I will only be using 82

Hardware Design

Component Count PIN Role
ESP32 1 N/A Dart MCU: Wi-Fi data transmission to PC, FreeRTOS light sleep standby
MPU6050 1 E-GPIO21(SDA)/E-GPIO22(SCL) Measures dart acceleration & gyroscopic angles;triggers motion interrupt to wake ESP32
IR LED 1 A-GPIO13 Dart-side sync signal for distance measurement protocol
Ultrasound Sensor 2 E-GPIO16(Trig)/A-GPIO12(Echo) Measures dart-to-board distance for trajectory calculation
Arduino 1 N/A Board MCU: receives processed data from PC via UART, controls board mechanisms
LEDs 82 A-GPIO2→A-GPIO11 Board lighting: illuminate scored segments
LED Screen 1 A-SDA/A-SCL Displays score, game state, or throw feedback

Software Design

The firmware for both the ESP32 and the Arduino is developed using PlatformIO. The ESP32 runs on top of FreeRTOS, spending most of its time in light sleep until the MPU6050 motion interrupt signals a throw. Current libraries in use include the ESP-IDF GPIO and sleep drivers, a custom I2C driver, and the FreeRTOS task scheduler. Additional libraries will be integrated as the design progresses. The Arduino communicates with the PC through UART, receiving processed throw data and translating it into board actions.

Results

In this moment, only the dart is finished. It works as intended, as you can see in the clip provided on moodle. The dartboard n screen is a proof of concept written in python. It simulates the real life throw from a set distance and height. When the project will be in its final state, the virtual dartboard will be switched with the real one and the script will only handle data computation and transmition.

As for the Dartboard, it's still in the making. All of the LEDs have been soldered, and the connections are almost done. The result will be a matrix of multiplexed LEDs that light up when needed. The LED screen and distance sensors well be added after this step.

Code

The whole project code, including the Dart, the Handler and the Board can be found here.

Journal

Bibliography/Resources

Datasheets for ESP32, ATmega328, MPU6050 PM labs

pm/prj2026/jan.vaduva/dragos.ciobanu1706.1779652447.txt.gz · Last modified: 2026/05/24 22:54 by dragos.ciobanu1706
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0