How To Hack A Portable Bluetooth Speaker By Skipping The Bluetooth

Portable Bluetooth speakers have joined the club of ubiquitous personal electronics. What was once an expensive luxury is now widely accessible thanks to a prolific landscape of manufacturers mass producing speakers to fit every taste and budget. Some have even become branded promotional giveaway items. As a consequence, nowadays it’s not unusual to have a small collection of them, a fertile field for hacking.

But many surplus speakers are put on a shelf for “do something with it later” only to collect dust. Our main obstacle is a side effect of market diversity: with so many different speakers, a hack posted for one speaker wouldn’t apply to another. Some speakers are amenable to custom firmware, but only a small minority have attracted a software development community. It doesn’t help that most Bluetooth audio modules are opaque, their development toolchains difficult to obtain.

So what if we just take advantage of the best parts of these speakers: great audio fidelity, portability, and the polished look of a consumer good, to serves as the host for our own audio-based hacks. Let’s throw the Bluetooth overboard but embrace all those other things. Now hacking these boxes just requires a change of mindset and a little detective work. I’ll show you how to drop an Arduino into a cheap speaker as the blueprint for your own audio adventures.

Directing the Hacker Mindset at Myriad Bluetooth Speakers

There’s way too many different speakers out there for one hack to rule them all. But by changing our Bluetooth speaker mindset from “it’s a reprogrammable computer” to “it’s an integrated collection of useful electronic components”, we turn market diversity into our ally.

Look at this from the perspective of Bluetooth speaker manufacturers: they want their Bluetooth speaker to stand out from competitors, and the most obvious way is in their selection of loudspeaker drivers. Surprising the customer with big sound from a little box is key for success, so each product can offer a unique combination for driving the audio, all housed inside an eye-catching enclosure that lets consumers tell one portable Bluetooth speaker from another.

Tailoring for loudspeaker selection has cascading effects through the rest of the system. For best sound, they will need matching audio amplifier modules, which will have their own power requirements, which dictates battery performance, and so on. Catering to these desires, components are excluded from the tightly integrated mystery black boxes. Fortunately for hardware hackers, such an architecture also makes components easy to reuse:

  1. A rechargeable battery.
  2. Ability to charge that battery from USB.
  3. A low-power standby mode to monitor press of the power button.
  4. Protecting battery from over-discharge.
  5. A voltage regulator supplying battery power to the device.
  6. An audio line-in jack.
  7. Volume up/down control.
  8. Amplifier and driver.

All of these are useful for projects, already neatly packaged in a mass-produced enclosure.

Putting Theory Into Practice With An Example

Now that we have a general background, let’s apply this concept to a specific example. But before we begin, an obligatory note in case it is not obvious to any beginners reading this: This activity very definitely voids the warranty (do it, it’s worth it!), and modern portable electronics use lithium chemistry batteries that can be dangerous if mistreated.

The Bluetooth speaker used in this example is a “Rugged Portable Bluetooth Speaker” sold by North American electronics retailer Best Buy under one of their house brands. A search of its FCC ID pointed to Lightcomm Technology Co. as the manufacturer. The “rugged” claim starts with a layer of soft rubber wrapped around its exterior. That plus reinforcements inside the case allows the speaker to absorb some level of abuse. I wanted to preserve this shock absorbing exterior and, thankfully, it was easy to open non-destructively. Even more care would be needed if it was a waterproof speaker (this one wasn’t) and moisture barriers need to be preserved. Alternatively, if the plan is to transfer the internals to another enclosure, the condition of the original box would not matter.

Once the circuit board has been extracted, the Bluetooth interface module should immediately stand out as the most sophisticated component sitting close to an antenna. A search for ATS2823 confirmed it is a module designed and sold for integration into Bluetooth audio products. Its MIPS M4K core and associated flash storage could be a promising start for firmware hacking, but the point of this example is to demonstrate how to hack a speaker utilizing existing firmware. So we will leave the module as-is.

Solder to the External Audio Input

