Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
add-ons:impedance-analyzer:diy-speaker [2021/05/14 23:07] – ↷ Links adapted because of a move operation Arthur Brownadd-ons:impedance-analyzer:diy-speaker [2022/10/04 11:38] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ~~TechArticle~~ ~~TechArticle~~
  
-<WRAP center round todo 60%> +{{ :reference:add-ons:impedance-analyzer:coil.jpeg?600 |}}
-This page is under construction. +
-</WRAP>+
  
 <WRAP> <WRAP>
-In the following, the main components and the working principles of a loudspeaker will be presented, then you can follow the guide to build your own speaker.+In this guide, the main components and the working principles of a loudspeaker will be presented. You can follow along to build your own speaker.
 </WRAP> </WRAP>
 ---- ----
Line 44: Line 42:
 === For the Amplifier === === For the Amplifier ===
 <WRAP> <WRAP>
-  * 50KΩ potentiometer +  * 50 kΩ potentiometer 
-  * 10KΩ resistor (3x)+  * 10 kΩ resistor (3x)
   * OP37 operational amplifier   * OP37 operational amplifier
   * 1N914 diode (2x)   * 1N914 diode (2x)
Line 53: Line 51:
   * breadboard   * breadboard
 </WRAP> </WRAP>
-**Note:** //All the above components can be found in the [[https://store.digilentinc.com/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery/|Analog Parts Kit]].//+**Note:** //All the above components can be found in the [[https://digilent.com/shop/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery/|Analog Parts Kit]].//
 </WRAP></WRAP> </WRAP></WRAP>
 ---- ----
 ===== How a Loudspeaker Works ===== ===== How a Loudspeaker Works =====
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-A loudspeaker is a device which translates electrical signals to sound. A basic loudspeaker (or speaker) has four parts: the magnet (B), the coil (C), the diaphragm (A) and the chassis. The diaphragm is fastened to the chassis, in a way, that its center could vibrate. The coil is glued to the center of the diaphragm. The magnet is placed beneath the coil, and is fixed to the chassis.+A loudspeaker is a device that translates electrical signals to sound. A basic loudspeaker (or speaker) has four parts: the magnet (B), the coil (C), the diaphragm (A) and the chassis. The diaphragm is fastened to the chassis, in a way that its center can vibrate. The coil is glued to the center of the diaphragm. The magnet is placed beneath the coil and is fixed to the chassis.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 {{ :reference:add-ons:impedance-analyzer:speaker_structure.gif |}} {{ :reference:add-ons:impedance-analyzer:speaker_structure.gif |}}
Line 65: Line 63:
  
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-When a current flows through the coil, it induces a magnetic field around it, so the fixed magnet attracts, or repels the coil, according to the polarity of this field. As the diaphragm is glued to the coil, it moves along. The air in front of the diaphragm is "pushed", or "pulled" by the moving diaphragm, becoming more dense in some places and more thinner in other places. This creates a longitudinal wave in the air, which is the sound itself.+When a current flows through the coil, it induces a magnetic field around it so that the fixed magnet attracts or repels the coil, according to the polarity of this field. As the diaphragm is glued to the coil, it moves along. The air in front of the diaphragm is "pushed", or "pulled", by the moving diaphragm, becoming denser in some places and thinner in other places. This creates a longitudinal wave in the air, which is the sound itself.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 {{ :reference:add-ons:impedance-analyzer:longitudinal_wave.gif |}} {{ :reference:add-ons:impedance-analyzer:longitudinal_wave.gif |}}
Line 72: Line 70:
 ---- ----
  
-===== What is Impedance =====+===== What is Impedance? =====
 <WRAP group> <WRAP group>
 Impedance is the opposition of a device to the flow of alternating current. The impedance of a device is a complex quantity: $Z=R+jX$, where $Z$ is the impedance, $R$ is the resistance of the device and $X$ is a quantity called reactance. The reactance of the device is frequency and device type dependent as $X_L=2{\pi}fL$ and $X_C=\frac{1}{2{\pi}fC}$ are the formulae for inductive and capacitive reactance. If we take $Q=\frac{X}{R}$ (also called quality factor), we will know the ratio of the energy stored in the device to the energy dissipated by it. Impedance is the opposition of a device to the flow of alternating current. The impedance of a device is a complex quantity: $Z=R+jX$, where $Z$ is the impedance, $R$ is the resistance of the device and $X$ is a quantity called reactance. The reactance of the device is frequency and device type dependent as $X_L=2{\pi}fL$ and $X_C=\frac{1}{2{\pi}fC}$ are the formulae for inductive and capacitive reactance. If we take $Q=\frac{X}{R}$ (also called quality factor), we will know the ratio of the energy stored in the device to the energy dissipated by it.
  
