Design of a QRMS audio meter

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

vmsa

Member
Joined
Jun 20, 2022
Messages
20
Location
Argentina
Hi friends!

Originally I wrote about this idea for a Spanish electronics forum, but I think that this development may be considered here, then I translated the original to English and proudly share it with you. This is my first post, then I apologize for any idiomatic inconsistencies (I am not a grammar expert!), but I hope you can understand and enjoy it in some way.

------------------------​

In the analog world the common practice of rectifying and integrating an audio signal give us its average values, which related to music is not accurately representative of the real energy of the signal, especially in a musical material with a lot of dynamic range.

That is, in signals with a large Crest Factor, with little compression/limitation, or to comply with the audio leveling standards required by broadcast systems within the "Loudness control" regulations, the result is that the traditional and simple meters with average metering, are not very appropriate.
So, when you want to make an autonomous analog meter with LEDs bargraph, with discrete components, you would need to incorporate an RMS converter, expensive and not easy to get.

Another option would be to implement it with some microcontroller (MCU), this requires programming the algorithms by software and evaluate the calculus and processes that influences the response speed, you have to adjust many lines of code, and appreciate the bandwidth of the A/D converters, etc. Of course, a lot of interesting functions and features can be achieved, but ultimately it introduces you more into computer science than in the extraordinary analog electronics, in my way of seeing it.
I have the idea to develop a mixed device, using an MCU for the output and an analog processing for input. The best of both worlds.

So, at some point, some time ago when I did other studies, I wondered if some correction can be made over the average values to resemble (approximate) effective values, with some circuitry.
This may sound like a delirium, or nonsense. Of course, I would also think the same about it without having carried out analyses, calculations and measurements, but after a creative work I reached the conclusions that I present to you.

Well, let me to show what QuasiRMS is...


Difference between average and effective values from my point of view


What I want to show you is what I have discovered, that in audio the signals presented to a meter differ especially in their Crest Factor. Which is the difference between the effective value and the peak value. And because the average and effective values have different slopes, it makes a meter that evaluates the average value not performs as one that measures the effective value, when the Crest Factor varies.

Applying the method that I developed to generate signals with different Crest Factor (through pulsating sinusoidal signals), I obtained its slopes with the help of some calculations in Excel and of course the beloved Multisim.

Looking at Figure 1, that shows, in voltage, the slopes of the effective and average value, as function of the Crest Factor, and the Figure 2 that shows it in decibels. We can observe how the average value falls much faster than the effective one as the Crest Factor increases, which is when the music becomes "more percussive".


1672195913881.png

Figure 1: Peak, RMS and Average values as a function of Crest Factor


1672195949732.png

Figure 2: Comparison of Peak, RMS and Average values graphed in dB​

This has been my starting point, thinking: can I somehow compensate a mean value meter shown in green in the graphs above, to approximate it to the effective value, shown in red, using the peak value? In a short way, the effective value is between the two.

So, not varying its amplitude (constant at 1V peak) but its duty cycle, the difference (in times of Duty Cycle) this tabulated is the following Table 1:


Duty cycle Relation
Crest Factor
Volts RMS
Volts average
1​
1.414​
0.707​
0.637​
1/2​
2.000​
0.500​
0.318​
1/3​
2.449​
0.408​
0.212​
1/4​
2.828​
0.354​
0.159​
1/5​
3.162​
0.316​
0.127​
1/6​
3.464​
0.289​
0.106​
1/7​
3.742​
0.267​
0.091​
1/8​
4.000​
0.250​
0.080​
1/9​
4.243​
0.236​
0.071​
1/10​
4.472​
0.224​
0.064​
1/11​
4.690​
0.213​
0.058​
1/12​
4.899​
0.204​
0.053​
1/13​
5.099​
0.196​
0.049​
1/14​
5.292​
0.189​
0.045​
1/15​
5.477​
0.183​
0.042​
1/16​
5.657​
0.177​
0.040​
1/17​
5.831​
0.171​
0.037​
1/18​
6.000​
0.167​
0.035​
1/19​
6.164​
0.162​
0.034​
1/20​
6.325​
0.158​
0.032​

Table 1: Peak, RMS and Average values for different duty cycles.​

Initially it occurred to me that I can add to the average value, a percentage of the peak value, in order to raise it to the effective value. But a direct sum does not give the correct curve.

Figure 3 shows what would result from adding part of the peak value to the average. It does not work well because the difference between average and RMS values decreases with the Crest Factor.

1672196034245.png

Figure 3: Mean value plus portion of Peak value​

The orange curve shows that while it is resembling RMS value, it is not very accurate and needs to be improved.

So, what one could do is to adapt the peak value in a way for the necessary slope. Instead of the Peak value being a straight line, it should go down. It is what would be called a quasi-peak value, as a QPPM do. When the Crest Factor increases, its output decreases. As Figure 4 shows.
The calculations gave me that the Tau of the peak integrator should be about 8 times less than the average value. That is, for 100 ms on Average, it will be about 12 ms for the Qpeak.

1672196080233.png

Figure 4: Curve needed for the Peak value to approximate the RMS value.​

Thus, adding to the Average a Qpeak voltage extracted from the peak value of the wave, would allow me to bring it more approximately to the real value, that is, to a quasi RMS or QRMS.

So much for the theory.

Practical development

The requirement could be drawn in a diagram with the blocks shown in Figure 5.

1672196113927.png
Figure 5: Block diagram of the process to obtain the QRMS​

We start with the rectifier. This is a full-wave rectifier where I get the signal module. It can be implemented with different configurations, I chose one in particular but it is not critical, there are several topologies.
To obtain the average value, with the ballistics required for music, a final integration of 400 ms is used, giving a Tau of about 100 ms.
To extract the peak value an "ideal diode" is made, so that its output corresponds to the maximum excursion of the signal. As said, the integration will be 8 times less than the average value, giving about 12 ms of Tau.
The output adder is simply a buffer that adapts the impedances, so as not to load the adding node.

Now only remains to test it in the Multisim simulator and assemble a circuit that electronically represents what is proposed.

I note that I had to simulate an incremental pulse generator, as shown in Figure 6, necessary to generate the X axis of the graphs, so that the Crest Factor increases over time. I don't know if it's the best solution, but it gave me the signal I needed.
Implement it with this circuit:

1672196167845.png

Figure 6: Incremental pulse generator​

Where XFG4 is the 2KHz sinusoidal oscillator for the pulse train. XFG3 is the ramp generator that sweeps from 0 to 5V, so that the comparator varies its output from zero to the maximum in PWM format, enabling or not the bidirectional key. So, each pulse corresponds to a sinusoidal burst, as see in the Figure 7.

1672196194798.png

Figure 7: Test signal for the circuit input.​

For the average value integrator with a 100ms Tau, I used a 100k resistor and a 1uF capacitor. For the peak value with a Tau of 12ms, I used a resistance of 5k6 and a capacitor of .22uF.
The final values were obtained with some reciprocal influences that were not be contemplated in the theoretical development, so adjusting some components the final result confirmed the proposal, that you can approximate an RMS value from an average value!

Circuit developed for evaluation in the Multisim:

1672196253080.png

Figure 8: QRMS circuit implemented in the Multisim​

As a quick description of the circuit shown in Figure 8, you could note that additional components used for testing appear, such as the XFG1 oscillator and the XMM1 meter that are there to simulate the response to constant signals. As well as the potentiometer R11 to have a manual sweep replacing, in the input (+) of the comparator U3, the signal from the XFG3.
I also included an LTC1968, which is a real RMS converter, to have in the oscilloscope the RMS value that would be the objective to achieve.
XMM4 measures the value of the full-wave rectifier, composed of the U1A and U1B stages. The U1C stage forms the peak value detector. And U1D is the output buffer.
The components R4 and C2 (100k and 1uF) form the integrator of the Average value, repeated in R1 and C3 to have the Average value for the oscilloscope. R9 and C1 (5k6 and .22uF) form the integrator of the Peak value (Qpeak). R4 and R3 (100k and 220k) give the ratio of the Average to Peak values. Which as calculated, correspond to 2/3 and 1/3 respectively.


1672196360607.png

Figure 9: Curves obtained in the oscilloscope​

Viewing on the 4-channel oscilloscope XSC1 the different measured values, as shown in Figure 9. The top line in Yellow shows the "quasi-peak" or Qpeak value, which will be added to the mean value indicated in Blue. The Red line shows the RMS value obtained at the output of the LTC1968, and in Green the output of this circuit, which is the QRMS value.

It is undeniable the ripple that appears in the Yellow curve of the Qpeak, because the peak integrator has a very small Tau, but this is expected. However, it is minimized when is adding to the C2 integration capacitor, as shown in the resulting Green line.
It should be also noted that on the far right, the Red line falls below the Green one, this is because for values higher than a Crest Factor of 3, the manufacturer indicates that the LTC1968 increases its error. A limitation that this application obviously shows, and we see that this circuit does not have this behavior.

This is more noticeable in the graph obtained by measuring and tabulating the values in Excel, as shown in Figure 10.


1672196401123.png

Figure 10: Calculated and measured values​

The graph in Figure 10 clearly shows the performance of the proposed circuit. The blue line is the output of the LTC1968, which overlaps nicely with the dotted green line which corresponds to the true RMS value, but for Crest Factors more than 3 (time in sweep > 700 ms), it falls. The red line that corresponds to the QRMS output, although falls a little in the zone of Crest values of approximately 2 (500 ms), its output for values of more than 6 times (maximum analyzed at 950 ms) is better than the LTC. It may be good to clarify that in dB a Crest Factor of 2 times corresponds to 6 dB and 6 times is about 16 dB, a good range between the rms value and the peak value to simulate any type of music. And it follows that this circuit responds well even beyond these Crest Factors.

Conclusions

Based on the analysis of the signals and their behavior as a function of the Crest Factor, this circuit allow to implement an RMS weighting, using simple components to drive an indicator with LED bars, giving a very approximate response to the RMS value of a signal.
In the lab tests a little difference was found, but since the output of the bargraph display utilized in the tests uses discrete steps at 1 dB / LED, it could be said that the differences are acceptable.
Now, with 8 resistors, 2 capacitors, a TL074, and 3 diodes, we managed to simulate an RMS value coined as "QRMS". Simple, cheap and really effective!

I hope you will be encouraged to apply this solution to your meters and I am sure you will see a difference in dynamic performance, being much more representative for the loudness of the music with great dynamics than an average value metering.

I implemented this circuit in my "Proto 12", a Loudness meter of 30 LEDs, and I have evaluated it by a time showing that its performance is not far from those made with True RMS converters.

Until next madness folks!
 
Hi friends!

Originally I wrote about this idea for a Spanish electronics forum, but I think that this development may be considered here, then I translated the original to English and proudly share it with you. This is my first post, then I apologize for any idiomatic inconsistencies (I am not a grammar expert!), but I hope you can understand and enjoy it in some way.

------------------------​

In the analog world the common practice of rectifying and integrating an audio signal give us its average values, which related to music is not accurately representative of the real energy of the signal, especially in a musical material with a lot of dynamic range.

That is, in signals with a large Crest Factor, with little compression/limitation, or to comply with the audio leveling standards required by broadcast systems within the "Loudness control" regulations, the result is that the traditional and simple meters with average metering, are not very appropriate.
So, when you want to make an autonomous analog meter with LEDs bargraph, with discrete components, you would need to incorporate an RMS converter, expensive and not easy to get.

Another option would be to implement it with some microcontroller (MCU), this requires programming the algorithms by software and evaluate the calculus and processes that influences the response speed, you have to adjust many lines of code, and appreciate the bandwidth of the A/D converters, etc. Of course, a lot of interesting functions and features can be achieved, but ultimately it introduces you more into computer science than in the extraordinary analog electronics, in my way of seeing it.
I have the idea to develop a mixed device, using an MCU for the output and an analog processing for input. The best of both worlds.

So, at some point, some time ago when I did other studies, I wondered if some correction can be made over the average values to resemble (approximate) effective values, with some circuitry.
This may sound like a delirium, or nonsense. Of course, I would also think the same about it without having carried out analyses, calculations and measurements, but after a creative work I reached the conclusions that I present to you.

Well, let me to show what QuasiRMS is...


Difference between average and effective values from my point of view


What I want to show you is what I have discovered, that in audio the signals presented to a meter differ especially in their Crest Factor. Which is the difference between the effective value and the peak value. And because the average and effective values have different slopes, it makes a meter that evaluates the average value not performs as one that measures the effective value, when the Crest Factor varies.

Applying the method that I developed to generate signals with different Crest Factor (through pulsating sinusoidal signals), I obtained its slopes with the help of some calculations in Excel and of course the beloved Multisim.

Looking at Figure 1, that shows, in voltage, the slopes of the effective and average value, as function of the Crest Factor, and the Figure 2 that shows it in decibels. We can observe how the average value falls much faster than the effective one as the Crest Factor increases, which is when the music becomes "more percussive".


View attachment 102147

Figure 1: Peak, RMS and Average values as a function of Crest Factor


View attachment 102148

Figure 2: Comparison of Peak, RMS and Average values graphed in dB​

This has been my starting point, thinking: can I somehow compensate a mean value meter shown in green in the graphs above, to approximate it to the effective value, shown in red, using the peak value? In a short way, the effective value is between the two.

So, not varying its amplitude (constant at 1V peak) but its duty cycle, the difference (in times of Duty Cycle) this tabulated is the following Table 1:


Duty cycle Relation
Crest Factor
Volts RMS
Volts average
1​
1.414​
0.707​
0.637​
1/2​
2.000​
0.500​
0.318​
1/3​
2.449​
0.408​
0.212​
1/4​
2.828​
0.354​
0.159​
1/5​
3.162​
0.316​
0.127​
1/6​
3.464​
0.289​
0.106​
1/7​
3.742​
0.267​
0.091​
1/8​
4.000​
0.250​
0.080​
1/9​
4.243​
0.236​
0.071​
1/10​
4.472​
0.224​
0.064​
1/11​
4.690​
0.213​
0.058​
1/12​
4.899​
0.204​
0.053​
1/13​
5.099​
0.196​
0.049​
1/14​
5.292​
0.189​
0.045​
1/15​
5.477​
0.183​
0.042​
1/16​
5.657​
0.177​
0.040​
1/17​
5.831​
0.171​
0.037​
1/18​
6.000​
0.167​
0.035​
1/19​
6.164​
0.162​
0.034​
1/20​
6.325​
0.158​
0.032​


Table 1: Peak, RMS and Average values for different duty cycles.​

Initially it occurred to me that I can add to the average value, a percentage of the peak value, in order to raise it to the effective value. But a direct sum does not give the correct curve.

Figure 3 shows what would result from adding part of the peak value to the average. It does not work well because the difference between average and RMS values decreases with the Crest Factor.

View attachment 102149

Figure 3: Mean value plus portion of Peak value​

The orange curve shows that while it is resembling RMS value, it is not very accurate and needs to be improved.

So, what one could do is to adapt the peak value in a way for the necessary slope. Instead of the Peak value being a straight line, it should go down. It is what would be called a quasi-peak value, as a QPPM do. When the Crest Factor increases, its output decreases. As Figure 4 shows.
The calculations gave me that the Tau of the peak integrator should be about 8 times less than the average value. That is, for 100 ms on Average, it will be about 12 ms for the Qpeak.

View attachment 102150

Figure 4: Curve needed for the Peak value to approximate the RMS value.​

Thus, adding to the Average a Qpeak voltage extracted from the peak value of the wave, would allow me to bring it more approximately to the real value, that is, to a quasi RMS or QRMS.

So much for the theory.

Practical development

The requirement could be drawn in a diagram with the blocks shown in Figure 5.

View attachment 102151
Figure 5: Block diagram of the process to obtain the QRMS​

We start with the rectifier. This is a full-wave rectifier where I get the signal module. It can be implemented with different configurations, I chose one in particular but it is not critical, there are several topologies.
To obtain the average value, with the ballistics required for music, a final integration of 400 ms is used, giving a Tau of about 100 ms.
To extract the peak value an "ideal diode" is made, so that its output corresponds to the maximum excursion of the signal. As said, the integration will be 8 times less than the average value, giving about 12 ms of Tau.
The output adder is simply a buffer that adapts the impedances, so as not to load the adding node.

Now only remains to test it in the Multisim simulator and assemble a circuit that electronically represents what is proposed.

I note that I had to simulate an incremental pulse generator, as shown in Figure 6, necessary to generate the X axis of the graphs, so that the Crest Factor increases over time. I don't know if it's the best solution, but it gave me the signal I needed.
Implement it with this circuit:

View attachment 102152

Figure 6: Incremental pulse generator​

Where XFG4 is the 2KHz sinusoidal oscillator for the pulse train. XFG3 is the ramp generator that sweeps from 0 to 5V, so that the comparator varies its output from zero to the maximum in PWM format, enabling or not the bidirectional key. So, each pulse corresponds to a sinusoidal burst, as see in the Figure 7.

View attachment 102153

Figure 7: Test signal for the circuit input.​

For the average value integrator with a 100ms Tau, I used a 100k resistor and a 1uF capacitor. For the peak value with a Tau of 12ms, I used a resistance of 5k6 and a capacitor of .22uF.
The final values were obtained with some reciprocal influences that were not be contemplated in the theoretical development, so adjusting some components the final result confirmed the proposal, that you can approximate an RMS value from an average value!

Circuit developed for evaluation in the Multisim:

View attachment 102154

Figure 8: QRMS circuit implemented in the Multisim​

As a quick description of the circuit shown in Figure 8, you could note that additional components used for testing appear, such as the XFG1 oscillator and the XMM1 meter that are there to simulate the response to constant signals. As well as the potentiometer R11 to have a manual sweep replacing, in the input (+) of the comparator U3, the signal from the XFG3.
I also included an LTC1968, which is a real RMS converter, to have in the oscilloscope the RMS value that would be the objective to achieve.
XMM4 measures the value of the full-wave rectifier, composed of the U1A and U1B stages. The U1C stage forms the peak value detector. And U1D is the output buffer.
The components R4 and C2 (100k and 1uF) form the integrator of the Average value, repeated in R1 and C3 to have the Average value for the oscilloscope. R9 and C1 (5k6 and .22uF) form the integrator of the Peak value (Qpeak). R4 and R3 (100k and 220k) give the ratio of the Average to Peak values. Which as calculated, correspond to 2/3 and 1/3 respectively.


View attachment 102155

Figure 9: Curves obtained in the oscilloscope​

Viewing on the 4-channel oscilloscope XSC1 the different measured values, as shown in Figure 9. The top line in Yellow shows the "quasi-peak" or Qpeak value, which will be added to the mean value indicated in Blue. The Red line shows the RMS value obtained at the output of the LTC1968, and in Green the output of this circuit, which is the QRMS value.

It is undeniable the ripple that appears in the Yellow curve of the Qpeak, because the peak integrator has a very small Tau, but this is expected. However, it is minimized when is adding to the C2 integration capacitor, as shown in the resulting Green line.
It should be also noted that on the far right, the Red line falls below the Green one, this is because for values higher than a Crest Factor of 3, the manufacturer indicates that the LTC1968 increases its error. A limitation that this application obviously shows, and we see that this circuit does not have this behavior.

This is more noticeable in the graph obtained by measuring and tabulating the values in Excel, as shown in Figure 10.


View attachment 102156

Figure 10: Calculated and measured values​

The graph in Figure 10 clearly shows the performance of the proposed circuit. The blue line is the output of the LTC1968, which overlaps nicely with the dotted green line which corresponds to the true RMS value, but for Crest Factors more than 3 (time in sweep > 700 ms), it falls. The red line that corresponds to the QRMS output, although falls a little in the zone of Crest values of approximately 2 (500 ms), its output for values of more than 6 times (maximum analyzed at 950 ms) is better than the LTC. It may be good to clarify that in dB a Crest Factor of 2 times corresponds to 6 dB and 6 times is about 16 dB, a good range between the rms value and the peak value to simulate any type of music. And it follows that this circuit responds well even beyond these Crest Factors.

Conclusions

Based on the analysis of the signals and their behavior as a function of the Crest Factor, this circuit allow to implement an RMS weighting, using simple components to drive an indicator with LED bars, giving a very approximate response to the RMS value of a signal.
In the lab tests a little difference was found, but since the output of the bargraph display utilized in the tests uses discrete steps at 1 dB / LED, it could be said that the differences are acceptable.
Now, with 8 resistors, 2 capacitors, a TL074, and 3 diodes, we managed to simulate an RMS value coined as "QRMS". Simple, cheap and really effective!

I hope you will be encouraged to apply this solution to your meters and I am sure you will see a difference in dynamic performance, being much more representative for the loudness of the music with great dynamics than an average value metering.

I implemented this circuit in my "Proto 12", a Loudness meter of 30 LEDs, and I have evaluated it by a time showing that its performance is not far from those made with True RMS converters.

Until next madness folks!
>> WOW!!! I just came across your posting here and was -- AMAZED!!! -- at both the extent of your circuit presentation and the details within your writing!!! GREAT JOB!!! WOW!!!

Now.....is it possible for you to provide a completed schematic of your circuit while also driving the 30 LED's of your VU-meter? Meaning, this would include showing a "standard" audio-signal input circuit coming from a mixer output or whatever, your metering circuitry and then the 30-LED output display driving circuitry.....minus all of the test equipment that is shown!!! Since I am -- NOT -- a "Circuit Designer" type of person, just by looking at your circuit, I cannot tell if this circuit needs to be repeated for each LED or.....if this circuit just does what you say it does and then it drives some type of multi-LED driving circuitry. A completed schematic showing -- THE WHOLE SHEBANG -- would easily answer that question.


If you can do that, then I could design a small PCB for everything along with a small enclosure that could hold a stereo pair of circuits and LED's for you. What do you think of that?

GREAT JOB!!! And.....WELCOME TO THE FORUM!!!

/
 
Last edited:
Thank you very much for your interest. I am going to prepare the circuit diagram to design a PCB! Does it work for you if I do it in Multisim?
(y)
 
Thank you very much for your interest. I am going to prepare the circuit diagram to design a PCB! Does it work for you if I do it in Multisim?
(y)
[Does it work for you if I do it in Multisim?] -- As long as the final schematic is readable as a "schematic" diagram and is in such a format that I am able to recreate within my CAD schematic program, your schematic can even be hand-drawn, if you want.....I don't care!!! But, it can't use any unusual or special symbols, use any kind of different circuit connection "dots" or anything else other than what a "regular and/or standard" type of schematic diagram would normally contain.

GO FOR IT!!!

/
 
Last edited:
[Does it work for you if I do it in Multisim?] -- As long as the final schematic is readable as a "schematic" diagram and is in such a format that I am able to recreate within my CAD schematic program, your schematic can even be hand-drawn, if you want.....I don't care!!! But, it can't use any unusual or special symbols, use any kind of different circuit connection "dots" or anything else other than what a "regular and/or standard" type of schematic diagram would normally contain.

GO FO IT!!!

/

I am facing an issue in obtaining a complete and functional circuit. The integrated circuits I used to test the prototype are LM3915, which work perfectly with a matrix configuration and provide a perfect 1dB per LED scale. However, this integrated circuit has been discontinued, making it unsuitable for new designs. Therefore, I have decided to use the LM3914, which is readily available. The problem is that the LM3914 is linear and not logarithmic. So, I am working on a design that somehow compensates for the logarithmic scale. What I have so far is quite close, but it has an error of more than 1dB. I will see if I can improve it. I would use ExpressPCB to draw the design, I hope it works.
 
I am facing an issue in obtaining a complete and functional circuit. The integrated circuits I used to test the prototype are LM3915, which work perfectly with a matrix configuration and provide a perfect 1dB per LED scale. However, this integrated circuit has been discontinued, making it unsuitable for new designs. Therefore, I have decided to use the LM3914, which is readily available. The problem is that the LM3914 is linear and not logarithmic. So, I am working on a design that somehow compensates for the logarithmic scale. What I have so far is quite close, but it has an error of more than 1dB. I will see if I can improve it. I would use ExpressPCB to draw the design, I hope it works.
You may want to check these sources out first:

https://www.futurlec.com/Linear/LM3915Npr.shtml
https://www.aliexpress.us/item/3256805591011535.html
https://www.amazon.com/LM3915N-LM3915-Nixie-Display-Driver/dp/B0137JYL00
https://pmdway.com/products/lm3915-dot-bar-display-driver-logarithmic-100-pack
https://www.alibaba.com/product-detail/Lm3915n-Lm3915-LM3915N-1-New-And_1600727813946.html
https://www.alibaba.com/product-detail/lm3915-LM3915N-1-DIP18-led-driver_1600933084257.html
And.....while these "obsolete" IC chips are still available from these and other suppliers, I would visit each one of the above vendors and find one that suits your various needs. Then, I would place an order large enough to satisfy both your current design needs and some extra for any unforeseen future needs. You never know.....you know???

Finally, should you select any of the Chinese or other overseas suppliers, learn to have some patience, as it will certainly take a good while for a shipment to get from them to you. But.....patience will eventually bear out your effort!!!

HINT: I would strongly suggest that you download and learn to use the -- KiCAD -- software, as that is somewhat of a "de facto" standard on this forum for schematics and PCB-design. Besides, if you create your designs using "KiCAD", then you can e-mail them to me so I can later import them and check them out for you. I cannot do that for you if you use EasyEDA.

Here is the download link for the KiCAD software:

https://www.kicad.org/download/
/
 
Given that the LM3915 is still available, then I will provide the original design using this IC. Additionally, as I have been researching how to create a logarithmic display with the LM3914, (and while it's not perfect), it could serve as an interesting alternative. In the context of audio, a logarithmic scale presentation is always better than a linear one. I think to create a post about this adaptation, and I believe it could be interesting. I have downloaded and installed KiCad, and now I will attempt to create the diagram with it. Thanks for your assistance!
 
Given that the LM3915 is still available, then I will provide the original design using this IC. Additionally, as I have been researching how to create a logarithmic display with the LM3914, (and while it's not perfect), it could serve as an interesting alternative. In the context of audio, a logarithmic scale presentation is always better than a linear one. I think to create a post about this adaptation, and I believe it could be interesting. I have downloaded and installed KiCad, and now I will attempt to create the diagram with it. Thanks for your assistance!
[I will provide the original design using this IC] -- We are all anxiously "Standing By....."!!! Be sure to also include your KiCAD schematic file when posting, OK??? Doing so will prove useful to many of the members of this forum as they may also use KiCAD as well.

Have you also purchased the KiCAD "Video Training" series? If you are unfamiliar with using CAD software, the KiCAD "Video Training Series" will certainly ease your learning curve with how to easily and effectively use the program. Otherwise, trying to blindly learn it on your own by randomly clicking on this and that and here and there while you have the program on your monitor, can create unneeded frustration within yourself. Let us know, OK???

/
 
I'm fairly sure this doesn't work with any accuracy for anything other than the test waveform used in the simulation. I suggest you try using a WAV file of music of various kinds. That is harder with Multisim but you could translate it to ltSpice which has native wave file input.
 
Here is the idea in ltSPice using music as the input. The errors between the QRMS and true RMS are quite apparent.

The plots colors are a little hard to see. Sorry!

You might want to take a look at National Semiconductor Linear Brief 25 for a low cost RMS detector
https://www.ti.com/lit/an/snoa690/snoa690.pdf
 

Attachments

  • QRMS.JPG
    QRMS.JPG
    294.8 KB · Views: 1
Last edited:
Here is my first attempt, please take in account this is my FIRST Kicad schematic!
 

Attachments

  • Proto12.zip
    34.9 KB · Views: 1
Here is the idea in ltSPice using music as the input. The errors between the QRMS and true RMS are quite apparent.

The plots colors are a little hard to see. Sorry!

You might want to take a look at National Semiconductor Linear Brief 25 for a low cost RMS detector
https://www.ti.com/lit/an/snoa690/snoa690.pdf
Do you have another link for this? When I click on the link you have provided here, I receive this error message:

Access Denied
You don't have permission to access "http://www.ti.com/lit/an/snoa690/snoa690.pdf" on this server.
Reference #18.ca6bdc17.1695612248.e2dd53


/
 
Here is my first attempt, please take in account this is my FIRST Kicad schematic!
[Here is my first attempt, please take in account this is my FIRST Kicad schematic!] -- I will take a close look at your first KiCAD schematic and then I will get back to you by "shredding" what you have done!!! (kidding!!! That's "joking sarcasm")!!!

/
 
Do you have another link for this? When I click on the link you have provided here, I receive this error message:

Access Denied
You don't have permission to access "http://www.ti.com/lit/an/snoa690/snoa690.pdf" on this server.
Reference #18.ca6bdc17.1695612248.e2dd53


/
Just click on the link in the original post. You are missing the "s" in "https".

I added the method from the brief to the simulation. You can see it is very accurate and overlaps the precise "TRMS" trace

PS: Just in case isn't clear, the average error for the music sample used is between true RMS and QRMS is over 7dB.
 

Attachments

  • QRMS_2.JPG
    QRMS_2.JPG
    221.6 KB · Views: 2
Last edited:
In the analog world the common practice of rectifying and integrating an audio signal give us its average values, which related to music is not accurately representative of the real energy of the signal, especially in a musical material with a lot of dynamic range.

Excellent work. I would like to throw in a curve ball from the stands.

We nowadays get 8051 MCU's with 1Megasample / Sec 12 Bit ADC, multiple PWM Channels and 48MHz clock speed and improved core where most operations take one or two clock cycles, with generous RAM, ROM, on board USB for flash and debug, in a 48-pin case, for around 2 USD in small quantities.

MCU's build on 32-Bit ARM Cores cost a little more, but are otherwise similar.

This kind of MCU should allow a meter to be build that simply samples the music signal at (say) 100kS/sec and gives us a 72dB dynamic range with an LED Bar with at least 40 LED's (single colour, full RGB and more LED's is possible using SPI port extenders), that can display any metric (including multiple in parallel) from peak to RMS and average and including weighted frequency response all in software.

It would likely be much less expensive and offer more functional flexibility as a meter. We might (for) arguments sake) even include a numerical readout in LUFS and perhaps more numerical digits to capture the actual dynamic range and crest factor.

Thor
 
Well, speaking of DSP, I have been playing with the same idea for a long time.
Do you have any sources of sample code that can do this type of calculation in embedded system? I couldn’t find any.
 

Latest posts

Back
Top