Outputting I2S to the ESP32 creates distortion
Posted: Thu Apr 15, 2021 5:19 pm
I've been trying to get sound out of this DAC board: Adafruit I2S Stereo Decoder - UDA1334A Breakout
I compiled and uploaded the I2S example from ESP-IDF to my ESP32 board, with the only change that I wanted to use pin 27 for data
out for easier wiring:
However, the output contains a lot of distortion. It is not just noise, but very distorted. I was only able to record the left channel, which should output a triangle wave. You can see the output for the three different bitwidths below:
Unfortunately, I don't now which is which.
The FFT analysis also seems to suggest that there is a triangle wave in there somewhere:
Lastly, I have tried the DAC with a Raspberry PI, where it does work as expected.
I compiled and uploaded the I2S example from ESP-IDF to my ESP32 board, with the only change that I wanted to use pin 27 for data
out for easier wiring:
Code: Select all
-#define I2S_DO_IO (GPIO_NUM_22)
+#define I2S_DO_IO (GPIO_NUM_27)
Unfortunately, I don't now which is which.
The FFT analysis also seems to suggest that there is a triangle wave in there somewhere:
Lastly, I have tried the DAC with a Raspberry PI, where it does work as expected.