Thursday, January 17, 2019

Turning A Broken Chromecast Into An Audio Chromecast

The Chromecast reinvented the way we share media with those around us. It baffles me that it took so long for a company to make a device that turns dumb TVs into smart TVs. It's also amazing the power they pack in their tiny form factor. The small Chromecast 1 was way ahead of its time. It's a miracle that it can do what it does and do it so well. But because they're so compact, they can fail very easily. For example, I recently got my hands on one that produces very strange video artifacts. Like, very very strange.

Take a look at a picture of the idle screen:


It looks like the picture's all there, but it's applying random 3D transforms to parts of the image. This can be seen everywhere the Chromecast has to draw graphics. This does not, however, apply to video. Video seems to be independent of this problem. So, while the informational overlay about the video (title, duration, etc.) is distorted, the video behind it plays very well (and in full 1080p). This is interesting. My guess is that the graphics engine (OpenGL ES, maybe?) is having issues communicating with the GPU resulting in the 3D transforms you see here. But, as in many video-related embedded devices, this system probably has a hardware video decoder that handles video decoding straight to the frame buffer. This part is probably fine and doesn't require any sort of rendering on the GPU's part.

Whatever the problem is, it's almost certainly hardware related and it almost certainly can't be fixed. There's probably a short somewhere on the board or a cracked solder joint. Whatever it is, I won't be able to fix it. However, I can convert this to an Audio Chromecast.

The real magic trick will be to do it for under the cost of a real Audio Chromecast. On the Google Store they're they were $35 with free shipping. So the goal will be to build one for under that amount. Should be easy, right?


If at all possible, I wanted to avoid getting an HDMI2AV converter. I could get a very cheap one from China that could handle the conversions for me, but there had to be some way the processor or decoder hardware was communicating with whatever interfaces with the HDMI bus (probably at the GPU?) There are several test pads that I could tap into to see if I get some kind of audio signal from it. I'm looking for straight audio or an I2S bus. But one thing is for sure: without a FPGA, I doubt I can implement my own HDMI audio extractor, since the audio is tied in with the data busses and not kept independent from the other busses (and run at a stupid high bitrate).

So I probed every test pad I could find. Most of them were in the forest of test pads on the side with the memory. None of them were audio or audio related as I could tell. After further inspection of the chips, it became clear that there was no GPU. The chip I thought was the processor was primarily the network controller, whereas the small chiny chip on the top was the SOC that ran it all. It was doing all of the rendering and the HDMi signalling as far as I could tell. Rats. So, what other recourse do we have before going to an HDMI2AV converter?

I didn't really view extracting the audio signal myself to be an option. The HDMI signals are way too fast to decode and extract using my traditional methods. I didn't have an FPGA available, so that was out of the question. I also don't have the deep understanding of the HDMI protocol required to do something like this. I'd need a premade solution of some kind.

If you had something laying around like one of those cheap Chinese projectors that say they're Full HD but the projection itself is just VGA, you could use one of those because most of those have built-in speakers and/or headphone jacks. You can just reuse the board from that. But that can get tricky because you have to guarantee that the projector boots up in the same input/output mode every time. I can also imagine that the power consumption would be higher than it should be, too.

You can also probably recycle a monitor or a TV display driver board. Many of those have HDMI inputs and audio outputs. But then you run into the same potential power draw and state issue as the projector.

So, unfortunately, we need the HDMI2AV converter. You can get one of these for about $10 which is still cheaper than the Audio Chromecast. So I went and did that.



I broke it open to see what was inside. I expected one big chip in the center and what I got was two dominating chips. Just for fun, we'll cover what they do (mostly because I want to know what they do).


The chip closest to the HDMI input is actually an HDMI to VGA converter (as best as I can tell, I couldn't find this exact chip's datasheet, but many things related to it do this, I think it's similar to this one). It passes this signal to a RGB to CVBS chip (closest to the oscillator) that produces the final video signal. I found this process to be interesting. I'm not entirely sure how it does audio. The chips that came up similar to the AG6200 HDMI to VGA chip said they provided 4 I2S outputs (8 channels). I do not see where this gets converted to analog audio. Either this chip just does it, or it's that small chip that looks directly connected to it that doesn't have a proper label on it. It seems kinda small for a I2S to Audio converter, but it could be. Also on the board is a 24C02 EEPROM and a nifty little microcontroller that ties it all together.

Unsurprisingly, after a factory reset on the Chromecast (which cleared up some issues with networking), the setup worked very well.

So, how do we make this a permanent fixture?

There were several things I wanted to do with this device to make it "complete"
  1. Solder together VCC and Ground of the two boards so that it only requires one power cable.
  2. Determine if NTSC or PAL mode uses less power and set it to that
  3. Give the Chromecast its heatsink back because it'll probably melt itself after a while (these things get hot - most of their weight is the thermal dissipation).
  4. Put it in an enclosure of some kind.
Months rolled by, and this project didn't move. Seems like forever since I looked at this thing. But, the waiting paid off. I know exactly what I'm going to do with it now. I'm gonna shove it all into here:



This is a KEF Q95C Center Channel Speaker. My family used this for a while as a center channel, but now it's sitting in the basement collecting dust. It seems like a perfectly nice speaker, so let's find something to drive it! I ordered a bluetooth amplifier on Amazon so I could drive it from both the Chromecast and directly from my phone or something like that. The idea is that there's exactly one cable coming out of this thing: the power cable. I'm not going to link the exact amplifier I used because you want to evaluate each amp board on a case by case basis given your speaker impedance and whatnot. This speaker is a 4 Ohm speaker, so it was driven by this amplifier board very very easily.


Now I needed to solder them together. The plan is to tie together VCC and ground of the Chromecast and HDMI2AV board and then use a buck converter I have in my closet to step the Amplifier's 12V down to 5V. Because both the Chromecast and Bluetooth have volume controls, I don't need the volume knobs out the back, so I only need to drill one hole for the power cable.


Here's almost everything soldered together before I put it all in. I tested it and I was getting a nasty ground loop type of feedback from the Chromecast or the HDMI2AV board. To get rid of this, I filtered the audio through a 1:1 transformer I pulled off of a PCI modem card. This filtered away all of the noise while allowing the audio signal to pass through. I also had to afix a larger heatsink to the Chromecast to keep it from glitching out and melting because goodness does that thing get hot. However, once I was able to fit everything in there (which was challenging with the stuffing in the speaker) and after a few solder breaks, it worked very well.

So, how did we do? Well, the original goal of this post that I started so, so long ago was to make an duplicate Chromecast Audio functionality for less than $35 but, now that I'm finally done with this project, it doesn't really matter because the Chromecast Audio has been discontinued. So is it priceless? Worthless? I'm not sure. The project became more than what I thought it would be. It sounds alright, only requires 12V power, and looks pretty neat. So I'll mark it as a success, I guess.

No comments:

Post a Comment