Automatic Single Player Table Tennis Score Counter

by KesavaR4 in Circuits > Arduino

538 Views, 0 Favorites, 0 Comments

Automatic Single Player Table Tennis Score Counter

Device with score.JPG

Table tennis is a sport played by numerous people all around the world. In order to get better, I designed an automated score counter which calculates and displays a score based on the number of consecutive balls and the average speed with which the player had kept the ball bouncing on the table. This project aids me in improving my table tennis skills as it motivates me to aim for a higher score which could be done if both my speed and accuracy, making sure the ball lands on the table, are improved.

Supplies

_MG_4852.JPG

Tools:

  • Flathead screwdriver

Materials:

  • Arduino Uno board
  • Arduino Uno programming cable.
  • Male to male jumper cables
  • Sound Detection Sensor Module
  • Arduino Uno board screw shield
  • Computer or Laptop with Arduino IDE installed.
  • LCD display shield.
  • USB port wall adaptor.

Circuit and Construction

_MG_4856.JPG
TT score counter schematic.jpg

Firstly, the screw shield is mounted on the Arduino board as shown in Figure 1. Secondly, the LCD shield is mounted on top of the screw shield and finally, the sound detector sensor is connected to the mainboard to the screw shield as shown in the circuit diagram.

Uploading the Code

Code upload.jpg

Clone the Github directory, given below, containing the code into your local directory and upload the "TTScoreCounterLcd.ino" to your Arduino UNO board.

Github code link.

Testing and Tuning

Important parameters.jpg

The program already comes with pre-defined time threshold values which are used for debouncing the input signal and also for resetting the score counter. Tune the potentiometer on the sound sensor board so that the green signal LED is only lit when the TT ball strikes the board. The sensor board should be located as near to the Table Tennis board as possible so as to ensure maximum signal detection accuracy by the sensor board.

However, if you want to get your hands dirty or if you are not satisfied with the software tuning I have done, then I would suggest you try experimenting by changing the "DefaultCountWeight", "DefaultfreqWeight", "DefaultTimeThreshold" and the "debounceThreshold" constants in the "TTScoreCounter.cpp" program file.

Working

Device Backside.JPG
Device Front.JPG
Device Intial pic.JPG
Device with name.JPG
Sensor mounted on table.JPG
_MG_4858.JPG

The sound of the table tennis hitting the board is first captured by the mic as a raw signal and consequently, this analog signal is converted to digital with the help of the op-amp present on the sensor board. This information is relayed to the Arduino board as a digital signal going from High to Low, 5v to GND. The software in the board detects this change in signal via pin change interrupts and increment the score seen on the LCD display by an amount determined by how fast the user hits the ball. If the user misses a ball during a session, then the counter resets the score to zero.



Place the Arduino with the shield on top of the board which is in the vertical position using hot glue on the backside of it.

Plug the wall adaptor into a suitable socket and plug the Arduino programming cable into the USB socket on the board to power the microcontroller and the sensor.

Possible Future Improvements and Possible Alternatives

  • A pressure sensor instead of the sound detector sensor could be used for improved accuracy.
  • An analog sound sensor could be used for getting raw sound values which could then be analyzed by using tools like Fast Fourier Transform (FFT) and/or Wavelet transform to accurately differentiate the sound of the ball striking the board from other external sounds.