Introduction: Turn Any Speaker Into a Bluetooth Speaker

This project will transform any speaker (with a jack cable) into a Bluetooth speaker. It could be really useful to re-use an old hi-fi system like what I've done or simply add the Bluetooth to your recent speaker. Hoping you will like it.

Supplies

You will need:

-a raspberry pi (I use a raspberry pi 3 but it also works with any version with wifi, Bluetooth and a female jack).

-a micro-sd card (minimum 8gb)

-an old (or not) speaker with a jack cable

Step 1: Install Raspbian (lite) on the Raspberry Pi

-You will need to install raspberry pi imager (https://www.raspberrypi.com/software/)

-Connect the micro-SD card to the computer

-Click on "choose us"; "Raspberry pi OS (Other)"; "Raspberry pi OS Lite"

-Select the your SD card, click on "WRITE" and wait until it finish

Step 2: Set Up the Wifi and SSH Connections

-Open your file manager ; go in the "boot" part of your micro sd card

-Create a new file ; rename it "ssh" ; delete the ".txt"

-Create another file: name it: "wpa_supplicant.conf"

-Open the file and paste:

country=FR
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

network={

ssid="Your SSID"

scan_ssid=1

psk="Your password"

key_mgmt=WPA-PSK }

-Change the country (FR=France), the SSID(name of the wifi), the password and the key_mgmt (encrypted system) (if you didn't know what it is for your wifi, check on the box, it is written on it) according to your wifi.

Now, you must have the two files (picture 3) in the folder (picture 1) with the other files.

Step 3: Connect to the Raspberry Pi in SSH

For this step, you will need to install PuTTy (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)

-With a phone connected to the same wifi, install the application "fing" (easily findable on the app store and play store)

-Connect the sd card into the raspberry pi; plug the raspberry pi with a correct alimentation.

-On "Fing", click on the blue button (picture 1) and wait until the scan finish.

-In the list, find "raspberry-pi"(the name can change, but will be easily recognizable) and note the IP address.

-In PuTTy, type the IP address in the case under "Host Name", select the port 22, ssh as connection type and click "open". You will see something like picture 3.

-Type "pi" and click enter for the login. The default password is "raspberry" (it didn't appear on the screen when you type it but it still works).

-It is recommended to change the password, for this, just type "passwd", click enter and follows the instructions.

Step 4: Install the Raspberry Pi Audio Receiver Project (from Nicokaiser)

Now, we can install the project of nicokaiser, (github link of the project: https://github.com/nicokaiser/rpi-audio-receiver)...

-Paste these lines one by one on the command prompt open just before; click "enter" after each line:

wget -q https://github.com/nicokaiser/rpi-audio-receiver/...
unzip main.zip

rm main.zip

cd rpi-audio-receiver-main

./install.sh

-With the last line, it will ask you the name you want to give to your speaker. Type the one you want and click "enter".

-Then, the installation will ask the option you want. Write "y" to the first question "Bluetooth Audio (BlueAlsa)" and click enter. And then always answer "N".

-Once the installation finish, write "sudo reboot" and click 'enter'.

-It will disconnect you. Wait 45 seconds and reconnect yourself by following the same step of connection than in step 3.

Step 5: Set Up the Speaker

Once reconnected, you can connect your speaker to the female jack port of the raspberry pi. Then:

-Type "sudo raspi-config" and click enter.

You will have a menu who will appear (picture 2).

-Click "enter" to go in the System Options; use the down arrow to select "Audio" and click "enter again".

-Select "0 Headphones" and click "enter"

You can leave this menu by clicking two times on the right arrow to select finish and then "enter".

-When you will test the sound of the speaker, you will be allows to set up his sound. For this:

-Type "alsamixer" and "enter".

-Choose the best settings with the arrows.

-Type "sudo reboot" again

Step 6: Connect to the Speaker

You can now connect your phone or anything else in Bluetooth with it, it will appear with the name you choose.

I hope this could be useful for you,

Thank you,

bye.

Step 7: Bonus: Connect It With Your Google Home to Control Your Speaker With Your Voice

If you want, you can connect it with your google home speaker. For this:

In the google home app, select your google home speaker and click on the setting button. Select 'audio', 'default speaker', 'associate a bluetooth speaker' and connect your new bluetooth speaker.

You can now control it with your voice!

Audio Challenge

Participated in the
Audio Challenge