The easiest way to pipe audio into this system is to pretend to be an external audio source. We want the system to believe we are connected via an audio cable plugged into the line-in jack, but for compactness we’d prefer to do this without using an actual cord. This approach is easy, nondestructive, and preserves the existing volume control mechanism. There are a lot of different ways to implement an audio jack, so some exploration with a multimeter will be required. We need to find the standardized contacts for: audio input left channel, right channel, and ground. (Wikipedia reference: “Phone connector (audio)“)

It’ll be a little tricker to decipher the plug detection scheme, as it is not standardized. In this particular example, there is a fourth pin that floats in the absence of an audio plug. When an audio plug is present, the pin is grounded. Soldering a wire to always ground that detection pin will keep this speaker constantly in “playing external audio” mode.

Or Connect To Amplifier Directly

An alternative approach is to bypass existing input and volume control, sending audio directly to the amplifier chip. To find this chip, we start with the voice coil wires and backtrack. It’ll likely be the largest component near those voice coil wires. Once the amplifier chip is found, consult the datasheet to find the input pins to cut free from the circuit and rewire for audio input that bypasses existing control.

But even if we wish to maintain existing volume control, it is still useful to locate the audio amplifier chip. It is the most power-hungry component on the circuit board, and peak power requirements for the system are dictated by the amount of power this amplifier will draw when playing loudly. Therefore it is half the puzzle of calculating our available power. This particular Bluetooth device uses a Mixinno MIX2052 chip sitting adjacent to the voice coil wire connector, with a peak power of 6 watts.

Tap Into Power Supply

The other half of the puzzle is the voltage regulator delivering power to the amplifier chip. Similar to how we look for our amplifier near our voice coil wires, we can look for our regulator sitting near inductors, capacitors, and diodes. Once the power module is found, read its data sheet to determine peak power output.

The power budget for our hack would be constrained by power figures for those two components. Most microcontrollers consume maximum power during bootup. So as long as the audio source stays quiet during this time, we would have a little extra power to support boot. Somewhere between the regulator and the amplifier is also the best place to tap power. It allows us to piggyback on the existing power management circuit that shuts down the amplifier when entering low power mode, cutting power to our hack at the same time.

In the case of this board, there was one prominent coil and a Techcode TD8208 step-up regulator was found next to it. Configured to deliver 5 volts, this regulator can deliver 1A and tolerate brief spikes not to exceed 2A. This wouldn’t be enough to feed a Raspberry Pi 4, but plenty for an Arduino Nano.

Repurpose Control Button

So far functionality for three of the four buttons on this speaker has been preserved: power, volume up, and volume down. The fourth button initiates Bluetooth pairing, or to pick up a phone call. We’re cutting BT out of the equation so this is no longer useful and can be repurposed.

On this speaker, SW4 is normally open and pulls to ground when pressed, making it trivial to reuse. I cut the trace leading to the Bluetooth interface module and soldered a wire so the switch now pulls an Arduino pin to ground when pressed.

Tuck Everything Back In

A few pieces of internal plastic reinforcements for ruggedness were cut away to create enough volume for an Arduino Nano inside this enclosure. It is no longer quite as rugged, but now it is far more interesting as a platform for sound hacks. To conclude this proof of concept, the Arduino Nano is using the Mozzi audio library to play the classic Wilhelm scream whenever our repurposed button is pressed.

 

Build Your Own Bleepy Bloopy Buzzy Box

Bluetooth used to be the novelty. With plenty of hacks adding Bluetooth to existing audio equipment, playing Bluetooth audio out of one, or building our own Bluetooth speakers from scratch. But now Bluetooth speakers are ubiquitous, we’re approaching the point where Bluetooth is not necessarily the center of attention. Skipping the Bluetooth in a portable Bluetooth speaker gives us a new platform for our noise maker hacks. Something small, fun, and easy to bring to our next hacker show-and-tell meetup!

