Pwm audio

Having trouble with your GBZ build? Ask your questions here!
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

Post by rodocop » Wed Jan 23, 2019 3:06 pm

It's just a common ground board, but it has added routing for audio and power to pass through. but does nothing other than buttons presses. I typically don't use those amps, and when I do, I always use mono anyway. So Correia may be right, in that they just don't like to be bridged.

User avatar
correia5022
Posts: 202
Joined: Mon Dec 05, 2016 12:32 am
Location: Portugal
Has thanked: 17 times
Been thanked: 38 times

Re: Pwm audio

Post by correia5022 » Wed Jan 23, 2019 3:12 pm

in the photo you send, the wiring is correct.

What you can do to get stereo to mono speaker, is wire a 1k ohm from each L and R of the button pcb to meet the Lin of the amp. then wire the speaker to the L out

L--<1k>------- Lin (amp)
|
R--<1k>-|
________________________________________
Starting on electronics :)
My first build, 2 years later
https://sudomod.com/forum/viewtopic.php ... 8&start=30
Check out my Boombox: https://nrcboombox.wixsite.com/website

User avatar
correia5022
Posts: 202
Joined: Mon Dec 05, 2016 12:32 am
Location: Portugal
Has thanked: 17 times
Been thanked: 38 times

Re: Pwm audio

Post by correia5022 » Wed Jan 23, 2019 3:18 pm

rodocop wrote:
Wed Jan 23, 2019 3:06 pm
It's just a common ground board, but it has added routing for audio and power to pass through. but does nothing other than buttons presses. I typically don't use those amps, and when I do, I always use mono anyway. So Correia may be right, in that they just don't like to be bridged.
Maybe i am mistaken, but the photo sugests a aio board (because of the layout):
https://glitchdgaming.com/index.php/shop/

Neverdeless, its not the point here...
EDIT Actually it has... you are using the pwm without lowpass filter? It can happen that the voltage was too much that when you bridged the output on the amp, you fried it..

Here's another explanation on that:
SpoilerShow
If PWM is used for audio output then there is a DC component to the output, that is, if the PWM output is alternating between 0 and 3.3 V, the average "no sound" voltage is 1.65 V which will waste power, needlessly heat up the output device, and possibly cause distortion. Thus a DC blocking capacitor (high pass filter) makes sense.

PWM produces an "analog" output by switching rapidly between fully on and fully off with varying duty cycle. This produces undesired high frequency components at and above the switching frequency. A low pass filter will attenuate these frequencies.

source:
https://www.raspberrypi.org/forums/view ... p?t=158264
Here's an explanation on the pam8403
SpoilerShow
PAM8403(H) has 2 amplifier stages inside. Each one is bridge type, in order to apply the maximum (rail to rail) voltage to the loudspeaker. So, if you tie together the amplifiers outputs thinking to double output power with the same loudspeaker, you are out of way. So doing you'll have double current capabilities only and you'll have to half loudspeaker impedance (I say 2ohm) in order to obtain more output power.
Anyway you'll have a problem: if the amplifier have different duty cycles (also slight) we'll have a current circulating between the outputs stages and this is evident measuring the current consumption without signal. This will increase power dissipation, lower the efficiency and potentially fail your device.

source:
https://www.diyaudio.com/forums/class-d ... nnels.html
________________________________________
Starting on electronics :)
My first build, 2 years later
https://sudomod.com/forum/viewtopic.php ... 8&start=30
Check out my Boombox: https://nrcboombox.wixsite.com/website

User avatar
Robochris
Posts: 310
Joined: Thu Feb 16, 2017 7:49 am
Location: Ohio
Has thanked: 82 times
Been thanked: 41 times

Re: Pwm audio

Post by Robochris » Wed Jan 23, 2019 4:33 pm

heres the funny thing, I got fed up and put helders aio back in it.. now its perfectly fine.... a day and a half wasted.
Oh well.

User avatar
Robochris
Posts: 310
Joined: Thu Feb 16, 2017 7:49 am
Location: Ohio
Has thanked: 82 times
Been thanked: 41 times

Re: Pwm audio

Post by Robochris » Wed Jan 23, 2019 6:06 pm

So, I guess the problem is solved.

Edit: I take that back. Still getting multiple button presses every-so-often. It’s extremely frustrating when playing menu based rpgs.

