Skip to content

SynAckFin/Echo-Retasker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retasking a 2nd Gen Amazon Echo

A collection of data and code to retask various parts of a 2nd generation Echo.

Instalation instructions are at the end.

*** WARNING ***

The current setup for the microphones means that the data voltage for the TLV320ADC3101 is too high. This is because the audio clocks generated by the Raspberry Pi operate at a levels of 5v and the voltage levels for the TLV320ADC3101 operate at 1.8v. As a result of this the IOVDD and DVDD voltages rise from 1.8v to about 2.3v (measured) which is above the maximum recommended rating of 1.95v but below the absolute maximum of 2.5v. The documentation states that operating above the recommended level could impact device reliability. An appropriate logic level shifter should be used between the Pi and the TLV320ADC3101 but I haven’t yet found one.

Current Status

Power Supply

The Echo power supply provides 3.8v, but, the LED/Mic board requires 3.8v, 3.3v and 1.8v to correctly function. In addition to this, if you intend to power a Raspberry Pi then 5v is also needed.

In order to facilitate this a DC-DC Buck converter is used to step down the 3.8v to 1.8v and DC-DC Boost converter to step it up to 5v. The 3.3v is provided by the Raspberry Pi.

When using the Echo as the power supply for a Raspberry Pi 4 I had to throttle the Pi to prevent under voltage. This was probably due to the cheap Boost converter I was using.

LED Ring

The LED ring is fully controllable via I2C and a program is provided to show various LED patterns.

Microphone Array

At the present moment you can only record from 2 of the 7 microphones.

Unfortunately, the Kernel provided for the Raspberry Pi does not include the driver for the TLV320ADC3101. This means you either have to modify the Kernel config and rebuild it, or copy the source file from the Kernel source tree and compile it independently. I chose the latter since it only take a few minutes as opposed to a few hours.

Light Sensor

There is a light sensor on the LED Ring board located by the ACTION button. Based upon its I2C address (0x39) and the response to some I2C queries I believe that this is an OSRAM TSL2540.

Amplifier

The chip used by the amplifier is a TPA3118D2 which is, apparently, an analogue input Class-D audio amplifier. Apart from that, I haven’t investigated the amplifier yet.

Installing

These instructions are based upon 64-bit Raspbian Lite OS version 12 (Bookworm).

You will need the following:

  • A 1.8v DC-DC Buck converter
  • A 5v DC-DC Boost converter (optional)
  • A Logic Level Shifter capable of handling I2C
  • A 37P 0.3mm pitch FPC/FFC breakout board
  • A 24P 0.5mm pitch FPC/FFC breakout board
  1. Wire everything up as shown in the Wiring diagrams
  2. Upgrade and install required packages
sudo apt update
sudo apt upgrade
sudo apt install git i2c-tools libi2c-dev dkms
  1. Add i2c-dev to /etc/modules using your favourite editor
  2. Edit /boot/firmware/config.txt and uncomment or add the following 2 lines:
dtparam=i2c_arm=on 
dtparam=i2s=on
  1. Reboot for changes to take effect
  2. Clone the repository and cd into it.
git clone https://github.com/SynAckFin/Echo-Retasker.git
  1. Setup various gpios. The privacy LED should turn off.
sh gpiosetup
  1. Build and test the LED ring app.
cd ledring
make
./ledring -h
./ledring test
cd ..
  1. Build and install the ADC driver
cd driver
sudo make install
sudo dtoverlay echo-2mic
  1. Configure the audio (only needs to be done once)
alsactl --no-ucm -f asound.conf restore
  1. Record 30 seconds of audio to test microphones
arecord -D plughw:CARD=echo2micvoiceca,DEV=0 -r 16000 -c 2 -f S16_LE -t wav -d 30 test.wav

About

Retasking the parts of a 2nd Generation Amazon Echo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors