Skip to main content

Simple I2S stereo decoder with amplifier

In this project, we build a simple I2S stereo decoder with an amplifier. To decode I2S data we use Princeton Technologies PT8211 16bit DAC. KA2206 audio power amplifier is used as the driver stage of this system.

The prototype version of I2S stereo decoder

Structure of this I2S amplifier is self-explanatory from the schematic. We select PT8211 and KA2206 combination due to lower cost and availability. Unfortunately, PT8211 DIP package is not available in the local market and we use SO package in our prototype. We design PCB for the DIP packages, and therefore we solder PT8211 SO package to PCB using "SO8 to DIP8" converter.

We design this system to work with 9V DC power source but at the prototyping stages, we noticed that it works well with lower DC voltage such as 5V. For the output use any 8Ω or 4Ω (5W or higher rated) full range speaker pair. We test this with 8Ω 8W oval speakers which are commonly found on televisions.


PT8211 test setup with Raspberry Pi 3

Technically this project should work with any 3.3V I2S bus. We test this with Raspberry Pi 3 I2S bus and it gives us excellent results. Due to different timing format of the PT8211 DAC, we use custom device tree overlay for this audio interface. The complete configuration details for Raspbian Stretch is described below:
  1. Connect I2S decoder with Raspberry Pi using the following mapping: 
J1 pin-out Description Raspberry Pi header pin
1 GND 6
2 DIN 40
3 WS 35
4 BCK 12
  1. To install soft-volume control and to perform other system configurations use Adafruit MAX98357 installation script:  
curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash
  1. Copy "generic-lj.dtbo" file to "/boot/overlays" directory.
  2. Open "/boot/config.txt" file and comment the "dtoverlay=i2s-mmap" line and add "dtoverlay=generic-lj" to a new line. After the above modifications dtoverlay section of the file looks like this:
dtoverlay=hifiberry-dac

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
#dtoverlay=i2s-mmap
dtoverlay=generic-lj

  1. Restart the Raspberry Pi, and now Raspbian is ready to use this new I2S decoder.
  2. First, test the system with simple audio formats like wave files using aplay command. For example:
 sudo aplay /usr/share/scratch/Media/Sounds/Vocals/Singer2.wav
  1.  To play MP3 files use mpg123.
To adjust the volume use alsamixer or volume control available at the graphical desktop.

If KA2206 is not available, or hard to find, use TEA2025 or TA7769 ICs, those chips are direct substitutes for KA2206 AF power amplifier.

The audio quality of this decoder is impressive but do not compare its audio quality with a high-end audio system or with high-resolution DAC based sound cards. As a summery, this DAC gives superb results for its price and simplicity.

Schematic and PCB design of this project are available to download at google drive.

Comments

Popular posts from this blog

CD2003 - yet another simple FM radio receiver

In the last few days, we are looking for some simple FM radio receiver to integrate into one of our ongoing projects. For that, we try several FM radio receiver ICs including TDA7000, CD2003/TA2003/TA8164, CXA1019, and KA22429. Out of all those chips we select CD2003 (or TA2003/TA8164) based receiver for our project because of its simplicity and outstanding performance. Except to CD2003, Sony CXA1019 also perform well but we drop it because of its higher component count. We design our receiver based on Toshiba TA2003 datasheet and later we try TA8164 and CD2003 with the same circuit. Either CD2003 or TA8164 can directly replace TA2003 IC, and as per our observations, TA8164 gives excellent results out of those 3 chips. A prototype version of CD2003 FM radio receiver The PCB design and schematic which we used in our prototype project are available to download at google drive (including pin-outs of crystal filters and inductors ). Except for CD2003 IC, this receiver consist

Arduino superheterodyne receiver

In this project, we extend the shortwave superheterodyne receiver we developed a few years ago . Like the previous design, this receiver operates on the traditional superheterodyne principle.  In this upgrade, we enhanced the local oscillator with Si5351 clock generator module and Arduino control circuit. Compared to the old design, this new receiver uses an improved version of an intermediate frequency amplifier with 3 I.F transformers. In this new design, we divide this receiver into several blocks, which include, mixer with a detector, a local oscillator, and an I.F amplifier. The I.F amplifier builds into one PCB. The filter stage, mixer, and detector stages place in another PCB. Prototype version of 455kHz I.F amplifier. In this prototype build, the Si5351 clock generator drives using an Arduino Uno board. With the given sketch, the user can tune and switch the shortwave meter bands using a rotary encoder. The supplied sketch support clock generation from 5205kHz (tuner frequ

Calculator for audio output transformers

Audio output transformers are heavily used in a vacuum tube and some (older) transistor base audio power amplifiers, but these days output transformer are quite hard to find and expensive item. For homebrew projects, the best option is to construct those transformers by ourselves and this script helps to calculate winding parameters for those transformers. This " AF output transformer calculator " script is written using Python and it works with most of the commonly available Python interpreters . The script is available to download at google drive under the terms of GNU General Public License version 3.0 . Homebrewed 25k: 4 output transformer Once supplied the input parameters this script provides a winding ratio, the number of turns required for primary and secondary winding and required copper wire gauges for both primary and secondary windings, etc. We construct several AF output transformers based on results of this script, which including transformers for M