Arduino-Boombox

# ๐ŸŽต Arduino Boombox ### A Retro-Inspired Portable MP3 Player Built with Arduino [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](https://opensource.org/licenses/MIT) [![Arduino](https://img.shields.io/badge/Arduino-Uno-00979D?style=for-the-badge&logo=arduino&logoColor=white)](https://www.arduino.cc/) [![Made with Love](https://img.shields.io/badge/Made%20with-%E2%9D%A4%EF%B8%8F-red?style=for-the-badge)]() [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com) **A fully menu-driven, standalone MP3 player with OLED display, physical buttons, and real-time volume controlโ€”all powered by Arduino.** [Features](#-features) โ€ข [Quick Start](#-quick-start) โ€ข [Hardware](#-hardware) โ€ข [Contributing](#-contributing)

โœจ Features

๐ŸŽถ **MP3 Playback** Play music from microSD card via DFPlayer Mini ๐Ÿ“ **Folder Browser** Organize songs by genre or playlist ๐Ÿ–ฅ๏ธ **OLED Display** 0.96" screen with animated waveform ๐ŸŽ›๏ธ **Physical Controls** 4 navigation buttons + volume knob ๐Ÿ”Š **Real-Time Volume** Analog potentiometer control โญ๏ธ **Auto-Advance** Automatically plays next track ๐Ÿ”„ **Reset Function** Button combo for quick restart โšก **USB Powered** Portable with power bank support

๐Ÿค” Why Arduino Boombox?

In an era of streaming services and smartphone apps, thereโ€™s something special about a physical music player you built yourself.

The Motivation

This project brings back the joy of dedicated music players while teaching valuable electronics and programming skills. Itโ€™s nostalgia meets modern DIY culture. ๐Ÿ“ป


๐Ÿš€ Quick Start

Prerequisites

Hardware:

Software:

Installation

1. Clone the repository

git clone https://github.com/HimC29/Arduino-Boombox.git
cd Arduino-Boombox

2. Install Arduino libraries

Open Arduino IDE โ†’ Tools โ†’ Manage Libraries, then install:

3. Prepare your microSD card

# Format to FAT32
# Copy MP3 files to the root directory
# Files should be named: 001.mp3, 002.mp3, etc.

# Optional: Use the provided Python script to sort files
python sort_mp3_files.py /path/to/sd/card

4. Wire the components

See the Hardware Connections section below

5. Upload the code

6. Power up and enjoy! ๐ŸŽ‰


๐Ÿ”ง Hardware

Components List

Component Quantity Notes
Arduino Uno 1 Or compatible board
DFPlayer Mini 1 MP3 decoder module
OLED Display 1 0.96โ€ I2C (SSD1306, 0x3C)
Push Buttons 4 Momentary tactile switches
Potentiometer 1 10kฮฉ linear
Speaker 1 8ฮฉ 3W
microSD Card 1 Any size, FAT32 format
Resistors 4 10kฮฉ (optional, for buttons)

๐Ÿ”Œ Hardware Connections

Buttons (INPUT_PULLUP)

Button   โ†’  Arduino Pin
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Back     โ†’  D2
Up       โ†’  D3
Down     โ†’  D4
Center   โ†’  D5

DFPlayer Mini

DFPlayer  โ†’  Arduino
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
TX        โ†’  D10
RX        โ†’  D11
VCC       โ†’  5V
GND       โ†’  GND
SPK+      โ†’  Speaker +
SPK-      โ†’  Speaker -

OLED Display (I2C)

OLED  โ†’  Arduino
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
VCC   โ†’  5V (or 3.3V)
GND   โ†’  GND
SDA   โ†’  A4
SCL   โ†’  A5

Potentiometer

Potentiometer  โ†’  Arduino
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Signal (middle) โ†’  A0
VCC (side)      โ†’  5V
GND (side)      โ†’  GND

๐ŸŽฎ How to Use

Button Action
Up Move up in menu / Previous song
Down Move down in menu / Next song
Center Enter folder / Play song / Pause/Resume
Back Return to previous menu
Potentiometer Adjust volume in real-time

Reset Function

Hold Up + Down simultaneously for 1.5 seconds to access the reset menu:


๐Ÿ“‚ Music Organization

Songs are organized into folders by genre:

Each folder maps to a specific track range on your microSD card. Customize folder names and ranges in the code to match your music library!

File Naming Convention

001.mp3  โ† First song
002.mp3
003.mp3
...
100.mp3
101.mp3

โš ๏ธ Important: DFPlayer reads files by upload order, not filename. Use the provided Python script to ensure correct ordering.


๐Ÿ’ป Software Architecture

Key Features

Libraries Used


๐Ÿค Contributing

Contributions are what make the open-source community such an amazing place! Any contributions you make are greatly appreciated.

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
    
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
    
  4. Push to the Branch
    git push origin feature/AmazingFeature
    
  5. Open a Pull Request

Ideas for Contributions


๐ŸŒŸ Contributors

Thanks to everyone who has contributed to Arduino Boombox!

Want to see your name here? Check out the Contributing section!


๐Ÿ› Troubleshooting

No sound from speaker

OLED display not working

Songs play in wrong order

Volume control not working


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

TL;DR: You can use, modify, and distribute this project freely. Just keep the original license notice.


๐Ÿ™ Acknowledgments

Built with amazing open-source tools and libraries:


### โญ Star this repo if you build one! **Made with โค๏ธ by [HimC29](https://github.com/HimC29)** [Report Bug](https://github.com/HimC29/Arduino-Boombox/issues) โ€ข [Request Feature](https://github.com/HimC29/Arduino-Boombox/issues) โ€ข [Show Your Build](https://github.com/HimC29/Arduino-Boombox/discussions)