PWM Audio Guide
- Spruc3Moose
- Posts: 34
- Joined: Thu May 05, 2016 4:00 am
- Location: Maryland
- Has thanked: 2 times
- Been thanked: 5 times
Re: PWM Audio Guide
So I built my filter today, but not sure if it is hooked up right. I just thought I would post it here for some feedback. I have not hooked it up the pi zero yet because I am not sure which wires go where. I have the two wires from the amp (from the guide) ready to go, but not sure which ground to use going into the filter and out. Also not sure where the pot wheel goes in this setup. Any help would be great...or I will just wait until the next guide.
-
- Posts: 25
- Joined: Thu May 05, 2016 12:05 pm
- Has thanked: 2 times
- Been thanked: 1 time
Re: PWM Audio Guide
Sorry for the question but why is it necessary to use that low pass filter? Would it be necessary to use it at the audio jack output of a raspberry pi 3? Thanks for any statement about that in advance. Greets
- Kilren
- Posts: 574
- Joined: Wed May 11, 2016 4:40 pm
- Location: Washington, USA
- Has thanked: 35 times
- Been thanked: 84 times
Re: PWM Audio Guide
This is for the raspberry pi zero because it does not have audio out naturally. You have two choices to get audio out on RPi0: by PWM low-filter, or by usb-dac.Kharmeleon wrote:Sorry for the question but why is it necessary to use that low pass filter? Would it be necessary to use it at the audio jack output of a raspberry pi 3? Thanks for any statement about that in advance. Greets
You don't need this if you're using RPi2/3
-
- Posts: 25
- Joined: Thu May 05, 2016 12:05 pm
- Has thanked: 2 times
- Been thanked: 1 time
Re: PWM Audio Guide
Thank you for the answer mate!Kilren wrote:This is for the raspberry pi zero because it does not have audio out naturally. You have two choices to get audio out on RPi0: by PWM low-filter, or by usb-dac.Kharmeleon wrote:Sorry for the question but why is it necessary to use that low pass filter? Would it be necessary to use it at the audio jack output of a raspberry pi 3? Thanks for any statement about that in advance. Greets
You don't need this if you're using RPi2/3
Re: PWM Audio Guide
So say i'm doing mono sound, is this the code i would use?
(for left channel?)
vs
Code: Select all
dtoverlay=pwm-1chan,pin=18,func=2
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
- tronicgr
- Posts: 143
- Joined: Tue Jun 07, 2016 4:26 pm
- Has thanked: 95 times
- Been thanked: 67 times
- Contact:
Re: PWM Audio Guide
Actually there is a third option for sound on raspberry pi zero, I2S sound!Kilren wrote:This is for the raspberry pi zero because it does not have audio out naturally. You have two choices to get audio out on RPi0: by PWM low-filter, or by usb-dac.Kharmeleon wrote:Sorry for the question but why is it necessary to use that low pass filter? Would it be necessary to use it at the audio jack output of a raspberry pi 3? Thanks for any statement about that in advance. Greets
You don't need this if you're using RPi2/3
https://forums.adafruit.com/viewtopic.php?f=50&t=97961
Thanks
Thanos
Re: PWM Audio Guide
I have not tried mono sound myself yet but from my own tests, pin 18 was outputting in the right channel so I believe pin2 and func2 would be for left channel (pin 13)Ganreizu wrote:So say i'm doing mono sound, is this the code i would use?
(for left channel?)Code: Select all
dtoverlay=pwm-1chan,pin=18,func=2
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
so either try
Code: Select all
dtoverlay=pwm-1chan,pin2=13,func2=4
Code: Select all
dtoverlay=pwm-2chan,pin2=13,func2=4
or you could just use the original code and not use pin 18, only hook up pin 13 (left channel) just to be sure.
Re: PWM Audio Guide
Where do we put our speaker's ground? I'm not using to a channel only having 1 wire, it is usually 2.SP33 wrote:I have not tried mono sound myself yet but from my own tests, pin 18 was outputting in the right channel so I believe pin2 and func2 would be for left channel (pin 13)Ganreizu wrote:So say i'm doing mono sound, is this the code i would use?
(for left channel?)Code: Select all
dtoverlay=pwm-1chan,pin=18,func=2
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
so either tryorCode: Select all
dtoverlay=pwm-1chan,pin2=13,func2=4
(I'm unsure if pwm-1chan is valid)Code: Select all
dtoverlay=pwm-2chan,pin2=13,func2=4
or you could just use the original code and not use pin 18, only hook up pin 13 (left channel) just to be sure.
Re: PWM Audio Guide
SP33 wrote:@joe7dust Just use the same ground you used for the audio filter you just made, you can solder a wire where you attached the ground and to your audio plug.
I did that but it's not working. -_- http://imgur.com/f2L1mkn
Who is online
Users browsing this forum: No registered users and 1 guest