Page 3 of 8
Re: PWM Audio Guide
Posted: Fri Jun 10, 2016 11:13 am
by Spruc3Moose
Re: PWM Audio Guide
Posted: Sat Jun 18, 2016 3:25 am
by Kharmeleon
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
Re: PWM Audio Guide
Posted: Sat Jun 18, 2016 3:08 pm
by Kilren
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
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.
You don't need this if you're using RPi2/3
Re: PWM Audio Guide
Posted: Sat Jun 18, 2016 3:17 pm
by Kharmeleon
Kilren wrote: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
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.
You don't need this if you're using RPi2/3
Thank you for the answer mate!
Re: PWM Audio Guide
Posted: Fri Jun 24, 2016 7:44 am
by Ganreizu
So say i'm doing mono sound, is this the code i would use?
(for left channel?)
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
Re: PWM Audio Guide
Posted: Fri Jun 24, 2016 8:00 am
by tronicgr
Kilren wrote: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
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.
You don't need this if you're using RPi2/3
Actually there is a third option for sound on raspberry pi zero, I2S sound!
https://forums.adafruit.com/viewtopic.php?f=50&t=97961
Thanks
Thanos
Re: PWM Audio Guide
Posted: Fri Jun 24, 2016 6:26 pm
by SP33
Ganreizu wrote:So say i'm doing mono sound, is this the code i would use?
(for left channel?)
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
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)
so either try
Code: Select all
dtoverlay=pwm-1chan,pin2=13,func2=4
or
Code: Select all
dtoverlay=pwm-2chan,pin2=13,func2=4
(I'm unsure if pwm-1chan is valid)
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
Posted: Sat Jun 25, 2016 4:25 am
by joe7dust
SP33 wrote:Ganreizu wrote:So say i'm doing mono sound, is this the code i would use?
(for left channel?)
vs
Code: Select all
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
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)
so either try
Code: Select all
dtoverlay=pwm-1chan,pin2=13,func2=4
or
Code: Select all
dtoverlay=pwm-2chan,pin2=13,func2=4
(I'm unsure if pwm-1chan is valid)
or you could just use the original code and not use pin 18, only hook up pin 13 (left channel) just to be sure.
Where do we put our speaker's ground? I'm not using to a channel only having 1 wire, it is usually 2.
Re: PWM Audio Guide
Posted: Sat Jun 25, 2016 5:53 am
by SP33
@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.
Re: PWM Audio Guide
Posted: Sat Jun 25, 2016 6:43 am
by joe7dust
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