Build a Portable Bluetooth Speaker
Create your own portable speaker using Raspberry Pi with Bluetooth audio streaming and battery power.
- Raspberry Pi
- Intermediate
- 90 minutes
- 5 steps
Shop this project
CartYou'll need
Raspberry Pi 5 8GB Board Only$175.00
Raspberry Pi 27W USB-C Power Supply For Raspberry Pi 5Black$14.46
Micro SD Card Preloaded Raspberry Pi OS (Legacy-32 Bit)16GBSold out · view product
Prices from vilros.com. Tax and shipping at checkout.
Before you start, you'll need
- Raspberry Pi (any model with Bluetooth or USB)
- USB sound card or audio HAT
- Speaker (powered or amplified)
- Portable battery pack
- 3.5mm audio cable or USB Bluetooth adapter
Configure audio output
About 15 minutes
Set up Raspberry Pi audio system.
- Connect your speaker to the Pi's 3.5mm jack or USB sound card.
- Run: sudo raspi-config
- Navigate to System Options → Audio and select your output device.
- Test audio: speaker-test -t sine -f 1000 -l 1
- Adjust volume with alsamixer.
You should see
You hear a test tone from the speaker.
Install Bluetooth audio software
About 20 minutes
Set up PulseAudio and Bluetooth pairing.
- Install required packages: sudo apt-get update && sudo apt-get install pulseaudio pulseaudio-module-bluetooth bluez
- Add user to Bluetooth group: sudo usermod -a -G bluetooth pi
- Reboot: sudo reboot
You should see
Bluetooth services are running.
Pair with smartphone
About 15 minutes
Make Pi discoverable and pair a device.
- Run bluetoothctl to enter Bluetooth control mode.
- Type: power on
- Type: discoverable on
- Type: pairable on
- Type: agent on
- Type: default-agent
- On your phone, search for Bluetooth devices and select 'raspberrypi'.
- Confirm pairing code if prompted.
You should see
Your phone is paired with the Raspberry Pi.
Configure PulseAudio for streaming
About 20 minutes
Route Bluetooth audio to speakers.
- Edit PulseAudio config: sudo nano /etc/pulse/default.pa
- Ensure these lines are present: load-module module-bluetooth-discover
- Restart PulseAudio: pulseaudio -k && pulseaudio --start
- Connect your phone and play music.
- Audio should stream from phone to Pi to speaker.
You should see
Music from your phone plays through the speaker.
It didn't work
No audio output.
Check speaker connection and volume levels. Verify PulseAudio is running: ps aux | grep pulse. Restart if needed.
Make it portable
About 20 minutes
Power the system with a battery.
- Connect a USB battery pack (10,000mAh+ recommended) to the Pi.
- Test runtime (should get 4-8 hours depending on battery size).
- Optional: Add a case or enclosure to hold Pi, battery, and speaker together.
You should see
The speaker runs on battery power.
What to do next
Stuck? Contact Vilros Support with your board model and what you see on screen.