-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alc_max above 0.4 causes distortion. #49
Comments
From my observation, any AMP which is not soldered to the board will have a distortion. On my device, i have the AMP placed on the circuit board itself, so it has direct connection to the ESP32, and the sound is crystal clear even with |
I could try to directly solder it to the board! Thanks for the tip! |
I've soldered it directly to the ESP32, same issue. |
Mine is on the PCB itself, so it uses traces to connect to ESP. One more thing to try, you can set the gain using the GAIN pad, thing is, if it left hanging, it will increase gain by default to +9dB. In the datasheet for the AMP you can see what you need to do to achieve different values of GAIN, from +3dB to +15dB. On +15dB and 100% volume with alc set to 0.5 even with my setup I can hear distortion. Also, signal filtering is a thing ) |
Yes, but I'm not sure where the distortion is coming from, the AMP, or the ESP. |
Have you tried a setup without the adf_pipeline? E.g. one of the officially provided ESPHome firmwares? Do you see the same issue then? |
The official ones don't work at all for me. |
(As in streaming on the official ones are broken) |
I will note that after soldering directly to the ESP32, alc_max of 0.5 sounds quite clear now. |
There is still some distortion on louder music though. |
I might end up buying a dedicated DAC instead of the combo and using the dedicated amps I have lying around (PAM8403) instead. |
@jonahnm PAM8403 in my experience (i have 20 of them ready to go to the trash bin) is a pretty bad AMP. If you are willing to do things right (read the datasheet for it and then filter the signal) and want to have a good sound, you kinda have to go MAX98357. I have tried out about 5 or 6 PAMs and none of them were able to produce the sound to my liking (ordered couple of batches from different sellers on the amazon) Here is the example i can provide you with recorded on the Galaxy S24 Ultra from 2 meters away, phone pointed at me, device in the enclosure designed by me, (sorry for applied volume normalization, AI stuff is killing me on this device) with volume being set to 100% on my speaker (also, had to use a dodgy online converter to make a WEBM out of M4A file, so there might be some sound quality degradation). Voice.240713_033530.webmSpecs of this device:
The only cables i have are the ones from the board (ESP32-S3 -> Dip switches for gain -> AMP ->Speaker) to the speaker itself. Rest is on the PCB. Honestly, cant complain about the sound. P.S. I am no sound specialist, but from browsing the internet I found out that oversizing the speaker is a good practice, so for a 3W AMP you might want to have 5W+ speaker. Yet again, no idea if it actually makes sense, I've just ordered few packs of 2x 10W full range speakers (passive ones), as when I got ADA1314 i ordered initially, the looked flimsy as hell. P.P.S. Honestly, even surprised that you can achieve with a 40 USD custom board (printing and assembly) and about 5 USD on the LED + Mic + Speaker side and other 2 USD in 3D printing costs. Just tried Alexa and my speaker side by side, and the only thing that differs is the bass on the lower volume on Alexa, yet it cannot come even close in the max volume. DIY and projects like this one are really changing the world. |
I know right, lol, anyways I'm trying to make my own implementation for everything using PWM audio with a low pass filter rather than a dedicated AMP. I also bought ESP32-S3s as they have more RAM, just in case the clipping was a decoder issue. |
As far as I can tell, this is not caused by my dac, amp or speaker as it happens even if I lower the gain on the amp itself.
DAC/AMP: MAX98357A
The text was updated successfully, but these errors were encountered: