PWM audio, with only a speaker, no headphones or pot

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

PWM audio, with only a speaker, no headphones or pot

Post by rodocop » Tue Sep 20, 2016 9:14 am

Hi there,

I'm only planning on doing a mono speaker, no headphones or volume wheel, and I am having some issues. I have built a low pass filter, and have it wired to my adafruit mono amp. So the order goes GPIO 18 to low pass, ground from power strip to low pass, low pass goes to the mono amp, then the speaker. The speaker works and produces sound, but there is a ton of static. I first tried with just the amp, and it had a lot of static, so I thought adding the filter would clear that up, when I added the filter it made no difference whatsoever. I followed Wermy's guide, as well as PWM audio guide by SP33.

I have added these lines to my config.txt;
dtoverlay=pwm,pin=18,func=2
disable_audio_dither=1

I'm wondering what I can do to get rid of this static, or is anyone has seen this issue and had it resolved. I may just go the USB DAC route if this won't work. I will attach a photo of the amp and filter, as well as a little diagram, if it helps. I just really have no idea where to go from here, and any help will be appreciated. I fell like I have created the filter correctly, and I figure it would at least show some difference when attached, but the fact that no change occurs when I have the filter wired makes me think I must have done something wrong....
audio.jpg
Wiring diagram I made
audio.jpg (67.92 KiB) Viewed 4216 times
2.jpg
View of my filter
2.jpg (3.59 MiB) Viewed 4216 times
1.jpg
View of the amp
1.jpg (3.36 MiB) Viewed 4216 times

Tim
Posts: 23
Joined: Sun Sep 04, 2016 5:24 am
Been thanked: 3 times

Re: PWM audio, with only a speaker, no headphones or pot

Post by Tim » Tue Sep 27, 2016 8:25 am

i haven't got the Adafruit amp but maybe it's the pot?
http://www.sudomod.com/forum/viewtopic.php?f=8&t=1498

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: PWM audio, with only a speaker, no headphones or pot

Post by rodocop » Tue Sep 27, 2016 9:24 pm

Well thanks for that, I did not know about the alsamixer command. I was able to mostly get rid of the static now. What I have done is put the volume to max in alsamixer, and then I manually turned the volume down on the mono amp (I also just realized that the adafruit amp had its on small trim pot).

With the volume maxed in alsamixer and the mono amp manually changed to a lower volume I get barely any static. I can notice it when i hold my ear to the speaker, but otherwise I can't really tell. It was such an easy fix, too bad it took 2 weeks to figure it out....

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest