musical synthesizer-how to connect fpga to speaker

Thread Starter

gxg513

Joined Oct 8, 2017
19
Hi all,

I wish u could help me with one problem.I have to make a musical synthesizer.So i have some buttons,a microntroller in a I2C connection with an fpga and i have to connect the fpga to a speaker through a jack.

Can u please help me how to connect the speaker to the fpga?i do not have any ideea.thank u very much,any ideea would be helpfull
The fpga i use is digilent nexys 2 and the uC is atmega164-dil40
 

Thread Starter

gxg513

Joined Oct 8, 2017
19
You would buffer the FPGA output to the speaker using a power
amplifier of some sort.

If you dont want to build your own, something like this -

https://www.banggood.com/HIFI-2_0-T...-p-1216249.html?rmmds=search&cur_warehouse=CN

https://www.banggood.com/12V-Mini-H...l-p-933675.html?rmmds=search&cur_warehouse=CN

You would need a power supply for it as well.

Regards, Dana.
and i will connect with a wire from an output of the fpga(the signal is digital) directly to the Audio Amplifier? and then from the audio amplifier to the speaker?
 

danadak

Joined Mar 10, 2018
4,057
You would check that audio amp is ac coupled at input, or check its allowed
input range in V, otherwise you may have to bias the connection to audio amp.

Connections would be signal and ground from FPGA board to amp, each channel,
then output of amp then to speakers, 2 wires / speaker, 2 channels (I assume you
are doing stereo).

Regards, Dana.
 

Thread Starter

gxg513

Joined Oct 8, 2017
19
You would check that audio amp is ac coupled at input, or check its allowed
input range in V, otherwise you may have to bias the connection to audio amp.

Connections would be signal and ground from FPGA board to amp, each channel,
then output of amp then to speakers, 2 wires / speaker, 2 channels (I assume you
are doing stereo).

Regards, Dana.
so can i connect directly the signal to the amp even if the signal in fpga is digital?because i guess is digital
 

AnalogKid

Joined Aug 1, 2013
9,290
so can i connect directly the signal to the amp even if the signal in fpga is digital?because i guess is digital
That depends on what you mean by "digital". If the FPGA is make square waves at audio frequencies, then the audio amp will work with them. If the FPGA is making something else, like pulse width modulation, MIDI codes, WAV or MP3 data, or some other form of encoded audio, then no, you cannot just connect it directly to the audio amp. The audio amp expects normal audio, like what comes out of a headphone jack on a phone.

You need to provide more information about the musical synthesizer you are making.

ak
 

Thread Starter

gxg513

Joined Oct 8, 2017
19
i'm trying to make it with pulse width modulation and will look like a sinus
so,in that way ,i will not be able to connect directly with a wire from the fpga to a speaker?
 

AnalogKid

Joined Aug 1, 2013
9,290
i'm trying to make it with pulse width modulation and will look like a sinus so,in that way ,i will not be able to connect directly with a wire from the fpga to a speaker?
Correct, you will not. The PWM waveform must be converted to an audio signal. This can be done with a low pass filter stage. PWM is a constant frequency square wave with varying duty cycle. What is the frequency of your PWM waveform?

ak
 

Thread Starter

gxg513

Joined Oct 8, 2017
19
Correct, you will not. The PWM waveform must be converted to an audio signal. This can be done with a low pass filter stage. PWM is a constant frequency square wave with varying duty cycle. What is the frequency of your PWM waveform?

ak
i did not implemented yet,i m starting from the button.is that important?
sorry for asking so many questions,but it s my first year at the electronics university
 
Last edited:

AnalogKid

Joined Aug 1, 2013
9,290
This is difficult task for someone in their first year. None of the solutions we present will make any sense unless you first understand the basics of electronics:

Resistor
Capacitor
Inductor
Impedance
Ohm's Law
Joule's Law
Watt's Law
Kirchhoff's Voltage Law
Kirchhoff's Current Law
Thevenin's Theorem
The concepts of frequency and waves
The basics of alternating current and complex vectors
Maxwell's Equations

This is the background material that usually is studied in the first year of Electrical engineering, *after* a full year of calculus and physics. We can give you a circuit or point you to a website on active filter design, but without an understanding of how a capacitor differs from an inductor I think it will be very difficult to understand.

ak
 
Last edited:
Top