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.
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.
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:
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
#dtoverlay=i2s-mmap
dtoverlay=generic-lj
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.
The prototype version of I2S stereo decoder |
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:
- 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 |
- To install soft-volume control and to perform other system configurations use Adafruit MAX98357 installation script:
- Copy "generic-lj.dtbo" file to "/boot/overlays" directory.
- 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:
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
#dtoverlay=i2s-mmap
dtoverlay=generic-lj
- Restart the Raspberry Pi, and now Raspbian is ready to use this new I2S decoder.
- First, test the system with simple audio formats like wave files using aplay command. For example:
- To play MP3 files use mpg123.
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