Skip to content

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

Cart

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.

  1. Connect your speaker to the Pi's 3.5mm jack or USB sound card.
  2. Run: sudo raspi-config
  3. Navigate to System Options → Audio and select your output device.
  4. Test audio: speaker-test -t sine -f 1000 -l 1
  5. 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.

  1. Install required packages: sudo apt-get update && sudo apt-get install pulseaudio pulseaudio-module-bluetooth bluez
  2. Add user to Bluetooth group: sudo usermod -a -G bluetooth pi
  3. Reboot: sudo reboot

You should see

Bluetooth services are running.

Pair with smartphone

About 15 minutes

Make Pi discoverable and pair a device.

  1. Run bluetoothctl to enter Bluetooth control mode.
  2. Type: power on
  3. Type: discoverable on
  4. Type: pairable on
  5. Type: agent on
  6. Type: default-agent
  7. On your phone, search for Bluetooth devices and select 'raspberrypi'.
  8. 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.

  1. Edit PulseAudio config: sudo nano /etc/pulse/default.pa
  2. Ensure these lines are present: load-module module-bluetooth-discover
  3. Restart PulseAudio: pulseaudio -k && pulseaudio --start
  4. Connect your phone and play music.
  5. 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.

  1. Connect a USB battery pack (10,000mAh+ recommended) to the Pi.
  2. Test runtime (should get 4-8 hours depending on battery size).
  3. 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.