Retasking a 2nd Gen Echo

Retasking and Amazon Echo 2nd Generation.

I would like to re-use the parts of a non functioning 2nd Gen Echo (model XC56PY).
In fact I want to throw out the motherboard and replace it with a different board (Pico W perhaps) and then use it as a voice assistant/speaker.

Unfortunately, I’ve damaged the LED/Mic board while probing it with a multimeter (I think I’ve managed to short a couple of solder joints) so I’m at a standstill until I fix it. In the meantime I thought I would share what I have so others can continue.

Overview

The Echo consists of 3 separate parts.

  • Amplifier/Power board
  • Motherboard
  • Mic/LED Board

The amplifier is connected to the motherboard with a 0.5mm pitch 24 pin FFC/FPC cable. The cable itself has multiple pins shorted (ground and power) so the orientation of the cable is important. Obtaining breakout boards for these connectors is fairly easy and cheap.

The Mic/LED board is connected to the motherboard with a 0.3mm pitch 37 pin FFC/FPC cable and, once again, the cable has multiple connectors shorted. Getting breakout boards for this is more difficult and expensive.

Amplifier/Power Board

The amplifier looks to be a Texas Instruments TPA3118D2.

The board provides 3.85v to the motherboard.

So far I haven’t done much investigation of this board.

Mic/LED Board

The above circuit diagram may contain errors.

This has 36 status LEDs (12 x RGB LEDs) controlled by what looks like a Lumissil IS31FL3236A (U6) driver.

It also has 7 microphones connected to what looks like 4 Texas Instruments TLV320ADC3101 (U1,U2.U4,U5) ADCs with embedded mini DSPs.

Both the ADCs and the LED driver are controlled via I2C. The addresses are as follows (assuming I have correctly identified the chips):

Chip I2C Address Notes
U1 0x30 MK1 and MK2
U2 0x32 MK5 and MK6
U4 0x31 MK3 and MK4
U5 0x33 MK7
U6 0x7E LED Driver

The FFC/FPC connector has the following pins:

PIN NAME TYPE Notes
1 Unk Unk
2 Unk Unk
3 Unk Unk
4 Unk Unk
5 GND GND
6 SCL I/O I2C serial clock
7 SDA I/O I2C serial data
8 GND GND
9 RESET I Reset for U1, U2, U4 and U5. Low to reset
10 BCLK ? Audio data serial bus bit clock. Direction unknown
11 DOUT O Audio serial data bus output (via U101)
12 WCLK ? Audio serial bus word clock. Direction unknown
13 Unk Unk
14 Unk Unk
15 GND GND
16 MCLK I Master clock (U1 only)
17 ENABLE I Enable for U6 (SDB) and U101 (OE)
18 Unk Unk
19 GND GND
20 Unk Unk
21 Unk Unk
22 Unk Unk
23 GND GND
24 GND GND
25 GND GND
26 GND GND
27 GND GND
28 VCC VCC 3.8V for the LED driver
29 VCC VCC 3.8V for the LED driver
30 GND GND
31 GND GND
32 DVDD DVDD 1.8V for U1, U2, U4, U5, U101
33 DVDD DVDD 1.8V for U1, U2, U4, U5, U101
34 GND GND
35 GND GND
36 AVDD AVDD 3.3V for U1, U2, U4 and U5
37 AVDD AVDD 3.3V for U1, U2, U4 and U5

Once I’ve repaired my Mic/LED board I plan to capture the configuration for the ADC/DSP chips and determine what the various clock speeds are (WCLK, BCLK and MCLK). It might then be possible to build an actual voice assistant.

5 Likes

Hey there, funnily enough I’m trying to do something similar, just on a much more limited scale - smash together a working but old Echo Dot 2nd gen with the speakers/case of the 2nd gen echo plus, driving the bigger speaker via a mono amplifier module. Was trying to find out if the power board gives me 5v somewhere to power the echo dot mainboard, and stumbled upon your post. Thanks for sharing your insight and good luck!

Hi there,

I just stumbled on this. I just started researching the same topic. I am looking to use the amp board + Speaker + controls and wire to an ESP32. I can then run SqueezeESP32 and turn the speaker into a Squeezebox. I am interested in the signaling sent to the Amp. Were you ever able to determine what signaling it is? Analog, I2S, SPDIF?

From what I’ve seen the amp appears to be a Texas Instruments TPA3118D2. The signalling is analogue.

I haven’t had a chance to look at this for a couple of months but I should have some free time soon.

Hi @SynAckFin - anything to report?

Someone has given me a broken thing (as they do!), the Gen 2 Echo (tall, material covered). At the very least I would like to re-use the speaker which seems simple enough, though not sure if I can re-use the existing amp board as it seems to have more than just audio going to it via a ribbon (FFC/FPC?) cable. Or is that just power going back up to the top?

Ultimately interested in doing the same as you. :slight_smile:

Hi @Benji2020 I haven’t been able to look at this for quite a while due to some personal issues.

I have had a look at the board and 5 of the connectors are used to provide 3.8V to the other boards, 7 are used as ground. That leaves 12 remaining connectors. 4 will be for audio (L & R +ve and -ve), 1 maybe for mute, another for signalling when the jack is inserted and maybe another for volume (not convinced about this one). That leaves 5 to 7 unaccounted for. I also suspect they might be using the long ribbon connector as an antenna for bluetooth and WiFi with provision for ZigBee (Gen 2 plus has ZigBee). This would use up more of the connectors leaving just a couple unaccounted for.

At some point I do intend to get back to working on this and when I do I’ll post what I have.

@SynAckFin Hey, I just started working on the same thing for my Echo Dot 3rd Gen. It’s quite similar to the 2nd Gen Echo and has the exact same Lumissil IS31FL3236A and TLV320ADC3101. The only real differences is that the amp is on the main board and the led ring/microphone board is connected with a 39pin FFC cable.

I have been able to get control of the RGB using a FFC cable breakout board but unfortunately the configuration of the TLV320ADC3101 seems over my head (TDM and such). It looks like others have been successful in capturing the config for similar chips so if you ever get around to it let me know! Adapting the config for 2 TLV320ADC3101 instead of 4 shouldn’t be too difficult?

Lastly does the 2nd Gen Echo not have the Fairchild 74LCX74 to disable the microphones?
In terms of the other missing connection heres a good right up on the 3rd Gen Echo dot they may help fill in a gap or two: Echo Dot 3rd Gen Digging Deeper
Also the first and second gen echo dots also use the same chips

I finally stumbled back on this thread searching for something completely different. Thanks for finding the amp chip. I looked at the block diagram and definitely looks analog.

Were you ever able to see what is on the ribbon at BCLK, DOUT, and WCLK? That would be a perfect insertion point for an ESP. IS there possibly a DAC between the ribbon termination and the amp?

Hey, I have actually been working quite a lot on mine (Echo 3rd gen dot) and have almost everything working independently but with finals coming up I haven’t had the time to put everything together. I will eventually do a full write up and make a GitHub repo. In the mean time ill try to post some resources here since the 2nd gen Echo is very close in design to the 3rd gen dot.

@Prismo I did manage to capture audio from two of the microphones but it was very distorted. Unfortunately this happened after a couple of hours of experimentation and configuring the TLV by hand using i2cset and compiling a customised TLV driver, sound card driver, and DT overlay.

I haven’t replicated it because I didn’t keep accurate notes on the settings.

As for the built in linux TLV driver, it will not work with the echo board for the following reasons:

  1. There is a bug in the setup of of the D-VAL (PLL fractional multiplier) which is used to set clock rates. I have reported this but, apart from an acknowledgement, the maintainers have taken no other action.
  2. The driver can not handle more than one TLV chip with the RESET pin connected to the same GPIO, The Echo board has 4. This is because of the initialisation sequence. The TLV must have the RESET pin driven low for at least 10ns and then get setup. This means that when the second TLV gets initialised it resets the first TLV which then loses its setup. The same is true of the 3rd and 4th TLVs.
  3. The driver assumes that if there is more than one channel then there must be 2. This throws of the calculation for bitclock rates. The Echo board uses at least 8 channels. This is why I was only able to capture from two microphones and maybe the cause of the distortion.
  4. The driver has no means of setting the channel offset which is required for TDM.

Up until about July, I was developing a custom driver for the TLV together with a custom sound card driver to integrate them into ALSA but then life got in the way and I haven’t revisited it since then. The release of Home Assistant Voice PE has re-ignited my interest and will probably look at it again next year.

@kuhnto. The BCLK, DOUT, and WCLK all connect to the TLV320ADC3101.

The Echo motherboard has a MediaTek MT6323LGA chip which is mainly a power management chip but it has built in mono 0.7W into 8ohm Class AB/D audio amplifiers. It might be using these to output analogue signals into the amplifier board.

The limited amount of data I was able to find provided the following 2 quotes about the MediaTek chip:

Full-set high-quality audio feature:
Supports uplink/downlink audio CODEC and high-power/quality audio amplifier

and

MT6323 provides mono 0.7W into 8Ω, high
efficiency Class AB/D audio amplifiers and
flexibility for various applications of indicator
LED drivers. It supports up to 4 channel LEDs
with independent controlled. Flexible control
includes: register mode, PWM mode and breath
mode.

EDIT:
Ignore all of the above. The motherboard has a TLV320DAC3203 on it. It is probably the analogue output from this that is used as the input for the amplifier.

Very keen on this recycling project. I currently have a dozen 2nd and 3rd gen echos around the house and repurposing them as Voice Assistant devices with home assistant would be a home run.

I had quite a lot of trouble with distorted audio from the microphones. I eventually found that the microphones required a strong ground connection. I have been using the spring pins on the board for this, if they aren’t connected the audio is unusable. Additionally, mimicking the DSP engine config also produced unusable audio, I have been using either the I2S mode or the TDM mode with the default DSP engine config.

I have been working on my own driver as-well but currently everything is being configured with a python script and using DTS with Rockchip’s I2S TDM driver to get the 4 microphone input from I2S. The I2S TDM driver has a bug in the most recent 5.XX kernel version that sets the clock rate wrong.