49 thoughts on “How To Hack A Portable Bluetooth Speaker By Skipping The Bluetooth

  1. But since bluetooth exsts, why go with speakers rather than headphones? Headphones always had some advantage, I remember articles promoting them as a way to low cost hifi. And without the wires, much of the bad has disappeared.

    1. Headphones have only one advantage: You do not disturb your neighbors. If that’s important, you have to use them. When this is not an issue, I always prefer speakers.

      Except when you stand behind a DJ mixing console, then you need the headphones, than you often want to hear something different than your audience (find the next song an it’s cue points). But that’s not “listening to music” but presenting it to others as a hobby or work.

      1. I often need to push in the earbuds (which are decent at reducing background sound even without being driven) and put on something from mynoise.net in order to drown out something else, typically someone else’s television.

        Also HRTF processed audio absolutely needs headphones in order to be of any use at all.

  2. A while back I went looking for “computer speakers”. I wanted something with a decent sound and moderate price. I didn’t want to get real fancy. After looking at the three local places that sold these types of things I was stunned to find nobody offered “computer speakers” (line-in, built-in amp+wall wart optional) anymore. Everything had rechargeables, BT, way too much smarts and maybe not even a line-in. It seems gone are the days of KISS. I eventually settled on a decent sounding and priced BT speaker set. Its been mostly unusable, You have to turn it on all the time. You can’t use them for spontaneous notices because they have likely turned themselves off. Bleeps to turn on. Bleeps to turn off. Bleeps to tell you nobody is talking to it on BT.

    Not real useful to be the vocal cords of my CPU. And the battery(ies) will fail sooner than later. I’ve been contemplating breaking it open to remove the BT and battery. But I really didn’t want to destroy the case. And I fail miserably at preserving cosmetics. But I think this article has given me the courage to dive in and liberate the amp and speakers from the tyrrany BT and power conservancy!

    Thank you. It was a nice walk through on identifying the components.

    1. I use one of the 5.1 speaker sets on my main rig these days. Before that it was a midi system and before that a boombox with a cassette adapter. I’ve always regarded “computer speakers” as a bit of a scam really when you could pick up some stereo equipment and hook that up instead. Though for low end use, the $15 noise loudeners were alright for just having some kind of sound on a box where you didn’t wanna take up too much space, family surfer or something.

      1. Exactly! It really depends on what/how you’re using them. I prefer a full on sound-system where the space and media I’m listening to warrant it. But for those times you just want something hidden around your desk to give audible alerts for: servers going down in a blaze, emails coming in, new IMs, appointment reminders, … you want something small and unobtrusive.

        Often I don’t want those computery noises at the volume level for which I like to listen to music. It could cause medical problems. :-D And seldom would I care much about sound quality for those types of things. Although I still like to avoid really crappy sounding speakers.

      1. Reminds me of when I used a pair of 5′ tall 2K watt klipsche speakers to play doom… :-D

        But I already have the BT speakers, which I have no other use for. So I’ll just have hack them! Still I’ll keep it mind for next time.

        1. That sounds glorious.
          HaD had an article the other week about reverse engineering router firmware with “binwalk.” I have one of these 10-dollar Bluetooth sound cubes, and before beheading its blackbox BT chip and using the amp directly, I was going to see what I could pull from its single-chip BT/microSD reader/audio decoder solution. Presumably it’s a one-time high-voltage-programmable part, as it plays a sound file when switched on. Not in front of it but the Chinese manufacturer has no data sheets on it, and baidu comes up with little data. Crazy how entire systems are becoming jellybean-part-ish.

    2. Go to a garage sale and buy some speakers, and an “old” stereo receiver. People don’t want them, they now use their iPhone with tiny speakers.

      I have a pair of Radio Shack Minimus-7 speakers, compact, metal cased speakers with a good sound. Radio Shack sold a lot of those. I’ve also seen lots of similar speakers, likely not too bad.

      They don’t include an amplifier, but those can be bought separately, and likely better tgan what was in cheap “computer” speakers.

      Maybe ten years ago I bought a stereo receiver for ten dollars at a garage sale, giving me AM/FM , a phono preamp and tye interface for two cassette decks. Works fine with my computer.

    3. if you have a 5 below in your area they have both wired and bluetooth speakers and headphones cheap. Cheap enough to gut them for the modules if you like to play. I think I was in for $5.55 for the last BT speaker I got, and a few minutes taking it apart to disable the obnoxious flashing lights (removing a ribbon cable from a socket). I think I also doubled the battery life. If I open it up again I am going to nix the power/BT data light that flashes in the back.. I like it *dark* when I sleep. Flashing lights really piss me off, to the point I have a roll of black tape on my nightstand to cover them with.

    4. I have purchased a 2.1 computer speaker system for my PC a few years ago. Sure it came with a subwoofer but it’s still computer speakers as you describe it, with a volume knob, wired and everything, and made good sound. I was pretty surprised by your comment, so I went on logitech’s website to make sure of this. Sure enough I found they still sell computer speakers as you describe.. The S120 goes for $15 on their website.
      That’s not to mention all the random non-brand speakers you find on the internet.
      Hope this helps

      1. I did say I went to “three local places”. Logitech and websites weren’t among them. :-) It used to be I could find these things everywhere and in many forms (speakers, alarm clocks, boom boxes, …). But BT has become the standard to connect speakers to smart phones so it seems that the “universal connect via wire” has been dropped, at least in my local stores.

        I might just get real good at injecting a jack in BT speaker sets so I can run out and grab a new set a speakers whenever the mood strikes! There’s something about getting it now as opposed to waiting for it to arrive. ;-)

    5. Your problem, is that you went to a physical store. Google “5.1 computer speakers” if you want full surround, “2.1 computer speakers” if you want a stereo plus sub experience. Lots of choices!

      1. +1 for the thrift store mention. Recently I picked up a orphan set of Altec Lansing ATP3 satellite speakers for $1.99 each at my local Goodwill. Don’t have a clue where the sub(which has all the power goodies in it) was, don’t care either. Each one has two high drivers and a mid, with a 6W rating. After shaving the right speaker(i.e. take the knobs off, etc), and fitting each with shielded audio cable they were a good upgrade for one of my Amazon Echo Input’s(these are the ones with no built in speakers).

        Last month I got a pair of older JBL computer speakers, 3.5 input with a USB-A for power for $2.95. They were DOA, but after striping out the guts, they made good surround speakers for my daughters TV along with a Sony center speaker I picked up for $2.95 also. They both had color tags that were half off that day.

    6. Just a tip for finding something compact and usable at a thrift, on the side of the road etc, those mini boombox style iphone/ipod/sansa/zen/genericfailedMP3company dock speakers can have a reasonably decent sound, and if you look in the back of them yay, your dependable old friend, the 3.5mm aux jack. So for a couple of bucks and another couple for a 3.5mm stereo male to male patch cord, you’re in business. If you wanna use them in the workshop or something, just fill up the stupid ass dock connector with hotglue before it gets full of metal shavings.

  3. These things just seem to turn up without a conscious effort to acquire them. I mean you might have made a choice to buy a decent stereo pair to stream your tunes to or boost a display devices anemic squeaker when watching netflix, but those small, single speaker ones, where the hell do they come from???

    So despite giving away one a month, I still have 2 or 3 kicking around. Indeed it seems like a good plan to repurpose them. I’m just thinking now about whether an ESP8366 could scrape a weather site, and dalek speak you back a report when you yell “weather” at it. Possibly even playing an alert tone if a severe weather warning has been posted when it checks.

    Only fly in the ointment is, that the batteries in these things are small or the power budget ain’t well trimmed because the ones I’ve actually used, only seem to get 3 or 4 hours, before you go vampiring their cells with microcontrollers.

    1. As far as the batteries go, I bet the stock firmware has little optimization for power usage. With some clever tricks (a few articles down there’s a great one on low-power use) I bet you could eke out a few more hours.

      1. I found the opposite…they do all shut down aggressively. I needed (and could still use) a relatively cheap one where if you plug it in it will remain on all the time and automatically reconnect to your phone. All i could find is that some expensive ones could do this but then somebody said that was not true anymore with newer FW.

    2. One data point for you: battery inside this example had “400mAh” printed on it. I had the speaker sitting on a table where people would press the button to get the Wilhelm scream about once every few minutes. Since it was only playing sound intermittently, it lasted a little over ten hours before the speaker shut itself down due to low battery.

  4. My (now ex) wife had gotten one of these as a promotional thing a while ago, and after the third or fourth time the cat knocked it off the counter in the bathroom, the internal drivers broke loose and no matter what I did they would not stay in place. So I bought her an Oontz Angle that was on sale on Amazon, and I pulled the Bluetooth module and battery out of the speaker that was destined for the trash, connected the board into an old set of bigger speakers that were collecting dust in the garage and ended up with a pretty decent sounding speaker for the garage. Does not have much bass though since the amplifier board is only like 10W… I planned on putting a beefier amplifier in it but I seem to have lost my Round Tuit :-(

  5. I had a couple of Radio Shack wooden book shelf speakers with 4″ drivers. I use them with my old college 20W amplifier built with a pair of LM1875 per app circuit in the datasheet. It is old class AB that draws a bit of power, but sounds pretty good as my computer speakers.

  6. Three immediate thoughts to expand on this article, if one wants to…

    (1) if you need beefier processing than an Arduino can provide, a RasPi Zero of one variety or another would probably work. The Pi Zero, running a full load, only pulls ~300mA or so at 5v, IIRC… *BUT* you either need some way to fool it into thinking that it has something on the end of its HDMI connector (while running headless) and throw an eBay HDMI converter at it that breaks out the audio (specifically one with external USB power), or you need an audio-amp Pi HAT. Both will likely pull *at least* as much power as the Pi.

    (2) a second regulator, wired with a MOSFET so that it only turns on when the original one does, is handy and relatively trivial to add… but make sure that only the ground rails are connected. Optocouplers everywhere would be a lot better, but probably not strictly speaking required.

    There’s also those “mini clip” MP3 players that eBay has been flooded with for forever. The ones you can get from China for less than $2 if you don’t mind waiting forever for them to show up… they are essentially knockoffs of the 2nd-gen iPod Shuffle, and a marvel of integration… each has only a single chip inside that does everything. You’ll want a Schottky diode on one of the battery leads, to keep it from trying to charge its battery at inconvenient times…

    1. Or an OrangePI Zero! They don’t do a good job of publishing specs and I haven’t tested so I don’t know what the exact power requirements are. But the board is tiny (<2"x2" 48mmx46mm) and I ran one off of a cheesy battery extender for a cell phone for about 10hrs once. The same device wouldn't even power up an Raspberry PI 2B. It hardly gives my Droid-X a sip before its drained. So the oPi-0 seems fairly frugal with juice. Still probably sucks way more than a microcontroller.

      1. or beaglebone black. They don’t care what they have plugged into them.
        I just found out last night that if you have two instances of VLC running, you can stream from one to the other, and it sounds quite good. I haven’t finished playing with this: it’s my hope that I can point multiple instances at one server. Then old cellphones, beaglebones with a soundcard, and anything else similar, can all serve as cheap wifi-to-audio adapters feeding speakers.

    2. I used an Arduino Nano because it was small, commonly available, and the focus wasn’t on the microcontroller. But we’re on the same wavelength: the intent is for the community to take this idea and apply it to other BT speakers and other microcontrollers. My personal hope is to see a creative project using a Teensy board this way. They offer a lot of computing power without consuming a lot of electrical power, and there’s an existing body of sample code & accessories for audio hacks.

    3. No. Optocouplers “everywhere” are not better. They just increase current consumption unnecessarily. You have a single battery and thus a single ground. Think about the ground concept and make a solid ground, then it will work.

  7. I have two very old Philips 22HR541 active speakers on my desk and yes, you can pry them from my dead cold hands. I use the bigger 22HR544 in the living room. I don’t know if they were ever sold in the states though.

  8. Though I have seen few of these things they seem to have a line in thru the “data” pins on the micro USB connector that is only used for charging. It takes a special cable to do line input. If repackaging the device put a 18650 cell in for plenty of run time rather than dissecting the internals. Check that over and under protection is present.

    I modded a single old school computer speaker by making the input load resistor open with the “bass boost” switch to the task for more gain. It makes a great test audio signal tracer. Much easier to use than a larger test amp and speakers. If it gets blown I am only out a little not a lot.

    1. You are correct, but keep in mind this is a Hackaday how-to, so there are also the following possibilities:

      1) Beginners learning by doing. Once they start making sound (any sound) they have the opportunity to take the next step and learn about fine-tuning for quality.

      2) Intermediate hackers aware of the reduced sound quality but choosing to ignore it. “It is just a quick hack.”

      3) Advanced hackers implementing their own DSP algorithms to process signal before feeding to amplifier.

    1. Stumbling over yourself to be dismissive of this one? I think it’s a good point that what you’ll find inside involves blocks of the overall system that you can hack into, as opposed the overall electronics trend which tries to push everything into a single IC package for easier assembly. These area great base for many a hack, whether it involves audio or not.

      1. What I stumbled over myself to figure out was what the purpose of the “hack” was, and what not using the bluetooth has to do with it, since it already has an analog audio input.

        I read it twice, and in the end I decided there was probably never was a use case other than writing an article.

        tldr; By placing the arduino inside the same case, it is inside the case. The end.

        I also think it is hilarious, and typical around here, that you’re totally dismissive of this person’s comment, while accusing it of being dismissive. It is just like the people who complain about complaining; if that was really their issue, they wouldn’t want to complain. If you were actually bothered that the comment was dismissive, you would not also be dismissive in your comment. There must be something else. Are you really upset that the author didn’t get sufficiently congratulated? (which seems more likely) Why not write up an awesome congratulations, instead of making a hypocritical complaint?

  9. I like your little scream box. I understand that the click sounds on the start and end can be solved by biasing the zero point of your audio to the midpoint of the speaker travel which would be at the mid voltage.

  10. I recently hacked up a bluetooth speaker when I discovered it was only mono output. It had stereo speakers and a passive sub, but mono sound all the way through.
    When I needed an external speaker for my 2-meter amateur radio I pulled the speaker apart and discovered the drivers were 3-ohms, so I did the logical thing and connected them in series for 6 ohms.
    I lopped off the 3.5mm stereo plug from one end of the included cable and wired it direct.
    I ditched the PCB and kept the lithium battery, as it has a protection circuit in it, but added a small ferrite inside to help mitigate RF.
    I blocked off the holes in the enclosure and plugged it in!
    Nice!
    I tried it on my HF rig and it is great there too.
    I remain impressed with the warm tones I get from this dumb hacked up little speaker. It is very clear and not bright at all, which is preferable for a communications speaker that is subjected to static and noise.

    Many options, some more advanced than others. mine was dead simple and effective for my purpose.
    73 DE N2NLQ!

  11. Just put a male TRS on whateverthehelllyouweretryingtodo and plug that into the speaker input. Just a weird write up and cludgy execution imho. Double side tape a battery bank to the back. The Aristocrats.

    1. What I’d like to see would be to convert one into a USB audio device for a computer.

      The ATS2823 supports SPI and UART, in addition to SD cards, etc., there is a good chance the firmware supports a lot of stuff that isn’t on these simple speakers. That would be the sort of information that would really make it so that people would want to repurpose these devices.

      Of the few people that want a scream box, fewer have family and friends that want them to have it. ;) But it looks like it might actually be a portable media player that just lacks the media storage and controls, so it has a lot of potential.

    1. Not really. When you buy a Sonos device, what your getting is a connection to their WiFi based audio network, and that is what they are really bricking. It’s not like it does a melt down or actually destroys something(we know this because the factory can reset a device that you have put into recycle mode by accident.)
      So unless you have some way to make it part of the network again, nope.
      The bricking in this case is used to confirm that you are really doing an upgrade, and not just getting a new device at a discount. Without having to send the old one back.

      For the none speaker devices I would just salvage the boards and enclosure.
      For the network speakers, I would yank the logic/amplifier boards(and salvage the hell out of them), get/build a decent amp(to reuse the built in speakers and enclosure(which are pretty damn good to begin with.) and add a Amazon Echo Input(which has both analog and BT audio out) to make it smart once more.
      And while they will no longer be part of a Sonos network, at least you’ll still get a pretty good sounding smart speaker.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.