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).

Analogue LED audio level indicators exlained by George Adamidis is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

#### Key features of an analogue LED audio level indicator

- 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.
- The audio level is usually displayed on a bar graph, formed by LEDs that are side by side positioned to form a bar.
- 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.
- Towards the ascending direction, The threshold level of each LED is higher than the previous one.
- 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.

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 V_{out}. Ideally, V_{out}, takes two values depending on the result of the voltage comparison of V_{+} and V_{-}:

- When the voltage V
_{+} is greater than V_{-}, V_{out} takes its maximum value (logic 1 – high state).
- When V
_{-} is greater than V_{+}, V_{out} takes its minimal value (logic 0 – low state).

The exact value of V_{out}, in volts, at its high or low state, depends on the supply voltages and on the type of the operational amplifier. Usually, V_{out} 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 V_{out} (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:

V_{out}=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 V_{out}. Theoretically, G is assumed to be infinite, and V_{out} voltage would receive the extremes of + ∞ and -∞. In practice, the G gain is very high, but not infinite, and V_{out} 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 V_{out} voltage is limited by the positive supply voltage of the operational amplifier, while the minimum V_{out} voltage is limited by the negative supply voltage rail. If the operational amplifier is powered only by a positive voltage, V_{out} 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).

Notice that the input signal, V_{in} (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 (R_{o} to R_{N}) is applied.

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

V_{i}, is actually the threshold voltage for the i-th LED. So LED 0 turns on when DC input voltage is greater than V_{0}, LED 1 turns on when DC input voltage is greater than V_{1}, LED 2 turns on when DC input voltage is greater than V_{2} and so on. For instance, when the input voltage is greater than V_{3} and lower than V_{4}, the first 4 LEDs, from D_{0} to D_{3} 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 R_{o} to R_{N} 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 R_{o} to R_{N}. 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:

Ι=V_{R}/R_{t}

(2)

Rt is the total resistance of the series connection of R_{o} to R_{N}. That is:

R_{t}=R_{0}+R _{1}+_{…..+}R_{N}

(3)

It is valid to assume that the resistors R_{0} to R_{N} 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 R_{t}, of resistors R_{o} to R_{N}, is much lower than the input resistance of each operational amplifier.

The threshold voltage of the first LED (V_{0}) shall be equal to:

V_{0}=I·R_{0 }or V_{0}=V_{R} ·R_{0 } /R_{t}

(4)

The threshold voltage of the second LED (V_{1}) would be:

V_{1}=I·(R_{0} + R_{1}) or V_{1}=V _{R} ·(R_{0} + R_{1})/R_{t}

(5)

In the same way, any threshold voltage V_{i}, would be:

V_{i}= (V_{R} /R_{t})·∑_{n (from 1 to N)} R_{n}

(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

V_{N}=V_{R}

(7)

The V_{R} 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 V_{R}, we will just call it as the “reference voltage”.

#### Linear scale display

In the case of a linear scale LED voltage indicator, all resistors R_{o} to R_{N} should have the same value. That is, R_{o} = R_{1} = R_{2} = …… = R_{N}. 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 R_{0} to R_{N} are of the same value, it follows that:

The minimum threshold level is V_{0} = V_{R} · R_{0} / Rt and the resolution step is V_{i} - V_{i - 1}, which is also equal to V_{o}. That is, V_{i} - V_{i-1} = V_{0}. It is also true that V_{0} = V_{R} / 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 V_{R}-V_{R}/M, that is, equal to (M-1)·V_{R}/M. V_{R} is actually the upper limit of the dynamic range and this means that for DC input voltages larger than V_{R} 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 V_{R}/(V_{R}/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 R_{o} to R_{N} 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 V_{i} voltage should be S db higher than the previous one, V_{i-1}. Given the definition of db, should be true that:

20 log(V_{i} /V_{i}_{-1})=S⇒ V_{i} /V _{i}_{-1}=10^{S/20}

(7)

By substituting the voltages V_{i} / V_{i -1}, from equation (6), we find that:

R_{i} = Σ_{n(n= from 0 to i-1)} R_{n} (10^{S/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 R_{1}, we need to know the value of Ro. Then, we are able to calculate R_{2} from R_{1} and R_{0}, R_{3} from R_{2}, R_{1} ,and R_{2} , and so on. By setting

10^{S/20}=Α

(9)

we may obtain from equation (8), that:

R_{1}= R_{0·}(A -1)

R_{2}= R_{0·}(A -1)+ R_{0·}(A -1)^{2}

R_{3}= R_{0·}(A -1)+ 2R_{0·}(A -1)^{2}+ R_{0·}(A -1)^{3}

R_{4}= R_{0·}(A -1)+ 3R_{0·}(A -1)^{2}+ 3R_{0·}(A -1)^{3}+ R_{0·}(A -1)^{4}

R_{5}=…. and so on.

The above are equivalent to:

R_{1}= R_{0·}(A -1)·1

R_{2}= R_{0}·(A -1) ·[1+(Α-1)]

R_{3}= R_{0·}(A -1) ·[1+2(Α-1)+(Α-1)^{2}]

R_{3}= R_{0·}(A -1) ·[1+3(Α-1)+3(Α-1)^{2}+(Α-1)^{3}]

R_{5}=…. 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:

R_{1}= R_{0·}(A -1)·Α^{0}

R_{2}= R_{0·}(A -1)·Α^{1}

R_{3}= R_{0·}(A -1)·Α^{2}

R_{4}= R_{0·}(A -1)·Α^{3}

R_{5}=…. and so on

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

R_{i} = R_{0·}(A -1)·Α^{i-1}, i is an index from 1 to Ν

(10)

Equation (10) is another expression for calculating the values of R_{0} to R_{N}. 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 R_{0-N} network without necessarily having to know any other value apart from R_{0}.

R_{0} can be selected in two ways, as follows:

- We may choose an arbitrary value for R
_{0}.
- We may first take a decision about the value of the total resistance R
_{t} , and then calculate R_{0} from R_{t} based on the equation:

R_{t} = R_{o}+Σ_{n (from 1 to N)} R_{n}

(11)

By substituting R_{i} values from equation (10), we find:

R_{o}=R_{t}/(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 V_{R}). 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 V_{R} · 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:

The role of the R_{P} 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.

#### Sensitivity adjustment

From equation (6) we found that V_{R} determines the upper limit of the dynamic range and all threshold voltages (from V_{o} to V_{N}). In the presence of a loud signal with amplitude equal or higher than the reference voltage V_{R} (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, V_{R} could be adjusted at the right level, according to the input signal strength.

The R_{p} potentiometer in the circuit of Fig. 3, has been inserted precisely for this reason; that is to allow the V_{R} 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, R_{0} to R_{9}. 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 R_{t} should be much lower than the input resistance of each operational amplifier.

Since we have 10 identical resistors, the total resistance R_{t} will be equal to 10 R_{0}.

Lets choose R_{t} to be 20 times less than the input resistance of 1MΩ. With this choice, R_{t} should be equal of about (1/20) MΩ, that is, 10R_{0} = 50KΩ, that is R_{0} = 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 R_{L0} to R_{L9,} 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 R_{L} resistor is 8V. Then by using OHM’s law (R=V/I) and by setting V=8V and I=20mA, we find that each R_{L} 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 R_{L} 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, R_{0} to R_{9}. Let’s choose R_{t} to be 20 times less than the input resistance of 1MΩ. Thus R_{t}, 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 R_{0}=2233Ω.

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

R_{1}=921.2Ω, R_{2}=1300Ω, R_{3}=1820Ω, R_{4}=2610Ω, R_{5}=3667Ω, R_{6}=5180Ω, R_{7}=7317Ω, R_{8}=10340Ω, R_{9}=14600Ω

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

R_{1}=931Ω, R_{2}=1301Ω, R_{3}=1838Ω, R_{4}=2596Ω, R_{5}=3650Ω, R_{6}=5230Ω, R_{7}=7320Ω, R_{8}=10200Ω, R_{9}=14700Ω

Now it is time to calculate the resistors R_{L0} to R_{L9}, 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 R_{L} resistor is 8V. Then by using OHM’s law (R=V/I) and by setting V=8V and I=20mA, we find that each R_{L} 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 R_{L} resistors.

#### Details about this article

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.