I have gotten quite sidetracked but I hope to get back working on this next month.

I’ve looked into the distorted audio I was getting and have come up with a couple of possible reasons as to why:

  1. The Pi has a maximum of 64 bits of audio data on the I2S data input. I may have had it set to 8 channels at 16 bits per channel. This would have resulted in attempting to put 128 bits of data on the stream. According to what I’ve read the Pi should just have dropped the extra 64 bits but if the Pi set the bitclock for 64 bits then each frame would have overrun into the next frame.

  2. The ADCs have digital input supply voltage of 1.8v. This means the output data stream may have highs as low as 1.26v (1.8 * 0.7). The minimum high voltage for a Pi is 1.3v so bits may have been getting dropped. This can be resolved by increasing the 1.8v to 1.95v (the recommended maximum for the ADCs) or adding a logic level shifter between the Pi and the microphone board.

1 Like

Hi, Thanks for finding that DAC for me. What are your thoughts (I do not have an echo in my possession) that a secondary I2S signal could replace the I2S from the stock design?

It would be fantastic if using the Echo Dots were feasible, because they drive me crazy. It feels like there hasn’t been any significant improvement in the last decade.

Just to share some information:

The TLV320ADC3101 features an Evaluation Kit available from Texas Instruments. You can find it here: TLV320ADC3101EVM-K Evaluation board | TI.com TLV320ADC3101 Evaluation Kit. Additionally, Texas Instruments provides software to interface with the chip.

Here is the documentation, including schematics and more details: TLV320ADC3101 Documentation: https://www.ti.com/lit/ug/slau267a/slau267a.pdf?ts=1738238817430

I plan to obtain this Evaluation Kit soon. TI also offers a simple scripting language for communication with the TLV, and you can adjust the registers effortlessly using a GUI.

However, I’m uncertain if the TLV in the Echo requires special firmware to be compatible with this software, and if so, whether it’s possible to flash a different firmware onto the TLV.

Here’s the documentation for the FTLV320DAC3203 https://www.ti.com/lit/ug/slau441/slau441.pdf?ts=1738245987963&ref_url=https%253A%252F%252Fwww.ti.com%252Ftool%252FTLV320DAC3203EVM-K

My approach would be as follows:

I propose using the USB-MODEVM included in the evaluation kit, which interestingly is €100 cheaper than purchasing the USB-MODEVM separately. First, I would read the register tables for the TLV320ADC3101 and TLV320DAC3203.

From what I understand, at startup, we need to program the registers via the microcontroller to configure the miniDSP. Are there additional settings beyond the register tables that need to be addressed?

Given that the amplifier is connected to the TLV320DAC3203, I assume it should function properly right away.

Am I missing anything else that might be crucial for setup or operation?

@chris1
I haven’t tried using TI’s software to interface with the TLV320ADC3101 but I have got it working. Here’s my script that configures the TLVs: TLV320ADC3101 Test Script
I originally wasn’t going to write a driver so I did spend the time to simplify the configuration in the script.

The script is a bit messy but it abstracts almost every possible configuration/command you can send to the TLV. I bit back I moved away from the RPI but it looks like I abstracted that out as-well so hopefully it still works with the RPI.

You can find my configuration for my Echo Dot Gen 3 at the bottom. I’m not sure that state I left the configuration in when I paused but it should be a close to working or a completely working configuration. You will need to configure the DTS overlay yourself however.

I tried to mimic the configuration completed my Echo Dot Gen 3 as much as possible but I had to make a lot of changes to get it 100% functional. It also completed a lot of redundant configuration and I haven’t tried to see what is actually needed and not.

For the MiniDSP engine configuration the coefficients I captured don’t seem to work, so you will find them commented out. The default coefficients seem to work fine however.

@SynAckFin
I have been using logic level shifter so that may very well be your issue. You can query the memory of the TLV to see if it is responding.

I have had plenty of issues getting my SBC to actually read the audio correctly but I was eventually successful through trial and error with different DTO configurations and TLV configurations. The channel offset of the TDMs is crucial otherwise they will just output on top of each other. Additionally I had tons of trouble getting the correct clock output (clock output differing from what I set in DTO) but that is most likely and issue with Rockchip’s drivers. Using the logic analyzer to check what the I2S stream and clock actually looked like helped a lot.

Here is what my setup looks currently:

I still haven’t had the chance to get working on it but I should be able to soon!

Really Great Work!

Great job on the project! I’ve ordered some level shifters and plan to test it out soon. I’m hoping to successfully integrate it with ESPHome, configure the TLV parameters at startup, and leverage the I2S integration.

Did you use an external amplifier to drive the speaker? I’m debating whether to invest time in utilizing the onboard DAC, or if it might be simpler to just use a standalone DAC module coupled with an operational amplifier.

Additionally, I’m starting to design a compact PCB featuring an FFC connector and an ESP32. The idea is to easily plug in the PCB, possibly incorporating a DAC/Amp on it as well.

It’s great to see progress can be made, and at depth too. Anything I can use the speaker for and it be de-Amazoned would be great.