Really interesting, I came for the 3.5mm jack on Pi Zero W/ 2W, so my question is "what do we lose by not having the buffer, and what suitable through-hole/analog replacement is there?" Would love to see the difference in waveform, maybe a nerd of the future will oblige us on a circuit simulator. Thanks for the content!
@BytesNBits Жыл бұрын
Hi. This tutorial is really to get some sound out of the Pi with the minimum of external components. I made another sound video using the digital sound output wich gives you much better quality sound with the addition of a small I2S amplifier.
@BurAndBY Жыл бұрын
Hello! What the diode part of the circuitry does?
@BytesNBits Жыл бұрын
The diodes filter out any large positive or negative spikes in the audio signals. For normal signals levels (0-3.3V) they are reverse biased. Negative or >3.3V signals will cause one of the diodes to conduct clamping the audio signal voltage.
@tanmayfuse17472 жыл бұрын
Hey can you please give some information about how I can use 0.5w 8ohm speaker with rpi zero?
@BytesNBits2 жыл бұрын
Hi. You'll need some sort of amplifier circuit connected to the Pi Zero, as in the video. If you don't need the headphone output you can skip that part of the circuit. You need to make sure that the amplifier is not going to pump too much power into the speaker. If you connect it directly to the 2W amplifier from the video you'll probably damage the speaker. You can either try to find a matching amplifier or use a series resistor with the speaker to effectively reduce the power dissipated in it - remember though that the excess power will be dissipated in the resistor so if you're trying to dump 1.5W it's going to get hot. One option to try first might be to connect directly to the unamplified signal signal (where the headphone socket is connected in the video). It might be able to drive the speaker directly - I haven't tried this. I hope this helps.
@mimi-mk9eu3 жыл бұрын
I got a joke what's a machine's favorite food raspberry pi
@jochen_schueller2 жыл бұрын
no
@ZaneCochran2 жыл бұрын
I've really been enjoying this tutorial! I'm having the same issue as some others have with there being no headphone option when I run raspi-config (it's only showing HDMI). I've run all the updates, restarted, and still no luck. Any ideas on how to fix this?
@ZaneCochran2 жыл бұрын
Just a follow up for anyone else having this issue. I did a fresh install of RetroPi and checked the sound settings before I started any of the tutorials. I saw that the headphones were an option, so it might have been something I did along the way. I avoided running any updates on the RetroPi software, so maybe something about that update is breaking the audio?
@BytesNBits2 жыл бұрын
Did you install the gpionext software to run the game controller buttons. That can cause the sound pin assignments to get overridden. I made a second video covering the fix for this. kzbin.info/www/bejne/j6KpZI1mdqahf7s
@IRFANKHAN-mr7uc2 жыл бұрын
hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 18 and 19
@stefanolassandro886 Жыл бұрын
@@IRFANKHAN-mr7uc You saved my whole project mate, you're the legend!
@justanotherdude_767 ай бұрын
@@IRFANKHAN-mr7uc dude this doesnt work i tried going into raspi config to change audio device it doesnt show up i tried running test audio it doesnt work
@Gazenbeek5 ай бұрын
Great video! In did everything like you did. But adding in config.txt gpio=18,19=a5 does not give a alternate state gpio readall say they stay the same.. using retro pie 4.3 because its faster on a zero
@BytesNBits5 ай бұрын
I'm not sure why that's not working. You'll need to check if something else is resetting the pin. The config.txt settings are put in place right at the start of bootup.
@Gazenbeek5 ай бұрын
@@BytesNBits i got it working with rc.local methode you mentioned. Thanks. But audio is hizzing. So going the i2s route. Will get the board next week 💪
@ravkhangurra75222 жыл бұрын
Great video, i am having some issues with getting sound outout from a raspberry pi 4. I have a PAM8403 5V amplifier connected to some speakers. How can i get audio output from Pi4 onto a couple of GPIO pins to the RTL pins on the PAM8403, what configuration is needed?
@BytesNBits2 жыл бұрын
Hi. You should be able to connect the output from the headphone socket directly to your amplifier input. I haven't got a Pi4 here but there's usually a couple of solder points under the jack socket to solder onto the signal lines. If you need it on the GPIO pins have a go with the info in the video to try to route the sound as with the Pi zero. Let me know how you get on.
@owencooper99343 ай бұрын
I know that this video is older, but I could really use some help. Do you have the technical name for the type of jack you used. Or maybe a link to where I could buy the component. I am having a hard time finding that piece.
@BytesNBits3 ай бұрын
I used a 3.5mm stereo jack plug and socket. If you search for that it should pop up.
@RahulPandit-fm9bg3 жыл бұрын
Please help me I am not getting that headphone option in audio only I get HDMI
@BytesNBits3 жыл бұрын
Hi Rahul. Have a check through all the steps in my blog post - bytesnbits.co.uk/raspberry-pi-zero-analog-sound/. Make sure you've enabled the sound system and installed the driver software and allocated the pins. Restart the Pi and see if you get any options.
@DFMurray2 жыл бұрын
@@BytesNBits Same issue here. I have gpio=18,19=a5 in the config file and verified that alt5 is set on the pins. Also ensured dtparam=audio=on in the config file as well.
@IRFANKHAN-mr7uc2 жыл бұрын
@@DFMurray hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 18 and 19
@IRFANKHAN-mr7uc2 жыл бұрын
@Rahul pandit hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 18 and 19
@YueWang-xc8er Жыл бұрын
Hi, I’ve finished setting up the software and hardware, but it’s so confused that, I have to connect the positive pin of the speaker to the ground, then there’s a sound, if I follow the tutorial and connect it to VO+ of the amplifier, then totally no sound. Can you give some advice about this? Actually it works fine now but I really can’t understand why.
@BytesNBits Жыл бұрын
I'd check your circuit and look at the amplifier datasheet if you're not using the same one as me. Make sure your decoupling capacitors are the right way round.
@umutkayacan76593 жыл бұрын
Wait how are you gonna put the console into a casing?
@BytesNBits3 жыл бұрын
Hi. We'll have to design and make a custom pcb to put all the parts onto one circuit board. This will fit inside a 3D printed case. So a few more stages left to go!
@umutkayacan76593 жыл бұрын
@@BytesNBits that episode will be epic!
@ilouzze64612 жыл бұрын
Hello, hey what do I need to do if when I enter the command "gpio readall" it tells me "Oops - unable to determine board type... model: 18"? It got the raspberry pi zero 2 w and I'm trying to connect some 8ohm speakers to it. Salutations!
@BytesNBits2 жыл бұрын
Hi. I haven't tried this on the zero 2W. From what I can see it looks like the library packages are not compatible with the Zero 2W. Have a look at forums.raspberrypi.com/viewtopic.php?t=325406. You need to rebuild the binaries from the GitHub repository.
@Ryan-cx2fn3 ай бұрын
When I enable sound to come out of GPIO 12 my joystick up stops working which is a completely different GPIO and is on a 1.3in lcd hat so I know wires are not touching. What would be the reason for this?
@BytesNBits3 ай бұрын
Have a look at this video. Sometimes you get a clash in the IO pin mapping. kzbin.info/www/bejne/j6KpZI1mdqahf7s
@Ryan-cx2fn3 ай бұрын
@@BytesNBits thanks for the help. I just tried this and still having issues. I did all of that and once I put in dtoverlay=audremap,pins_12,enable_jack=on disable_audio_dither=1 gpio=12,a0 the sound will work but then the pin wont. Even with putting in the gpio pin suggestions.
@SuperBootyBay Жыл бұрын
Does the HDMI port not have Audio? if so could you not just split the line and use the audio signal from that?
@BytesNBits Жыл бұрын
I'm not sure how the audio signal is transmitted over HDMI. I don't think it's on a separate set of wires (just guessing) but is probably bundled up in some data stream. Worth looking into I guess.
@preferredimage2 жыл бұрын
Struggling to get analog audio working on a pi zero 2 w with the pi 2/3 daily image. Just seem to get HDMI audio as a choice in raspi-config, no force 3.5mm jack.
@BytesNBits2 жыл бұрын
Hi. This may well be one of the areas where the image has the wrong drivers. Have you tried doing a full update of the system? This might pick up the new software.
@preferredimage2 жыл бұрын
@@BytesNBits Full update didnt seem to change things. I burnt the raspberry OS to another card and that says it has an MAI PCM i2s-hifi-0 as its sound device but I guess this could just be whats driving the HDMI output. The retropie reports it as bcm2835 HDMI 1 so further investigation needed..
@BytesNBits2 жыл бұрын
@@preferredimage You could have a go with the new Recalbox image. They've made one that has the updated drivers for the Pi Zero 2. It's still a big buggy but it might let you see if the updated kernel solves the problem. I made a video on the installation here - kzbin.info/www/bejne/q3KwhYdtpLR3hpY
@preferredimage2 жыл бұрын
@@BytesNBits Will check it out. have a USB sound device attached at the moment and that works without any drivers needed adding but its got terrible interference so this new image might just solve things.
@IRFANKHAN-mr7uc2 жыл бұрын
hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 18 and 19
@IRFANKHAN-mr7uc2 жыл бұрын
sir i am using a raspberry pi zero w model and i am not getting the headphone option on rasp-config menu under system settings it shows me only hdmi please help me i would be really thankful to you
@BytesNBits2 жыл бұрын
Hi. Make sure you've got all the lines added and uncommented in config.txt and have installed the sound driver. When you reboot you should have the option pop up.
@IRFANKHAN-mr7uc2 жыл бұрын
@@BytesNBits sir i have tried all thoes settings the pins are at alt5 state but still it doesn't show me headphone option 😓
@ProfessorGears_LT Жыл бұрын
Hi mate, love the tutorials but im having some problems. I have sound working from the pi but its very low, Ive turned up the volume in retropie and in the sound mixer but its still low. Also when I load into the audio settings in retropie when choosing the sound output I get an error which says 'failed to find mixer elements'. I did once upon a time have audio working properly but its been so long since I visited this project again, I cant remember how I got it to work. My hardware is working fine too. Do you have any solutions maybe there's a driver missing im not too sure? Thanks
@BytesNBits Жыл бұрын
I'd try uninstalling and re installing the alsa packages. Make sure you've got the right audio selections in RetroPie. Are you feeding the sound through an amplifier or just the headphones?
@ProfessorGears_LT Жыл бұрын
@@BytesNBits Hi there sorry for the late reply, for some strange reason I didnt get a notification of your comment. How do uninstall/install the ALSA packages? and yes I am using an amplifier via pin 18
@ProfessorGears_LT Жыл бұрын
@@BytesNBits Ive tried uninstalling and reinstalling nothing works still the same...
@ProfessorGears_LT Жыл бұрын
@@BytesNBits Problem solved! I reinstalled retropie then instead of using pin 18 I used pin 13 and works excellently, thanks for the bud!
@bodhi33513 жыл бұрын
hey can u please make a video on running pi with simple battery power
@BytesNBits3 жыл бұрын
Hi. Digital I2S sound coming next, then battery power!
@bodhi33513 жыл бұрын
@@BytesNBits ok, awesome!!! can we use four 1.2v li-ion batteries and then an arduino nano to step it down to 5v and connect it to vin pin of raspberry pi zero/ raspberry pi 4B, then will it work?
@BytesNBits3 жыл бұрын
Hi. I'd advise against this route. I don't think connecting li-ion batteries in series works without some careful thought and some extra control circuitry. If one battery is weaker than the others it can cause issues. Also if you're using the nano to regulate the supply voltage you'd need to check the current capabilities of it's regulator. The usual approach, and the one I'll be taking, is to use a single battery with a boost converter to get to the required voltage level. This also allows the battery to be charged in situ with some extra circuitry. Please don't recharge the batteries when connected in series! I hope this helps.
@bodhi33513 жыл бұрын
@@BytesNBits oh i never thought about problems in ur first paragraph Thanks a lot
@joshuaplank883 Жыл бұрын
I've tried this process, and a couple others, but for some reason the only audio output available is HDMI. The Pi is not showing anything else.
@BytesNBits Жыл бұрын
Hi. A few people get the same result. I suspect there is some sort of conflict going on in the system. Check all your settings and if all else fails try burning a fresh SD card image and see if you can get that to work from a clean install. If it odes you know the hardware and software are OK and it's something in your overall setup.
@jezclark353610 ай бұрын
Would it not be easier to just use bluetooth audio out?
@BytesNBits10 ай бұрын
The objective here was to connect some local speakers so you could use this for something like a handheld games console.
@kunalkataria12 жыл бұрын
Hey, Thanks for the help. I have a doubt, as soon as I jump to raspi config, I am not getting the headphone option, as soon as I enable HDMI options in /boot/config.txt, The HDMI Option shows up on audio. How will the headphone option come?
@BytesNBits2 жыл бұрын
Hi. Have a look at the video at this point kzbin.info/www/bejne/gYi8kKp_Ypype68 Make sure you've got all the correct options turned on, especially the dtparam=audio bit. Also check that you've got the pins in their ALT state to enable the sound output as well by running the gpio readall command. Let me know if you get it going - good luck!
@kunalkataria12 жыл бұрын
@@BytesNBits The pins are already in ALT State and I added the command to config.txt and also dtparam=audio is turned on. Still the options are not coming.
@BytesNBits2 жыл бұрын
@@kunalkataria1 That's an odd one. Can you post your config.txt file?
@IRFANKHAN-mr7uc2 жыл бұрын
@@kunalkataria1 hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 180 and 19
@IRFANKHAN-mr7uc2 жыл бұрын
its 18 not 180
@YueWang-xc8er Жыл бұрын
Hi, now there’s no headphone option after update, I can only choose hdmi, how should I solve this?
@BytesNBits Жыл бұрын
Have you checked the settings in the config.txt file? They might have been overwritten.
@YueWang-xc8er Жыл бұрын
@@BytesNBits Hi, thank you for your help. I really enjoy your video. Yes, i first added "dtoverlay=pisound" and "dtparam=audio=on" into config.txt, but there's still no 3.5mm headphone option. And then i tried to use "amixer cset numid=3 1" to force it switch to the headphone output, but still failed to output a sound. I'm not sure if I built my circuit wrong, i don't have a headphone socket so i just skipped this part, connect the 2 wires after the decoupling capacitor directly to audio amplifier AIN+, is this possible?
@BytesNBits Жыл бұрын
@@YueWang-xc8er Hi. Your circuit should be fine. I can't think why you're not getting the headphone option. It will be something we've missed in the config.txt file. Have a look to make sure there are no conflicting settings or that a setting is being reset after being set etc. - I'm just guessing here :)
@YueWang-xc8er Жыл бұрын
@@BytesNBits hi, thank you so much for checking my circuit. I followed IRFAN KHAN‘ reply and it works, the headphone option comes back again. The code is dtoverlay=audremap, enable_jack=on, although I don’t know what’s that mean.
@dean-543 Жыл бұрын
Got stuck in raspi-config “no internal audio devices found”
@BytesNBits Жыл бұрын
Hi. Did you manage to get the GPIO pins assigned and the sound driver software installed. Make sure sound is enabled in the config.txt file. Make sure you reboot the Pi to get it all to take effect. You should then get the options.
@helenarodrigues58943 жыл бұрын
Do the programming codes work on pi@raspberrypi?
@BytesNBits3 жыл бұрын
Hi Helena. The full sized Raspberry Pis have the first half of the circuit built in (up to the line output signals at the headphone socket). You can turn on this sound output from the configuration tool without having to change the GPIO pin functions. If you want to amplify this signal you can then use the amplifier set up in the video. Make sure you check out the digital sound output video for a better quality sound output. kzbin.info/www/bejne/bXO7gGyLm7mZj6s
@helenarodrigues58943 жыл бұрын
@@BytesNBits Thanks. You helped me a lot.
@nwordpass59602 жыл бұрын
Hey like some other people, i cant switch to headphones in the settings, even though i made no mistakes.
@BytesNBits2 жыл бұрын
Hi. I'm still not sure why that is. All I can suggest is to do a full update and see if that clears the issue. In terminal... sudo apt-get update sudo apt-get full-upgrade
@IRFANKHAN-mr7uc2 жыл бұрын
hi i have got the solution for this its very easy just add this lines on the config.txt file "gpio=18,19=a5" "dtoverlay=audremap,enable_jack=on" and you will need to reboot after adding this lines and you will get the audio output from gpio 18 and 19