If anyone has any suggestions please let me know.

User avatar
correia5022
Posts: 202
Joined: Mon Dec 05, 2016 12:32 am
Location: Portugal
Has thanked: 17 times
Been thanked: 38 times

Re: Pwm audio

Post by correia5022 » Fri Jan 25, 2019 11:40 am

Robochris wrote:
Wed Jan 23, 2019 6:06 pm
So, I guess the problem is solved.

Edit: I take that back. Still getting multiple button presses every-so-often. It’s extremely frustrating when playing menu based rpgs.

If anyone has any suggestions please let me know.
Well, probably there was a problem with the common ground board in the pwm traces...

As for the Helder AIO, try sending him a mesage. Is it the AIO 2.2? Maybe trying to reprogram the atmega adding some delay after pressing a key..
________________________________________
Starting on electronics :)
My first build, 2 years later
https://sudomod.com/forum/viewtopic.php ... 8&start=30
Check out my Boombox: https://nrcboombox.wixsite.com/website

User avatar
Robochris
Posts: 310
Joined: Thu Feb 16, 2017 7:49 am
Location: Ohio
Has thanked: 82 times
Been thanked: 41 times

Re: Pwm audio

Post by Robochris » Sat Jan 26, 2019 8:33 am

correia5022 wrote:
Fri Jan 25, 2019 11:40 am
Robochris wrote:
Wed Jan 23, 2019 6:06 pm
So, I guess the problem is solved.

Edit: I take that back. Still getting multiple button presses every-so-often. It’s extremely frustrating when playing menu based rpgs.

If anyone has any suggestions please let me know.
Well, probably there was a problem with the common ground board in the pwm traces...

As for the Helder AIO, try sending him a mesage. Is it the AIO 2.2? Maybe trying to reprogram the atmega adding some delay after pressing a key..
I’ve been through all that. I’ve reached out to him before and he just directs you to the forum about reprogramming his board. When I did reprogram, it did help. But not 100%. It just doesn’t feel like a controller.

The common ground board felt fine but the audio wouldn’t work. I think I’ll end up building a new one from scratch.

User avatar
Robochris
Posts: 310
Joined: Thu Feb 16, 2017 7:49 am
Location: Ohio
Has thanked: 82 times
Been thanked: 41 times

Re: Pwm audio

Post by Robochris » Sat Jan 26, 2019 9:12 am

rodocop wrote:
Wed Jan 23, 2019 3:06 pm
It's just a common ground board, but it has added routing for audio and power to pass through. but does nothing other than buttons presses. I typically don't use those amps, and when I do, I always use mono anyway. So Correia may be right, in that they just don't like to be bridged.
Which amps do you prefer?
I got a small pack of these pretty cheap but never really had success with them. Maybe that’s the root of my problem. I used an adafruit amp once (it was purple so I don’t really know if it was authentic) but I didn’t have very good results with that one either.

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

Post by rodocop » Sat Jan 26, 2019 12:17 pm

I just use the adafruit pam8403 ones (blue ones). Still not great, but I found them to be better than the cheapo green amps. But lately I've been using i2s. Little pricey. But quality is amazingly better.

https://learn.adafruit.com/adafruit-max ... d-mono-amp

User avatar
correia5022
Posts: 202
Joined: Mon Dec 05, 2016 12:32 am
Location: Portugal
Has thanked: 17 times
Been thanked: 38 times

Re: Pwm audio

Post by correia5022 » Sat Jan 26, 2019 1:02 pm

rodocop wrote:
Sat Jan 26, 2019 12:17 pm
I just use the adafruit pam8403 ones (blue ones). Still not great, but I found them to be better than the cheapo green amps. But lately I've been using i2s. Little pricey. But quality is amazingly better.

https://learn.adafruit.com/adafruit-max ... d-mono-amp
Yeah, these look really great, because its aio, but i think they dont fit if you want to use headphones.

I bought the pam8302, its mono amp.
https://pt.banggood.com/CJMCU-832-PAM83 ... 03106.html

Also i'm expecting some PCM DAC boards to attach the mono amp
https://pt.aliexpress.com/item/Interfac ... 46058.html
________________________________________
Starting on electronics :)
My first build, 2 years later
https://sudomod.com/forum/viewtopic.php ... 8&start=30
Check out my Boombox: https://nrcboombox.wixsite.com/website

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest