Outputting audio to a Breadboard

May 30, 2024, 13:15

.auxerre

Hi, I'm completely new to using Raspberry Pis. I'm using a Raspberry Pi5 to take in an audio input, process it, and then output it. I think i've figured out how to input the audio, but I need to output the audio through a breadboard, and was not sure how to do that. I've read online that I might need a DAC, but I was not sure how to connect it through the pins and whatnot. Any help is appreciated, thank you :)

oops.se

There are several options. 1. A DAC Chip/Module As you describe you need a breadboard (Optional) and wires (DuPont wires). If you use female DuPont wires you can connect directly from the GPIO pins on the Raspberry Pi to the DAC modules pins. If you use a DAC chip you need a breadboard. 2. SPI or I2S modules As above. 3. A Sound HAT Connects directly to the GPIO header (pins) and has commonly a 3.5mm jack or/and pins for Audio out/in 4. USB sound card Has one or two 3.5mm jacks'

oops.se

So it depends on what audio module you choose.

oops.se


.auxerre

thank you very much for the prompt reply, do you have any idea what DAC i would specifically use?

oops.se

No, as I have gone the HAT or USB route when doing that kind of stuff

oops.se

So my suggestion would be to search for "DAC SPI Raspberry Pi" or "DAC I2S Raspberry Pi"

.auxerre

do you think that the usb route would be easier to go down? as i have just got my hands on a dac and the circuit diagram itself looks on teh longer side

oops.se

Not sure as you need to interface from the 3.5 mm jack to whatever microphone/speaker you wish to use. But if you have a headset and just want to test/confirm the concept then would the USB be a fast solution and the USB sound cards is inexpensive if you don't go after the pro/semi pro onec.

.auxerre

ahh right okay thank you, i might start with that then

.auxerre

is there any chance you have a schematic or anything that can show the circuit for an 8 bit DAC connecting up to an RPi5? ive searched all over the internet but can't find one, and have run into the snag of my DAC set up not working

oops.se

What DAC do you have?

.auxerre

TLC7524CN

.auxerre

it doesnt seem to be an audio specific dac

.auxerre

but its the only dac the lab had

.auxerre

the only schematic we found was for an arduino and it seems to be the wrong way around? albeit im not sure

oops.se

TLC7524CN should work fine and it is easy to implement as it only have parallel data, CS (Chip Select) and WR (Write). So you need 10 GPIO pins. Can you show the schema you have used as you say it doesn't work. And I hope you use 3,3volt as Vcc. Another solution could be to use PWM (Pules Width Modulation), check this article https://forums.raspberrypi.com/viewtopic.php?t=124130

.auxerre

here is the circuit that we are using

.auxerre

well at least trying to adapt

.auxerre


.auxerre

also i want to clarify this is my first time ever using a raspberry pi let alone a dac 😭 sorry for being so slow

oops.se

NP, we help beginners to advanced so no need for sorry.

oops.se

And how does the code look, and please check out https://discord.com/channels/818384379197784084/1189386838788542464 before posting it.