-While it is very important, calculating with such complex quantities, as the impedance, can become problematic in some circuits. This is where the impedance analyzer comes into play.+While it is very important, performing calculations with complex quantities, such as the impedance, can become problematic in some circuits. This is where the impedance analyzer comes into play.
 </WRAP> </WRAP>
 ---- ----
Line 82: Line 80:
 ===== Using the Impedance Analyzer ===== ===== Using the Impedance Analyzer =====
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-The first step in building your own speaker is, to analyze the most significant properties of an existing speaker. You can use the one found in the [[https://store.digilentinc.com/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery/|Analog Parts Kit]].+The first step in building your own speaker is to analyze the most significant properties of an existing speaker. You can use the one found in the [[https://digilent.com/shop/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery/|Analog Parts Kit]].
  
-Use the Impedance Analyzer to measure the magnitude of the impedance of the speaker between 20Hz and 20KHz, as these are the lower and the upper limits of the human hearing. In this case, the magnitude of the impedance is almost constant, around 8Ω, for a while, then starts to increase.+Use the Impedance Analyzer to measure the magnitude of the impedance of the speaker between 20 Hz and 20 KHz, as these are the lower and the upper limits of human hearing. In this case, the magnitude of the impedance is almost constant, around 8 Ω, for a while, then starts to increase.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
-{{ :reference:add-ons:impedance-analyzer:speaker_impedance.png?600 |}}+{{ :add-ons:impedance-analyzer:speaker_impedance_small.png?600 |}}
 </WRAP></WRAP> </WRAP></WRAP>
  
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-Now cut a piece of copper wire, around 1m - 1.5m, and wind it around the marker to make a coil. Use the sandpaper to clean both ends of the wire.+Now cut a piece of copper wire, around 1 m to 1.5 m, and wind it around the marker to make a coil. Use sandpaper to clean both ends of the wire.
  
-Measure the magnitude of the impedance of this small coil. In this case 1.5m of wire was used and the resulting magnitude is around 0.9Ω. Use the following formula to calculate the length of the wire needed for the speaker: $l_{wire}=l_{small-wire}*\frac{|Z|_{speaker}}{|Z|_{small-wire}}=1.5m*\frac{8Ω}{0.9Ω}$.+Measure the magnitude of the impedance of this small coil. In this case, 1.5m of wire was used, and the resulting magnitude is around 0.9 Ω. Use the following formula to calculate the length of the wire needed for the speaker: $l_{wire}=l_{small-wire}*\frac{|Z|_{speaker}}{|Z|_{small-wire}}=1.5m*\frac{8Ω}{0.9Ω}$.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
-{{ :reference:add-ons:impedance-analyzer:small-wire_impedance.png?600 |}}+{{ :add-ons:impedance-analyzer:small-wire_impedance_small.png?600 |}}
 </WRAP></WRAP> </WRAP></WRAP>
  
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-Calculate how much wire do you need, then use the tape measure and cut it. Wind the wire around the marker. Use the sandpaper to clean the ends, then measure the magnitude of its impedance. You should get a value close to the speaker's magnitude of impedance. In this case the value starts a bit below 8Ω and starts to increase earlier, but that increase will only affect high pitch sounds.+Calculate how much wire you need, then use the tape measure and cut it. Wind the wire around the marker. Use the sandpaper to clean the ends, then measure the magnitude of its impedance. You should get a value close to the speaker's magnitude of impedance. In this case, the value starts a bit below 8 Ω and starts to increase earlier, but that increase will only affect high pitch sounds.
  
 If you are satisfied with the results, solder two thicker wires to the ends of your coil. If you are satisfied with the results, solder two thicker wires to the ends of your coil.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
-{{ :reference:add-ons:impedance-analyzer:coil_impedance.png?600 |}}+{{ :add-ons:impedance-analyzer:coil_impedance_small.png?600 |}}
 </WRAP></WRAP> </WRAP></WRAP>
  
Line 112: Line 110:
 ===== Building the Speaker ===== ===== Building the Speaker =====
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
-Place the two magnets above and below the plastic cap and let them attract one another, so they remain fixed to the cap.+Place the two magnets above and below the plastic cap and let them attract one another, so that they remain fixed to the cap.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 {{ :reference:add-ons:impedance-analyzer:magnet.jpg?600 |}} {{ :reference:add-ons:impedance-analyzer:magnet.jpg?600 |}}
Line 134: Line 132:
 Currently, if you connect music to the speaker, you will hear nearly nothing, as the current flowing through your speaker isn't high enough. For your loudspeaker to be loud, you will need to build an amplifier. Currently, if you connect music to the speaker, you will hear nearly nothing, as the current flowing through your speaker isn't high enough. For your loudspeaker to be loud, you will need to build an amplifier.
  
-On a breadboard, build an inverting amplifier, using the OP37 operational amplifier, a 10KΩ resistor and an 50KΩ potentiometer. This amplifier stage will increase the amplitude of the signal, but the output current remains limited to a few milliamps. To increase the current, build a class AB power amplifier, using two diodes, two resistors and two BJTs, an NPN and a PNP.+On a breadboard, build an inverting amplifier, using the OP37 operational amplifier, a 10 kΩ resistor, and a 50 kΩ potentiometer. This amplifier stage will increase the amplitude of the signal, but the output current will remain limited to a few milliamps. To increase the current, build a class AB power amplifier using two diodes, two resistors, and two BJTs, an NPN and a PNP.
  
-As a differential power supply you can use the V+ and V- pins of the Analog Discovery 2. You can use an audio connector on the input.+You can use the V+ and V- pins of the Analog Discovery 2 as a differential power supply. You can use an audio connector on the input.
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 {{ :reference:add-ons:impedance-analyzer:amplifier_schem.png?600 |}} {{ :reference:add-ons:impedance-analyzer:amplifier_schem.png?600 |}}
Line 143: Line 141:
  
 ===== Testing ===== ===== Testing =====
-<WRAP>+<WRAP group><WRAP half column>
 Connect your PC or phone to the audio input and play some music. Use the potentiometer to turn up the volume. Apply "sound effects" by slightly moving the magnets towards one side of the coil. Connect your PC or phone to the audio input and play some music. Use the potentiometer to turn up the volume. Apply "sound effects" by slightly moving the magnets towards one side of the coil.
  
-If you would like to play music on your DIY speaker louder, you can experience with setting a higher gain for your amplifier, but pay attention to the power rating of your power supply: if the Analog Discovery 2 can't supply the necessary current, the voltage will drop.+If you would like to play music on your DIY speaker louder, you can experiment with setting a higher gain for your amplifier, but pay attention to the power rating of your power supply: if the Analog Discovery 2 can't supply the necessary current, the voltage will drop.
  
-Optionally, you can test your speaker with a power amplifier, if you have one. You may reach louder sounds and even better sound quality in this case.+Optionally, you can test your speaker with a power amplifier, if you have one. You may reach louder volumes and even better sound quality in this case.
  
 <WRAP round important> <WRAP round important>
 The coil of the speaker might get hot if too much current flows through it! The coil of the speaker might get hot if too much current flows through it!
 </WRAP> </WRAP>
-</WRAP>+ 
 +</WRAP><WRAP half column> 
 +{{ :add-ons:impedance-analyzer:amp.jpg?600 |}} 
 +</WRAP></WRAP>
 ---- ----
  
 ===== Next Steps ===== ===== Next Steps =====
 <WRAP> <WRAP>
-For more guides on how to use the Digilent Test and Measurement Device, return to the device's Resource Center, linked from the [[test-and-measurement:start]] page of this wiki.+For more guides on how to use your Test and Measurement Device, return to the device's Resource Center, linked from the [[test-and-measurement:start]] page of this wiki.
  
-For more information on WaveForms visit the [[software:waveforms:waveforms-3:reference-manual|WaveForms Reference Manual]]. +For more information on WaveForms, visit the [[software:waveforms:waveforms-3:reference-manual|WaveForms Reference Manual]]. 
  
-For technical support, please visit the [[https://forum.digilentinc.com/forum/8-test-and-measurement/|Test and Measurement]] section of the Digilent Forums.+For technical support, please visit the [[https://forum.digilentinc.com/forum/8-test-and-measurement/|Test and Measurement]] section of the Digilent Forum.
 </WRAP> </WRAP>