Johan
Published © MIT

LED Tennis

An LED-based 1-2 player game with several different game modes.

IntermediateShowcase (no instructions)3,543
LED Tennis

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
WS2812 LED Strip (1m, 60 LEDs)
×1
Resistor 220 ohm
Resistor 220 ohm
×1
SSD1306 128x32 OLED Display
×1
Red push button
×3
Black push button
×2
Power button
×1
18650 3.7V 2000mAh Li-Po battery cell
×1
Boost/charge/control circuit for Li-Po battery
×1
USB A to USB mini (1.5m)
×1
Wire, a bunch
×1
70x50mm plastic case
×2
Semi-transparent plastic tube, ⌀25mm, 1.5m
×1
M2x10mm screw
×2
M2 nut
×4

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

LED Tennis schematics

Simple sketch showing how to wire up the LED Tennis game. When working with LED strips like this it can be a good idea to add a capacitor between it and the power supply (to account for any dips in the power supply), but since I’m working off a battery I tested this first and it didn’t work very well. The capacitor would simply take too much of the charge from the battery to be able to power the Arduino, so I left it out of the design.

In the schematic, the components grouped in the lower right (battery, power button, player 2 button, resistor and LED strip) are housed in one of the plastic boxes and the rest in the other. To keep voltage drop to a minimum the LED strip starts by the battery box rather than the box housing the microcontroller.

To power the whole setup I took a small USB power bank (5V, 2000mAh) and opened it up. This was the kind of power bank you get for free from magazine subscriptions and such. Inside I found an 18650 Li-Po cell and a small boost/charge/control circuit. Perfect! Using this meant that I could use a regular (but slightly altered/butchered) USB cable to power the Arduino Nano directly through the USB port. No soldering needed (on the board anyway) and no need to make sure that I’ve got the correct voltage going to VIN. Yay. 5V also happens to be exactly what the LED strip needs, so two birds in one horse’s mouth.

Code

LED Tennis

The actual code is on Codeberg, but Hackster doesn't allow linking to there...

Credits

Johan

Johan

0 projects • 5 followers
Tinkerer that loves to build.

Comments