• 0

Best way to generate and output sound on Basys3 ?


Question

I am looking for a way to output audio out of my Basys3 board. I only need to output monotones. The only sounds I will need to output will be the notes in the typical musical scales along with the octaves. My idea was to use the PMOD connector and use a simple 8-ohm speaker with the positive wire going to a random pin location and the other side to one of the common ground pins. Can anyone tell me if this is a viable method of achieving sound output? I have the code which was given to me by my professor but the code was meant for another board with an audio jack but I know I can do it without a built in audio jack. My main concern is the output impedance of the pmod connector which I don't know. I know I can design an amplifier but if I can avoid that, that would be great.

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 1

I think the pins of the Basys3 board can output enough current to drive only a very low power (0.2-0.5 W) speaker or a piezo buzzer.

I'd say the easiest way to make some basic sounds is to use a piezo buzzer that can be directly connected to the pins of the Basys3 board.

To get an idea of the sounds that can be achieved this way, here is a link to a tutorial showing a piezo buzzer connected to a pin of the micro:bit board:

https://www.hackster.io/anish78/piezo-buzzer-with-bbc-micro-bit-b0fc27

At the very end of this tutorial, there is a video showing the result. The sound quality and the sound volume are quite low.

 

Edited by Pavel
Link to post
Share on other sites
  • 1

FPGA output buffers aren't designed to drive reactive loads directly. I suppose that the code that you want to try out may have a lot do do with how you might want to create audible tones. The standard PMODs provide some protection but also limits drive current.

The link mentioned above might be interesting and wouldn't cost very much but might not be the best way to use the code you refer to. There are certainly other suitable and inexpensive ways to safely drive a speaker as well.

I'm not sure what you mean by 'output impedance of the PMOD connector'.

One question to consider is the accuracy and quality of the tones that you want to produce. Dan's project does not produce anything resembling professional audio quality. I believe that Digilent sells an audio codec PMOD as well.

Edited by zygot
Link to post
Share on other sites
  • 1
7 hours ago, zygot said:

I believe that Digilent sells an audio codec PMOD as well.

It would be great if Digilent has created a Pmod module based on an audio codec with an integrated amplifier, such as for example CS42L52, that can directly drive a speaker.

Unfortunately, the only Pmod that could be qualified as a codec Pmod that I could find is Pmod I2S2. Its output part is based on CS4344 DAC without any amplifier.

Since @Tim77 wants to avoid adding an amplifier and wants to output monotones of notes of a musical scale, I think that Pmod AMP2 better matches the requirements than Pmod I2S2.

BTW. It would be interesting to check the sound quality of Pmod AMP2 in combination with the second order sigma delta modulator from this project.

Edited by Pavel
Link to post
Share on other sites
  • 0

Hello All, 

I was able to achieve what my question sought out to answer! Didn't require an external amplifier at all for the purposes of my project but it definitely wasn't perfect. The sound was quite low and hard to hear but adequate enough to demo for my professor. Thank you all for the responses!

- Tim

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now