I Turned an Old DVD Player Into a Pinball Machine đŸ¤¯

by ztr0nics in Circuits > Arduino

1284 Views, 5 Favorites, 0 Comments

I Turned an Old DVD Player Into a Pinball Machine đŸ¤¯

#arduino Pinball Machine from SCRAP! đŸ•šī¸ (and it's impossible) #diy

I turned an old DVD display into a mini pinball machine with spinning animations, sound effects and real-time scoring.


This project combines:

- A TM1628 LED display (from a DVD player)

- Servo motors as flippers

- LEDs and buzzer for feedback

- A custom scoring system with wave animations and spinning disc effect


Every hit triggers:

→ Sound effects

→ LED flash

→ Spinning disc animation

→ Score increase with visual wave effect


It's a simple but very satisfying DIY electronics project with strong visual feedback — perfect for beginners and advanced makers.


Watch the video to see it in action!

Supplies

Captura de ecrã 2026-04-16 230254.png
Captura de ecrã 2026-04-16 230318.png

- Arduino Uno (or compatible) -> Amazon

- TM1628 display module (from DVD player)

- 2x Servo motors (SG90 or similar)

- 6x LEDs

- 6x resistors (220Ί recommended)

- 1x Buzzer

- 2x Push buttons

- Jumper wires

- Breadboard (optional)

- Power supply (5V)

- Power supply (9V) only to servos


Some links in this project may be affiliate links. This means I may earn a small commission at no extra cost to you.

PIN CONNECTIONS

20260416_222442.jpg

TM1628 Display:

- DATA → Pin 7

- CLOCK → Pin 6

- STROBE → Pin 8


Servos:

- Left Servo → Pin 9

- Right Servo → Pin 10


Buzzer:

- Pin 11


Buttons:

- Left Button → Pin 2

- Right Button → Pin 3


LEDs:

- Connected to A1, A2, A3, A4, A5 and Pin 12 (with resistors)

HOW IT WORKS

Captura de ecrã 2026-04-16 223415.png

The system works like a mini pinball machine:


1. Random LEDs light up as targets

2. When you press a button:

- A servo moves like a flipper

- A sound effect plays

- LEDs flash

- The score increases


3. The display shows:

- A spinning disc animation (DVD-style)

- A wave animation on the score

- Combo effects at certain score values


4. The game gets faster over time, increasing difficulty.

CODE

Captura de ecrã 2026-04-16 230152.png

Upload the following code to your Arduino.

Make sure you install the TM1628 library before uploading.


#include <TM1628.h>
#include <Servo.h>

// ---------------- DISPLAY ----------------
#define DATA_PIN 7
#define CLOCK_PIN 6
#define STROBE_PIN 8

TM1628 display(DATA_PIN, CLOCK_PIN, STROBE_PIN);

// ---------------- LEDS ----------------
int leds[] = {A1, A2, A3, A4, A5, 12};

// ---------------- BUZZER ----------------
int buzzer = 11;

// ---------------- BUTTONS ----------------
int btnLeft = 2;
int btnRight = 3;

// ---------------- SERVOS ----------------
Servo servoLeft;
Servo servoRight;

// ---------------- GAME LOGIC ----------------
int currentLed = -1;
unsigned long lastChange = 0;
int speed = 400;

// ---------------- SCORE ----------------
int score = 0;
unsigned long lastScoreTime = 0;
int scoreStep = 1;

// ---------------- DISCO / VISUAL EFFECTS ----------------
byte discoEnd[] = {1, 3, 11, 13, 7, 9};
int discoFrame = 0;
unsigned long discoTime = 0;
int discoSpeed = 90;

// ---------------- NUMBERS (7-Segment Mapping) ----------------
const byte numbers[] = {
0b00111111, 0b00000110, 0b01011011, 0b01001111,
0b01100110, 0b01101101, 0b01111101, 0b00000111,
0b01111111, 0b01101111
};

void setup() {
display.begin(true, 7);
clearAll();

for(int i=0; i<6; i++) pinMode(leds[i], OUTPUT);

pinMode(buzzer, OUTPUT);
pinMode(btnLeft, INPUT_PULLUP);
pinMode(btnRight, INPUT_PULLUP);

servoLeft.attach(9);
servoRight.attach(10);

servoLeft.write(20);
servoRight.write(160);

randomSeed(analogRead(A0));
}

void loop() {
// Random LED logic
if(millis() - lastChange > (unsigned long)speed){
lastChange = millis();

for(int i=0; i<6; i++) digitalWrite(leds[i], LOW);

currentLed = random(0, 6);
digitalWrite(leds[currentLed], HIGH);

speed = max(120, speed - 1);
}

// Input Handling
if(digitalRead(btnLeft) == LOW){
flipperAction(true);
}

if(digitalRead(btnRight) == LOW){
flipperAction(false);
}

runDisco();
}

// ---------------- FLIPPER ----------------
void flipperAction(bool left){
if(left){
servoLeft.write(70);
delay(60);
servoLeft.write(20);
} else {
servoRight.write(110);
delay(60);
servoRight.write(160);
}

hitEffect();
addScore();
}

// ---------------- HIT EFFECT ----------------
void hitEffect(){
digitalWrite(leds[currentLed], LOW);

for(int f = 1000; f < 2000; f += 150){
tone(buzzer, f, 10);
delay(5);
}

for(int i=0; i<6; i++) digitalWrite(leds[i], HIGH);
delay(40);
for(int i=0; i<6; i++) digitalWrite(leds[i], LOW);
}

// ---------------- SCORE ----------------
void addScore(){
if(millis() - lastScoreTime < 200) return;
lastScoreTime = millis();

score += scoreStep;
if(score > 9999) score = 0;

// Progression: Increase points per hit every 10 points
if(score % 10 == 0 && scoreStep < 5){
scoreStep++;
}

discoSpeed = max(50, 90 - score);

discoWaveEffect();
numberWaveEffect(score);
comboEffect();
}

// ---------------- DISCO ANIMATION ----------------
void runDisco(){
if(millis() - discoTime >= (unsigned long)discoSpeed){
discoTime = millis();

for(int i=0; i<6; i++){
setIcon(discoEnd[i], 0);
}

setIcon(discoEnd[discoFrame], 2);

discoFrame++;
if(discoFrame >= 6) discoFrame = 0;
}
}

// ---------------- DISCO WAVE EFFECT ----------------
void discoWaveEffect(){
for(int i=0; i<6; i++){
setIcon(discoEnd[i], 2);
tone(buzzer, 1200 + i*120, 10);
delay(12);
}

for(int i=5; i>=0; i--){
setIcon(discoEnd[i], 0);
delay(10);
}
}

// ---------------- NUMBER WAVE EFFECT ----------------
void numberWaveEffect(int value){
int d1 = value % 10;
int d2 = (value / 10) % 10;
int d3 = (value / 100) % 10;
int d4 = (value / 1000) % 10;

byte digits[4] = {d1, d2, d3, d4};

for(int seg=0; seg<7; seg++){
byte val = 0;

if(bitRead(numbers[digits[0]], seg)) val += 1;
if(bitRead(numbers[digits[1]], seg)) val += 2;
if(bitRead(numbers[digits[2]], seg)) val += 128;
if(bitRead(numbers[digits[3]], seg)) val += 4;

display.setSegments(val, seg);
delay(18);
}
}

// ---------------- COMBO EFFECTS ----------------
void comboEffect(){
if(score % 50 == 0){
// đŸ’Ĩ Explosion effect
for(int i=0; i<3; i++){
display.setSegments(255, i);
}
tone(buzzer, 2500, 100);
delay(120);
clearAll();
}
else if(score % 20 == 0){
// ⚡ Strong flash
display.setSegments(255, 0);
display.setSegments(255, 1);
tone(buzzer, 2000, 80);
delay(80);
}
else if(score % 10 == 0){
// ✨ Light flash
display.setSegments(255, 0);
tone(buzzer, 1500, 50);
delay(50);
}
}

// ---------------- LOW LEVEL COMMUNICATION ----------------
void sendRawCommand(byte cmd) {
digitalWrite(STROBE_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, cmd);
digitalWrite(STROBE_PIN, HIGH);
}

void setIcon(byte address, byte value) {
sendRawCommand(0x44);
digitalWrite(STROBE_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 0xC0 + address);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, value);
digitalWrite(STROBE_PIN, HIGH);
}

// ---------------- CLEAR DISPLAY ----------------
void clearAll() {
for (int i = 0; i <= 20; i++) {
display.setSegments(0x00, i);
}

sendRawCommand(0x40);
digitalWrite(STROBE_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 0xC0);
for (int i = 0; i < 16; i++) shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 0x00);
digitalWrite(STROBE_PIN, HIGH);
}

BUILDING THE PINBALL

20260416_224238.jpg

- Mount the servos on each side to act as flippers

- Position the LEDs as targets

- Place the buttons where you can easily press them

- Secure the DVD display in a visible position


You can use cardboard, wood, or 3D printed parts for the structure.

GAMEPLAY

Captura de ecr&atilde; 2026-04-16 230032.png

Press the buttons to activate the flippers.


Each hit triggers:

- Sound effect

- LED feedback

- Spinning disc animation

- Score increase


At higher scores:

- The disc spins faster

- Visual effects become more intense

VISUAL EFFECTS

Captura de ecr&atilde; 2026-04-16 230858.png

This project includes several visual effects:


- Spinning DVD-style disc animation

- Wave animation on score digits

- Combo flashes (10, 20, 50 points)

- Synchronized sound + light feedback


These effects make the project highly engaging and visually satisfying.

IMPROVEMENTS

Captura de ecr&atilde; 2026-04-16 225935.png

Possible upgrades:


- Add real collision detection (only score when hitting targets)

- Add combo multiplier system

- Use a larger display or OLED

- Add ball tracking sensor

- Improve enclosure design


You can turn this into a full arcade-style game!

VIDEO

I Built a Mini Pinball with Servos đŸ˜ŗ #arduinoproject #games
I Turned an Old DVD Display Into a Pinball Machine đŸ¤¯

Check out the video to see the full effect in action!

FINAL

I Turned an Old DVD Display Into a Pinball Machine đŸ¤¯

If you liked this project, consider liking and sharing it!


If you want to build this project, check the parts here:

- Arduino Uno (or compatible) Kit -> Amazon

- 2x Servo motors (SG90 or similar) -> Amazon


Some links in this project may be affiliate links. This means I may earn a small commission at no extra cost to you.


Let me know in the comments if you want the next version with real scoring logic 😈


See the Hackster version for schematic, code, and extra build details.