ESP32 as Bluetoothg/Spotify Connect receiver
-
- Posts: 3
- Joined: Tue Aug 21, 2018 11:26 am
ESP32 as Bluetoothg/Spotify Connect receiver
Hi guys,
I am Freddie from Germany! To introduce me: I am 16 years old, interested in electronics and love being outdoors. Might be enough at first. Though another hobby of mine is building speakers and recently I built a portable boombox. This means: I bought loudspeakers, calculated a frequency crossover, designed a layout for an amplifier and ordered 10 of them at jlpcb.com. Then I bought all the components and amplifier chips (TDA7377) and soldered everything together. The enclosure was made out of self cut MDF. After a paint of white, my girlfriend painted a wonderful pattern on it. All in all: a very beautiful speaker with about 30 Watts rms, 15Ah battery and a volume knob. Though it only has Aux (Cinch) as connection which sucks in the time of today. So I found some old things from a Music chair, which is a 16bit DAC which can easily play sound from USB Sticks. So I desoldered the necessary parts and built a 12V to 5V powersupply to power it. Works great, even with controls! Though also USB is not enough. And there the ESP32 should come into play. A bluetooth connection to my mobile phone should play the sound to my speaker. The problem: I am absolutely new to arduino etc. In my internship I played a bit with different sensors and motors to steer a sort of car, but that is not enough by far (as got my first impression during reading). So the actual plan:
ESP32 in Boobox -> plays music digitally from BT or Wifi (Spotify Connect if possible) to USB connection of my DAC -> converts to AUX -> Amp ...
Is that even possible? I ordered two of them yesterday to have one built in and have another one to test things or do other cool stuff. Can anybody give me a hint to start? Or something to read? I'd be happy about any help.
Thank you guys!
Greetings from Germany
Freddie
I am Freddie from Germany! To introduce me: I am 16 years old, interested in electronics and love being outdoors. Might be enough at first. Though another hobby of mine is building speakers and recently I built a portable boombox. This means: I bought loudspeakers, calculated a frequency crossover, designed a layout for an amplifier and ordered 10 of them at jlpcb.com. Then I bought all the components and amplifier chips (TDA7377) and soldered everything together. The enclosure was made out of self cut MDF. After a paint of white, my girlfriend painted a wonderful pattern on it. All in all: a very beautiful speaker with about 30 Watts rms, 15Ah battery and a volume knob. Though it only has Aux (Cinch) as connection which sucks in the time of today. So I found some old things from a Music chair, which is a 16bit DAC which can easily play sound from USB Sticks. So I desoldered the necessary parts and built a 12V to 5V powersupply to power it. Works great, even with controls! Though also USB is not enough. And there the ESP32 should come into play. A bluetooth connection to my mobile phone should play the sound to my speaker. The problem: I am absolutely new to arduino etc. In my internship I played a bit with different sensors and motors to steer a sort of car, but that is not enough by far (as got my first impression during reading). So the actual plan:
ESP32 in Boobox -> plays music digitally from BT or Wifi (Spotify Connect if possible) to USB connection of my DAC -> converts to AUX -> Amp ...
Is that even possible? I ordered two of them yesterday to have one built in and have another one to test things or do other cool stuff. Can anybody give me a hint to start? Or something to read? I'd be happy about any help.
Thank you guys!
Greetings from Germany
Freddie
-
- Posts: 45
- Joined: Wed Nov 15, 2017 9:07 pm
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Hi Freddie,
I also looked into making a Spotify Connect receiver and have a few hints for you:
Best regards,
Paul
I also looked into making a Spotify Connect receiver and have a few hints for you:
- First this is not really outdoor friendly because the ESP would need direct internet access for Spotify Connect and therefore you need a mobile access point. This is possible with your mobile but very battery hungry.
- The Spotify Connect protocol has been implemented in Rust here https://github.com/plietar/librespot. You would need to port this to C/C++ in order to make it work on the ESP and most likely rewrite the audio backend to output to some I2S DAC chip. Rust might be compilable for the ESP in the future if the LLVM backend for the Xtensa architecture gets finished.
- Depending on the audio quality you are expecting and the work you are willing to do you can use the A2DP sink of the ESP32 and combine it with a I2S sound chip. If you need demo hardware you could use https://www.tindie.com/products/microwa ... esp32-adb/ for example (PM me if you want to go this route, I have one of those boards lying around here in Germany).
- If you want to go easy on yourself you can use a ready made AptX Bluetooth codec like the CSR64215 with I2S output and pair it with your preferred DAC (Solder on solution: https://ebay.us/LaRAlf, full board with high quality Sabre ES9023 DAC https://ebay.us/k0nxrk and amplifier
Best regards,
Paul
-
- Posts: 3
- Joined: Tue Aug 21, 2018 11:26 am
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Hi,
thank you, that looks amazing! Though you could have answered in German
Your 3. point got my special interest: I will try to find some information what that A2DP sink is and how I could use it.
If if occur any problems (understanding or doing it) I will get back.
Thanks so far
Freddie
thank you, that looks amazing! Though you could have answered in German
Your 3. point got my special interest: I will try to find some information what that A2DP sink is and how I could use it.
If if occur any problems (understanding or doing it) I will get back.
Thanks so far
Freddie
-
- Posts: 3
- Joined: Tue Aug 21, 2018 11:26 am
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Hi,
its me again the two ESP32 chips arrived yesterday and I directly started testing. Programming via IDE is absolutely no problem. Also flashing via Linux and esptool.py works after a lot of testing. So far so good. Though when I try to build the individual projects I sometimes get warnings or even errors. Some still work and I am able to flash them. BUT: Bluetooth device shows up on my Android phone, iMac and Macbook don't see it. No clue why. But connecting to it is not possible. Every other device works just fine, but the ESP32s don't. Names aren't displayed, only IDs (forgot the special name at the moment).
So... flashing works, the individual programs don't. Does anybody have a recommendation for a special program that works with the most recent release (verified)?
Thanks guys
Freddie
its me again the two ESP32 chips arrived yesterday and I directly started testing. Programming via IDE is absolutely no problem. Also flashing via Linux and esptool.py works after a lot of testing. So far so good. Though when I try to build the individual projects I sometimes get warnings or even errors. Some still work and I am able to flash them. BUT: Bluetooth device shows up on my Android phone, iMac and Macbook don't see it. No clue why. But connecting to it is not possible. Every other device works just fine, but the ESP32s don't. Names aren't displayed, only IDs (forgot the special name at the moment).
So... flashing works, the individual programs don't. Does anybody have a recommendation for a special program that works with the most recent release (verified)?
Thanks guys
Freddie
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Fredde2209 did you manage to overcome your problems and your Bluetooth and Spotify is working?
Please give an update if you can
Please give an update if you can
-
- Posts: 1
- Joined: Tue Jan 21, 2020 6:57 am
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Hey! Did you get this working?
-
- Posts: 2
- Joined: Sat Nov 24, 2018 8:01 am
Re: ESP32 as Bluetoothg/Spotify Connect receiver
I would also like to know if someone got it working?
-
- Posts: 26
- Joined: Thu May 23, 2019 3:05 pm
-
- Posts: 1
- Joined: Wed Jan 31, 2024 11:38 am
Re: ESP32 as Bluetoothg/Spotify Connect receiver
Did you document your working project anywhere or could you explain how you made it work?
Who is online
Users browsing this forum: No registered users and 64 guests