If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Speaker Z Meter
3 posts
• Page 1 of 1
Speaker Z Meter
This .fsm measures the impedance of a speaker.
It generates the impedance graph (module of the impedance), and a text file listing the frequencies and the corresponding impedance's.
It maintains precision in the low frequencies by not relying on a .wav stimulus, not relying on FFTs, and not relying on RMS detectors.
The stimulus consists of a digital sinus oscillator, whose frequency is explicitly stepped according to a text file to be loaded prior all measurement.
Knowing by advance the stimulus frequency provides an advantage.
The amplitude detection can rely on the Pythagoras theorem (sum of squares), using a 90 degree phase shifter (allpass)filter.
In theory, such detector is not plagued by ripple.
One could use the detector output without any lowpass filter.
This is also referenced as an "instantaneous detector".
In this implementation, some minimal lowpass filter has been added, 1st order at 1/100 Fs (= 441 Hz).
01. Load the text file listing the frequencies to be stepped. There must be "end" (without quotes) at the end.
02. Press "Start" - the instrument is now outputting the frequency sweep - the red Led turns on.
03. Calibrate the instrument by substituting the speaker by a known resistor, say 10 Ohm.
04. Enter the value of the known resistor after the "Calibrate for ..." button.
05. Press "Calibrate for ..." - the instrument should now display a flat curve equal to the calibration value.
06. Make sure there is no digital saturation by checking the two VU-meters - reduce the power amp volume if needed.
07. Remove the known resistor and replace it by the speaker to be measured.
08. Press "Start" - the instrument is now redoing the frequency sweep with the Y axis precisely calibrated.
09. Wait until the red Led turns off - the speaker impedance gets fully graphed on screen.
10. Use the X and Y scale controls at your convenience.
12. Bear in mind that the highest frequency gets defined by the text file - you cannot change it at this stage.
13. A measurement file gets automatically generated. This is a text file.
14. You can edit the measurement filename and save again the measurement file using the "Save as ..." button.
The resulting measurement file can serve as piecewise linear source definition in LTspice.
This way you can compare the measured speaker impedance with some modeled speaker impedance.
For best results, make sure the ADCs and DACs are working within their nominal dynamic range, without saturation. The two bargraphs allow you to visualize the ADCs levels, for checking the dynamic range.
Two .fsm files are available.
Speaker_Z_Meter_v.01_dummy can be used without external hardware.
This is solely for exercising.
A bandpass filter gets hooked as dummy for emulating the behavior of a speaker.
Speaker_Z_Meter_v.01 is to be used in the real world.
You need external hardware.
Bear in mind this is a two-channel analyzer.
You need to probe the voltage on the speaker and route it to the first ADC, with a correct amplitude, say 100 mV AC. Some voltage divider may be required.
You need to probe the current through the speaker using a shunt resistor, and route the voltage that gets generated on the shunt resistor to the second ADC, with a correct amplitude, say 100 mV AC.
Those two probes must rely on low-gain line-level difference amplifiers like INA105 or INA134.
For the voltage section, using a difference amplifier referred to the high side of the shunt resistor allows using a quite large shunt resistor (say 1 ohm) without introducing any error in the speaker voltage measurement.
It generates the impedance graph (module of the impedance), and a text file listing the frequencies and the corresponding impedance's.
It maintains precision in the low frequencies by not relying on a .wav stimulus, not relying on FFTs, and not relying on RMS detectors.
The stimulus consists of a digital sinus oscillator, whose frequency is explicitly stepped according to a text file to be loaded prior all measurement.
Knowing by advance the stimulus frequency provides an advantage.
The amplitude detection can rely on the Pythagoras theorem (sum of squares), using a 90 degree phase shifter (allpass)filter.
In theory, such detector is not plagued by ripple.
One could use the detector output without any lowpass filter.
This is also referenced as an "instantaneous detector".
In this implementation, some minimal lowpass filter has been added, 1st order at 1/100 Fs (= 441 Hz).
01. Load the text file listing the frequencies to be stepped. There must be "end" (without quotes) at the end.
02. Press "Start" - the instrument is now outputting the frequency sweep - the red Led turns on.
03. Calibrate the instrument by substituting the speaker by a known resistor, say 10 Ohm.
04. Enter the value of the known resistor after the "Calibrate for ..." button.
05. Press "Calibrate for ..." - the instrument should now display a flat curve equal to the calibration value.
06. Make sure there is no digital saturation by checking the two VU-meters - reduce the power amp volume if needed.
07. Remove the known resistor and replace it by the speaker to be measured.
08. Press "Start" - the instrument is now redoing the frequency sweep with the Y axis precisely calibrated.
09. Wait until the red Led turns off - the speaker impedance gets fully graphed on screen.
10. Use the X and Y scale controls at your convenience.
12. Bear in mind that the highest frequency gets defined by the text file - you cannot change it at this stage.
13. A measurement file gets automatically generated. This is a text file.
14. You can edit the measurement filename and save again the measurement file using the "Save as ..." button.
The resulting measurement file can serve as piecewise linear source definition in LTspice.
This way you can compare the measured speaker impedance with some modeled speaker impedance.
For best results, make sure the ADCs and DACs are working within their nominal dynamic range, without saturation. The two bargraphs allow you to visualize the ADCs levels, for checking the dynamic range.
Two .fsm files are available.
Speaker_Z_Meter_v.01_dummy can be used without external hardware.
This is solely for exercising.
A bandpass filter gets hooked as dummy for emulating the behavior of a speaker.
Speaker_Z_Meter_v.01 is to be used in the real world.
You need external hardware.
Bear in mind this is a two-channel analyzer.
You need to probe the voltage on the speaker and route it to the first ADC, with a correct amplitude, say 100 mV AC. Some voltage divider may be required.
You need to probe the current through the speaker using a shunt resistor, and route the voltage that gets generated on the shunt resistor to the second ADC, with a correct amplitude, say 100 mV AC.
Those two probes must rely on low-gain line-level difference amplifiers like INA105 or INA134.
For the voltage section, using a difference amplifier referred to the high side of the shunt resistor allows using a quite large shunt resistor (say 1 ohm) without introducing any error in the speaker voltage measurement.
- Attachments
-
- Speaker_Z_Meter_v.01_dummy.fsm
- (47.42 KiB) Downloaded 1087 times
-
- Speaker_Z_Meter_v.01.fsm
- (40.97 KiB) Downloaded 1086 times
-
- Speaker_Z_meter (600).png (23.88 KiB) Viewed 10975 times
- steph_tsf
- Posts: 249
- Joined: Sun Aug 15, 2010 10:26 pm
Re: Speaker Z Meter
Attached is a .zip containing a few texts files : various frequency lists to be loaded beforehand, and a measurement file.
- Attachments
-
- text files.zip
- (1.51 KiB) Downloaded 1077 times
- steph_tsf
- Posts: 249
- Joined: Sun Aug 15, 2010 10:26 pm
Re: Speaker Z Meter
minor revision
buttons labels are more explicit now
buttons labels are more explicit now
- Attachments
-
- Speaker_Z_meter (600).png (28.92 KiB) Viewed 10970 times
-
- Speaker_Z_Meter_v.02.fsm
- (44.67 KiB) Downloaded 1074 times
-
- Speaker_Z_Meter_v.02_dummy.fsm
- (51.52 KiB) Downloaded 1109 times
- steph_tsf
- Posts: 249
- Joined: Sun Aug 15, 2010 10:26 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 31 guests