Audio noise w/ WaveShare 1.3 IPS HAT (SOLVED)

Raspberry Pi hardware discussion (including peripherals)
Post Reply
Palmore
Posts: 4
Joined: Sat Sep 15, 2018 8:48 am

Audio noise w/ WaveShare 1.3 IPS HAT (SOLVED)

Post by Palmore » Sat Sep 15, 2018 9:14 am

I'm working on a Pi0cket style mni Raspberry Pi 0 (non-wifi) build to run retropie on.

Originally I was testing out the WaveShare 1.44inch TFT LCD/Button hat and I wired audio up to GPIO 18 with out issue.

I then swapped the display to the WaveShare 1.3inch ISP LCD/Button hat and began getting horrible whine in the audio. (Same exact wiring).

Below is my setup

Raspberry Pi Zero
WaveShare 1.33 IPS Hat https://www.waveshare.com/w/upload/6/6b ... ual_en.pdf
B103 10k Pot https://www.amazon.com/gp/product/B00O9 ... UTF8&psc=1
PAM8403 2channel amp https://www.amazon.com/gp/product/B00XA ... UTF8&psc=1

I'm only concerned with single channel audio as I will pretty much only be playing NES on this device ( and GPIOs 13 and 19 are taken up by the buttons on the hat)

I've added the following lines to my /boot/config.txt

dtoverlay=pwm,pin=18,func=2
disable_audio_dither=1
force_pwm_open=0

With force_pwm_open=0 set, the hiss/whine only occurs while a game is loaded, with out that option the hiss/whine starts at first game load and continues to reboot.

I've tried several wiring options, and even pulling audio from GPIO12 (its been such a train wreck the past 2 days trying to rid the whine noise, I'm fairly sure I got no audio out of GPIO12, even when assuring my settings are correct)


Lastly I've tried powering the AMP from an external power supply, but the whine persisted.

Below is my current wiring diagram. Be gentle, I spent 32 hours in MSPaint on it ;)
Audio Wiring.png
Audio Wiring.png (40.06 KiB) Viewed 1322 times
Last edited by Palmore on Sat Sep 15, 2018 8:34 pm, edited 1 time in total.

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2393
Joined: Thu May 05, 2016 8:33 am
Location: Fall River, MA
Has thanked: 1268 times
Been thanked: 2915 times

Re: Audio noise w/ WaveShare 1.33 IPS HAT

Post by Helder » Sat Sep 15, 2018 2:58 pm

Are you using a filtering circuit on the PWM audio coming out of the Pi? That might help clean the audio a bit.
My Sale Threads:

Retro PSU, 3.5A output!


Chat with me and other members


Don't contact me about obtaining my board files (as you will not get them). Don't contact me about any of my boards if they are sold out, they will be restocked as soon as I can get them.


Don't support thieves like ckliang who copied my AIO to resell and is now cloning the mintyPi, support the original creators and not the thieves!

Palmore
Posts: 4
Joined: Sat Sep 15, 2018 8:48 am

Re: Audio noise w/ WaveShare 1.33 IPS HAT

Post by Palmore » Sat Sep 15, 2018 5:05 pm

There currently is no filtering circuit inline, I'm trying to keep everything as compact and tiny as possible. Is there something super small that you are aware of that could assist? I'm still fairly new to all this, but loving the hobby.

Palmore
Posts: 4
Joined: Sat Sep 15, 2018 8:48 am

Re: Audio noise w/ WaveShare 1.33 IPS HAT

Post by Palmore » Sat Sep 15, 2018 7:19 pm

I ended up coming across this article and just setup the low-pass filter so far. And wow, night and day difference.

https://othermod.com/raspberry-pi-zero-audio-circuit/

I used a 270ohm resistor inline from GPIO18, then said resistor into a 33nf cap (going to ground). All hissing is gone, I'm guessing this is either due to the controller difference between the 1.44 and the 1.3inch LCDs and or the library used and how it communicates with the controller.. Introducing more noise?

Either way, low-pass filter has solved my problems, I'm surprised I had the parts on hand lol.

Thank you very much!

Palmore
Posts: 4
Joined: Sat Sep 15, 2018 8:48 am

Re: Audio noise w/ WaveShare 1.3 IPS HAT (SOLVED)

Post by Palmore » Sat Sep 15, 2018 8:36 pm

Another 15 hours in MSpaint and I present you the updated working diagram =) Thank you again
Audio Wiring.png
Audio Wiring.png (43.13 KiB) Viewed 1306 times

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests