# Analogue LED audio level indicators explained

5 5 2 Product

How to design LED audio level indicators? There are two basic methods: Digital and Analogue. The digital method is based on microcontrollers while in the analogue method, audio level indicators are based on operational amplifiers. In this article we will analyze the analogue method of making a LED audio level indicator (better known as a LED VU-meter). LED audio level indicator (LED VU - meter) #### Key features of an analogue LED audio level indicator

1. Every analogue LED audio level indicator is actually a voltmeter that displays voltage amplitude. This is because audio is actually an electrical signal and its level is a function of its voltage amplitude.
2. The audio level is usually displayed on a bar graph, formed by LEDs that are side by side positioned to form a bar.
3. Each LED turns on when the sound level reaches a specific threshold and remains on, as long as the signal amplitude remains stronger than that particular threshold.
4. Towards the ascending direction, The threshold level of each LED is higher than the previous one.
5. A bar-graph is formed by the LEDs and the length of the bar in the graph is proportional to the audio level (signal amplitude).

#### Minimum level, resolution and the dynamic range

Since the bar-graph is formed by M LEDs, the audio level is displayed at M consecutive levels. Each LED corresponds to one of the M consecutive levels. The M levels may be linearly distributed along the dynamic range of the audio level indicator or may be logarithmically distributed.

The first case results in a linear audio level representation while in the second case we have a logarithmic representation. The most common audio level representation is by far the logarithmic one. This is due to psycho-acoustic reasons, for greater dynamic range, as well as for better resolution at low signal levels.

The minimum sound level that can be displayed on the bar graph of a LED VU - meter, is determined by the threshold level of the LED that illuminates at the lowest volume. The resolution of the graph is determined by the difference of two consecutive threshold levels of two consecutive LEDs. The resolution can be expressed in volts, in the case of the linear display method or in db in the case of the logarithmic display method. 10 LED Stereo - VU meter

The entire dynamic range of a LED VU-meter, in volts, is equal to the difference of the maximum, minus the minimum threshold level in the bar graph. That is, the difference of the signal level required to light all the LEDs minus the signal level required to illuminate only one LED in the bar. However, the dynamic range is usually not expressed in volt but rather as a ratio. It is usually expressed as the ratio of the maximum to the minimum threshold level, and can be also expressed in db.

#### The comparator as the basic display unit

In analogue LED audio level indicators, each LED is driven by a voltage comparator. In electronics, a voltage comparator is a device that compares two voltages and outputs a digital signal indicating which is larger. A comparator is usually made from an operational amplifier as in Figure 1:

The comparator compares the two analogue voltages, V+ and V-.  V+ and V- are applied to the non-inverted input (terminal +) and to the inverting input (terminal -) of the operational amplifier, respectively. The output of the comparator is the binary signal Vout. Ideally, Vout, takes two values depending on the result of the voltage comparison of V+ and V-:

1. When the voltage V+ is greater than V-, Vout takes its maximum value (logic 1 – high state).
2. When V- is greater than V+, Vout takes its minimal value (logic 0 – low state).

The exact value of Vout, in volts, at its high or low state, depends on the supply voltages and on the type of the operational amplifier. Usually, Vout at its high state is approximately equal to the positive supply voltage of the operational amplifier (maximum supply voltage) and at its low level is approximately equal to the negative supply voltage of the operational amplifier (minimum supply voltage). It is worth noting that all voltages are measured relative to the ground (a common point that is considered to be at 0 Volts).

In fact, any of the two voltage levels of Vout (but usually the high state) can be used to drive a LED and turn it on.

In order to study the comparator circuit you may refer to plenty of online resources. However, the main operation concept of the comparator is as follows:

An operational amplifier is actually a high gain differential amplifier. In most circuits, operational amplifiers are used with negative feedback to limit their large gain. But in the comparator circuit there is no negative feedback and the high gain is in practice the parameter that turns the differential amplifier to a comparator. Let G be the open loop gain (without feedback) of the operational amplifier. Then, the operation of the comparator may be summarized by equation 1:

Vout=G·(V+ - V-)

(1)

Equation 1 states that the operational amplifier amplifies the difference of the two input voltages (V+ minus V-) by G times. Due to the fact that the open loop gain G, is very large, (theoretically infinite and in practice is around 10000 to 1000000 and depends on the type of operational amplifier) even from a negligible differential voltage, a large voltage value is obtained for Vout. Theoretically, G is assumed to be infinite, and Vout voltage would receive the extremes of + ∞ and -∞.   In practice, the G gain is very high, but not infinite, and Vout has a very high positive value when V+ is greater than V- (the sign of the differential input voltage is positive) and a very large negative value when if V+ is less than V- (the sign of the differential input voltage is negative).

In a practical circuit the maximum Vout voltage is limited by the positive supply voltage of the operational amplifier, while the minimum Vout voltage is limited by the negative supply voltage rail. If the operational amplifier is powered only by a positive voltage, Vout at its low state would be very close to 0V.

#### Use of comparators for DC voltage level indication

Every analogue LED audio level indicator is a voltmeter that displays voltage amplitude, as we mentioned in the first section of our article. Therefore, a LED audio level indicator is actually an AC voltmeter. Instead of making a LED AC voltmeter, we will start by making a simpler DC-only circuit. Next, we will make the necessary changes to convert it into an AC voltmeter. So let's start by making a LED DC voltage level indicator:

To make the LED DC voltmeter, we need many identical comparator circuits. For a total number of M-LEDs, we need M = N + 1 comparators, such as in Figure 2 (comparators are indexed from 0 to N). Figure 2. LED DC level indicator

Notice that the input signal, Vin (the DC signal) is applied to all non-inverting inputs (+) of all operating amplifiers. Conversely, at each inverting input of each operational amplifier, a different voltage, resulting from a series resistors scale (Ro to RN) is applied.

A voltage Vi, is applied to the inverting input of each operational amplifier. The “i” index receives values from 0 to N, with N = M-1. The V0 voltage is applied on the inverting input of the first operational amplifier, V1 is applied to the second op-amp, V2 to the third, and so on. Notice that each voltage Vi is higher than its predecessor voltage (Vi-1).

Vi, is actually the threshold voltage for the i-th LED. So LED 0 turns on when DC input voltage is greater than V0, LED 1 turns on when DC input voltage is greater than V1, LED 2 turns on when DC input voltage is greater than V2 and so on. For instance, when the input voltage is greater than V3 and lower than V4, the first 4 LEDs, from D0 to D3 will be on. When all LEDs are positioned side by side, a light bar will be formed whose length will reflect the DC input voltage. So basically, we have made a DC voltmeter with LEDs. Let us now consider how to calculate the values of resistors Ro to RN in order to design a linear scale voltmeter or in order to design a logarithmic voltmeter:

Let's first consider how much current is passing through resistors Ro to RN. Assuming that the input impedance of each operational amplifier has an infinite value, all of these resistors are in series, so the same current I, is passing through them:

Ι=VR/Rt

(2)

Rt is the total resistance of the series connection of Ro to RN. That is:

Rt=R0+R 1+…..+RN

(3)

It is valid to assume that the resistors R0 to RN are in series as far as the input resistance of all op-amps is infinite. Otherwise, we would have current leaks to the operating amplifiers and we could not consider that we have a series of resistors. In practice, the operators have no infinite input resistance but exhibit an extremely high input resistance (in the order of several hundred KΩ or tens of MΩ) so our approach is accurate as long as the leakage currents are much less than I or the total sum Rt, of resistors Ro to RN, is much lower than the input resistance of each operational amplifier.

The threshold voltage of the first LED (V0) shall be equal to:

V0=I·R0 or V0=VR ·R0 /Rt

(4)

The threshold voltage of the second LED (V1) would be:

V1=I·(R0 + R1) or V1=V R ·(R0 + R1)/Rt

(5)

In the same way, any threshold voltage Vi, would be:

Vi= (VR /Rt)·∑n (from 1 to N) Rn

(6)

Index i takes values from from 0 to N (N=Μ-1, and Μ is the total number of LEDs). The ∑i symbol denotes summing of terms indexed by i.

Naturally, for the last LED (the N- indexed one), it is that

VN=VR

(7)

The VR voltage is actually an external DC reference voltage, which determines all the threshold voltages in the scale (see equation 6). So, when we refer to VR, we will just call it as the “reference voltage”.

#### Linear scale display

In the case of a linear scale LED voltage indicator, all resistors Ro to RN should have the same value. That is, Ro = R1 = R2 = …… = RN. Any value is valid, since we assumed that each operational amplifier has an infinite input resistance. The only thing that matters is the fact that all these resistors should be identical.

It is better to chose a relatively high value in order to minimize the current flow in the in series resistors (therefore for power economy) but not too high for avoiding thermal noise. The actual input resistance of the op-amps is very high but not infinite. This is another parameter that prevents us from using very high resistors.

From equation (6) and by considering that all resistors R0 to RN are of the same value, it follows that:

The minimum threshold level is  V0 = VR · R0 / Rt and the resolution step is Vi - Vi - 1, which is also equal to Vo. That is, Vi - Vi-1 = V0. It is also true that V0 = VR / M, where M is the total number of LEDs. That is, the minimum threshold level and the resolution step are equal to the reference voltage ratio to the total number of steps. As a consequence, the dynamic range of the system in volts will be equal to VR-VR/M, that is, equal to (M-1)·VR/M. VR is actually the upper limit of the dynamic range and this means that for DC input voltages larger than VR the system will be saturated - that is, all LEDs will be on.

Usually the dynamic range is not expressed in volts but as a ratio of the maximum to the minimum threshold level. By this way, the dynamic range of a linear voltage level indicator would be equal to VR/(VR/M), i.e. equal to M or equal to 20log(M), in db. Therefore, in the case of a linear scale, the dynamic range of the LED indicator depends only on the total number of LEDs.

#### Logarithmic scale

In the case of a logarithmic scale, resistors Ro to RN are not identical and their values depend on the resolution step. To calculate the correct values for the logarithmic scale, we have to solve the circuit as below:

Let's consider that the resolution step would be equal to S db (eg 1.5, 2 or 3 db etc.). This means that each Vi voltage should be S db higher than the previous one, Vi-1. Given the definition of db, should be true that:

20 log(Vi /Vi-1)=S⇒ Vi /V i-1=10S/20

(7)

By substituting the voltages Vi / Vi -1, from equation (6), we find that:

Ri = Σn(n= from 0 to i-1) Rn (10S/20 -1) , for i from 1 to Ν

(8)

So, we end up with a recursive formula (8) from which we can calculate the value of each Ri resistor, as long as we know the resolution step S, in db, and the value of all previous terms.  That is, in order to calculate R1, we need to know the value of Ro. Then, we are able to calculate R2 from R1 and R0, R3 from R2, R1 ,and R2 , and so on.  By setting

10S/20

(9)

we may obtain from equation (8), that:

R1= R(A -1)

R2= R(A -1)+ R(A -1)2

R3= R(A -1)+ 2R(A -1)2+ R(A -1)3

R4= R(A -1)+ 3R(A -1)2+ 3R(A -1)3+ R(A -1)4

R5=…. and so on.

The above are equivalent to:

R1= R(A -1)·1

R2= R0·(A -1) ·[1+(Α-1)]

R3= R(A -1) ·[1+2(Α-1)+(Α-1)2]

R3= R(A -1) ·[1+3(Α-1)+3(Α-1)2+(Α-1)3]

R5=…. and so on

We may observe that there are some polynomials inside the brackets. These polynomials have binomial coefficients.  Given the binomial theorem we may observe that all these polynomials are of the form of (x+1)N, with x=A-1. Thus, we may write:

R1= R(A -1)·Α0

R2= R(A -1)·Α1

R3= R(A -1)·Α2

R4= R(A -1)·Α3

R5=…. and so on

All the above equations could be summarized in a single equation as:

Ri = R(A -1)·Αi-1, i is an index from 1 to Ν

(10)

Equation (10) is another expression for calculating the values of R0 to RN. Equation (10) is of course equivalent to equation (8), but there is also a significant difference: While equation (8) is a recursive formula, equation (10) is an analytic expression. This means that we may directly find the value of any resistance in the R0-N network without necessarily having to know any other value apart from R0.

R0 can be selected in two ways, as follows:

1. We may choose an arbitrary value for R0.
2. We may first take a decision about the value of the total resistance Rt , and then calculate R0 from  Rt based on the equation:

Rt = Ron (from 1 to N) Rn

(11)

By substituting Ri values from equation (10), we find:

Ro=Rt/(1+ (A -1)·Σi (from 1 to N) Αi-1 )

(12)

Since M is the total number of LEDs, there are N = M-1 steps, and this means that the minimum threshold will be N·S db lower than the maximum threshold voltage (the reference voltage VR). This means that the dynamic range of the logarithmic indicator is equal to N·S db, and given the definition of db, we may find that the minimum imaging voltage in volts will be equal to VR · 10-N·S/20.

#### From DC to ΑC

So far, we have analyzed how to make a LED DC voltmeter, either linear or logarithmic. But our initial goal was to build an AC voltmeter because we wanted to make a sound level indicator.

To convert the DC voltmeter to an AC one, we have to add a rectifier. The rectifier can be either of a half wave or a full wave type (ie either a simple diode or a rectifier bridge). It may be also a simple rectifier based on silicon diodes or any precision rectifier based on op-amps or any other type. The input signal must be applied to the rectifier input and the rectifier output must be connected to the DC voltmeter.

From the general rectification theory we know that a rectifier produces an output which contains a DC component which is proportional to the amplitude of the AC input signal and several higher order harmonics. The DC - component contains all the useful information regarding the level of the AC input signal. Therefore, if we want our voltmeter to accurately display the amplitude of an AC signal, we should also add a low-pass filter to reject the upper-order harmonics produced by the rectifier.

All the necessary additions, in order to convert the basic LED DC voltmeter into an AC one, are shown in Figure 3: Figure 3. LED AC voltmeter (derived from a LED DC voltmeter with the addition of a rectifier and a low-pass filter)

The role of the RP potentiometer will be discussed in the next section.

It does not matter if the rectifier is made from silicon diodes or with operational amplifiers or if the filter is of an active or of a passive topology. In general, for the construction of a LED audio level indicator, all types of rectifiers are acceptable and all types of low-pass filters are also acceptable (active or passive). A precision rectifier based on op-amps will naturally have greater sensitivity than a simple diode rectifier. The second will be unable to respond to weak signals, below the diode threshold voltage (around 0.6V). For audio applications, it is recommended that the cut-off frequency (-3db) of the low-pass filter is around 2 to 10Hz (i.e., a time constant of about 500 to 100ms), so that the sound level indicator responds relatively slowly and delivers a sense of peak retention. Otherwise, the LED indicator will flicker too fast and it will be virtually impossible to visualize the signal level.

From equation (6) we found that VR determines the upper limit of the dynamic range and all threshold voltages (from Vo to VN).  In the presence of a loud signal with amplitude equal or higher than the reference voltage VR (which is actual the threshold level of the most significant LED), the system saturates. During saturation, all the LEDs remain on. This means that the sound level meter may be continuously at saturation (all LEDs will light up) if the input signal is constantly higher than the reference voltage. This will be the case if the reference voltage is set too low. By the other hand, if the reference voltage is set too high, there may be some few functional LEDs on the meter and some of them may be permanently off.

These problems can be avoided by an adjustable reference voltage. Then, VR could be adjusted at the right level, according to the input signal strength.

The Rp potentiometer in the circuit of Fig. 3, has been inserted precisely for this reason; that is to allow the VR reference voltage to be adjusted.

#### Design examples:

Linear audio level indicator example

Suppose that we want to design a linear audio level meter with 10 LEDs. There is a +12V power supply voltage available and we have to use some operational amplifiers of known characteristics. The input resistance of the operational amplifiers is about 1MΩ and the maximum output voltage at the output of any op-amp (the positive rail) is about 2V lower than the positive supply voltage. It is also known, from LED’s operating characteristics, that any of the available LEDs that is driven by a current of 20mA, has a voltage of about 2V at its terminals.

By referring to the circuit of Figure 1, since we have 10 LEDs, we will need 10 resistors for the threshold voltage generating network, R0 to R9. Since we need a linear scale, all resistors should be identical. We will choose a high enough resistor value in order to minimize power consumption but at the same time the total resistance Rt should be much lower than the input resistance of each operational amplifier.

Since we have 10 identical resistors, the total resistance Rt will be equal to 10 R0.

Lets choose Rt to be 20 times less than the input resistance of 1MΩ. With this choice, Rt should be equal of about (1/20) MΩ, that is, 10R0 = 50KΩ, that is R0 = 5KΩ. The closest to the 5KΩ value, for resistors of the E24 series, is the value of 4.7KΩ and therefore the value of 4.7KΩ would be a reasonable choice.

Now it is time to calculate the resistors RL0 to RL9, which should be connected in series with the LEDs. The supply voltage is 12V and it is given that the logic-1 level in each comparator corresponds to a voltage which is 2V below the supply voltage. This means that the logic-1 level at the output of any comparator is about 10V. From this, and since the voltage at the ends of each LED is 2V, at a current of 20mA, we conclude that the voltage at the ends of each RL resistor is 8V. Then by using OHM’s law (R=V/I) and by setting V=8V and I=20mA, we find that each RL resistor should be equal to 8/0.02 = 400Ω. The nearest at 400Ω value for E24 series resistors is 390Ω. So the 390Ω value is a reasonable choice for all RL resistors.

Logarithmic audio level indicator design example

Suppose we want to design a logarithmic sound level indicator with 10 LEDs and a resolution step of 3db. There is a +12V power supply voltage available and we have to use some operational amplifiers of known characteristics. The input resistance of the operational amplifiers is about 1MΩ and the maximum output voltage at the output of any op-amp (the positive rail) is about 2V lower than the positive supply voltage. It is also known, from LED’s operating characteristics, that any of the available LEDs that is driven by a current of 20mA has a voltage of about 2V at its terminals.

By referring to the circuit of Figure 1, since we have 10 LEDs, we will need 10 resistors for the threshold voltage generating network, R0 to R9. Let’s choose Rt to be 20 times less than the input resistance of 1MΩ. Thus Rt, should be about (1/20) MΩ = 50KΩ.

By setting S=3db on equation (9), we calculate that Α=√2 -1.

By setting Α=√2 -1 on equation (12) and for Ν=9, we find that R0=2233Ω.

After calculating the value for R0, we are able to calculate all other values for the rest resistors off the scale network (from R1 to R9). By using equation (10) for N=9 and by setting  R0=2233Ω , we are able to find that:

R1=921.2Ω, R2=1300Ω, R3=1820Ω, R4=2610Ω, R5=3667Ω, R6=5180Ω, R7=7317Ω, R8=10340Ω, R9=14600Ω

The closest to the above values, for E96 (1%) series resistors are:

R1=931Ω, R2=1301Ω, R3=1838Ω, R4=2596Ω, R5=3650Ω, R6=5230Ω, R7=7320Ω, R8=10200Ω, R9=14700Ω Figure 4.  Ri resistor values in OHM, for Ν=9 and Rt=50K

Now it is time to calculate the resistors RL0 to RL9, which should be connected in series with the LEDs. The supply voltage is 12V and it is given that the logic-1 level in each comparator corresponds to a voltage which is 2V below the supply voltage. This means that the logic-1 level at the output of any comparator is about 10V. From this, and since the voltage at the ends of each LED is 2V, at a current of 20mA, we conclude that the voltage at the ends of each RL resistor is 8V. Then by using OHM’s law (R=V/I) and by setting V=8V and I=20mA, we find that each RL resistor should be equal to 8/0.02=400Ω. The closest to the 400Ω value for E24 series resistors is 390Ω. So the 390Ω value is a reasonable choice for all RL resistors.

The above article on “Analogue LED audio level indicators explained” is part of some notes from lectures on electronics, given by G. Adamidis (Physicist - Msc in Electronic Physics) in Greek vocational institute of higher education. The provided test is a translation from the original Greek text.

The purpose of the article is to analyze the main concept of analogue LED audio level indicators. In the context of this analysis we propose some circuit topologies based on op-amp comparators. Of course, comparators may be constructed with elements other than operational amplifiers, such as bipolar transistors or FETs.

The article presents an idea and a clear methodology, and can be used as a construction or a learning manual.

There is always room for improvements. If you think that there is something wrong or something has to be improved, feel free to post your comments or send your feedback. At CircuitLib we greatly appreciate any contribution from anyone.

List of the comments:
 No comments have been posted yet.
Vote: