This is only a preview of the February 2018 issue of Silicon Chip. You can view 37 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "A Water Tank Level Meter with WiFi and More!":
Items relevant to "El Cheapo Modules 13: sensing motion and moisture":
Items relevant to "Highly versatile & accurate dot/bar 10-LED Bargraph":
Items relevant to "The Arduino Mega Box Music Player revisited":
Purchase a printed copy of this issue for $10.00. |
A 10-LED Bargraph with
Want a really flexible bargraph? This 10-LED Bargraph will fill the
bill. It can be configured for dot or bar mode, while for audio signal
monitoring, extra circuitry can be added to provide for VU or for
Peak Program Metering (PPM). It’s a worthy replacement for the
now-discontinued LM391X series of bargraph chips.
L
ED bargraph displays are ubiquitous – you will find them everywhere, in all sorts of electronic
equipment.
They can be horizontal, vertical,
curved, circular or other shapes. They
give an immediate visual indication of
operating conditions, whether monitoring voltage levels or physical parameters such as temperature, audio
signal level or whatever and they can
be designed to react rapidly or slowly.
While many displays these days are
digital read-outs, bargraphs are much
better at showing variations in level,
especially if those variations happen
quickly.
This 10-LED Bargraph indicates DC
voltage levels in a series of 10 steps but
those DC voltages can correspond to
any physical measurement, as noted
above. The voltage steps to light each
subsequent LED can be equal, meaning that the display is linear, or the
64
Silicon Chip
steps can be non-linear, for example,
giving a logarithmic display. In that
case, each step could amount to say a
3dB increment.
It’s easy to build this bargraph with
a linear, logarithmic or any other scale
since the steps are determined by a set
of resistors, connected in series. We
provide examples of the resistors to
use for linear, logarithmic or VU (audio level) scales.
Alternatively, you could produce
your own custom scale by using a different set of resistors.
This project is presented on two
PCBs. One is the LED Dot/Bar display
PCB and the other is the optional Signal Processing PCB, which is used to
convert an AC signal into a suitable DC
voltage to drive the bargraph.
All the components used on both
By JOHN CLARKE
Celebrating 30 Years
boards are readily available. The main
integrated circuits are LM358 dual op
amps, two LM324 quad op amps and
one LP2951 voltage regulator with
most of the remaining components being resistors and capacitors. The LEDs
that form the bargraph itself can be
surface-mount types that sit directly
on the PCB, or standard 3mm LEDs.
The LEDs will light up singly in dot
mode or in a column of LEDs will light
up in bargraph mode.
The display mode is selected by
bridging pairs of solder pads on the
PCB, with nine links (bridges) to solder for each mode. Once you’ve built
the unit, it is configured as either a dot
or bar display and this can’t easily be
changed later.
Why not use an LM3914/5/6?
No doubt some readers are already
thinking, “Why do we need all these
comparators when single chip barsiliconchip.com.au
really flexible display options
graph ICs from National Semiconductor can already do this?”
The National Semiconductor
LM3914 (linear) LM3915 (logarithmic)
and LM3916 (VU) bargraph ICs certainly can do these jobs and they have
been very widely used for many years.
However, the LM3915 has not been
manufactured by National Semiconductor for 15 years and although we
are aware that are still dribs and drabs
around from some sources, NS advise
not to base any new designs on this
chip. So we won’t!
Its cousin, the LM3916, was discontinued many years ago and is effectively no longer available. The only
one that seems to be readily available
in large quantities is the LM3914 – but
the problem with this is that it can only
display a linear scale.
And while these three bargraph
ICs present an easy single-chip solution for many dot/bargraph applications, they do have limitations when
you want to customise the circuit parameters.
For example, the LM3914 linear
bargraph will always have an overlap in the transition from one LED to
the next. That means that at least one
LED is always illuminated but it does
reduce the precision of the display.
In the case of the logarithmic
LM3915, the LED step increments are
fixed at 3dB, giving a 30dB range. You
cannot change the size of the steps to
2dB, or less, for example.
And for both chips working in bargraph mode, all the illuminated LEDs
are effectively in parallel and that can
cause heat dissipation Featur
es & specifications
problems in the chips;
• 10 LEDs – you decide
they have limited power
which type, colour, etc
handling.
• Dot or Bar modes
Indeed, for many au• DC or AC input voltag
dio signal bargraph apes
plications, the circuit
• Linear, Logarithmic,
VU or PPM display
we present in this arti•
Ru
ns
from 12V (100mA maxim
cle is far more useful.
um)
This is particularly
• Full-scale signal ran
ge
adjustable from 583mV
the case in audio mixto 55V
• Uses readily-availab
ers where multiple LED
le components
bargraphs are required,
• Suits surface-mount
or through-hole LEDs
with a resultant high
current requirement.
In those cases, the LM3914/5/6 series
is definitely not ideal.
nected as a comparator to drive a LED.
Yes, our 10-LED bargraph does use
The op amp’s inverting input (-)
more components than the single-chip
pin 2 is connected to the input signal
chip circuits but all the components
while the non-inverting input (+) pin 3
are cheap and readily available and
is connected to a voltage divider comyou can customise the circuit to suit
prising resistors R1 and R2, connected
your particular application, somein series between a reference voltage
thing that is not easy to do with the
(Vref) and ground.
chip circuits.
Assuming that these resistors are the
Finally, these two boards provide
same value, the junction of R1 and R2
a useful aid to demonstrate the use
is one half of Vref (ie, Vref/2). So pin 3
of op amps as comparators, window
of IC2a is held at Vref/2. Now if the incomparators, driving LEDs, along with
put signal at pin 2 is lower than Vref/2,
signal metering and overall bargraph
the output of IC2a will be high. But if
design.
the input signal at pin 2 is greater than
Vref/2, the output of IC2a will be low
How it works
(at close to 0V).
The 10-LED Bargraph circuit comThat means that the op amp will pull
prises ten op amps (operational amcurrent through the LED to light it up.
plifiers) that are used as comparators.
Note that we could use a comparaEach drives one of the LEDs, switching
tor (such as the LM339) do this same
it on when the input voltage exceeds
function but if we wanted to reverse
(or drops below) a set threshold.
the action of the comparator, to drive
To begin, let’s consider Fig.1, which
a LED connected between its output
shows a single op amp (IC2a) conand the 0V rail, it would not work
On the left is the
converter PCB which takes
an audio signal and processes it into
either VU or PPM . . . to be read by the main
bargraph display board at right. It can show either a
dot graph (ie, one LED alight at a time) or a bar graph
(all LEDs alight up to and including the level at that time).
siliconchip.com.au
Celebrating 30 Years
February 2018 65
Fig.1 (above): this shows the operation of a
comparator. It compares the input signal with a
reference at its non-inverting input and turns on
the LED if the input is above the reference.
Fig.2 (right): this combines three comparators, each
with separate reference voltages at TP1, TP2 and TP3.
Each comparator will turn on its respective LED if
the input voltage is above its reference voltage. The
different LED connections provide for dot or bar modes.
since that type of comparator can only
“sink” current rather than “source” it.
So we use op amps throughout out
circuit because their push-pull outputs
make them more flexible.
So now we want to drive more LEDs.
For that, we add more comparators or
in this case, op amps.
Fig.2 shows a triple comparator setup, with each comparator driving one
LED and with its non-inverting input
connected to a resistor higher in the
series string. The inverting inputs are
connected together to monitor the
same signal (Vin).
Note that while we will refer to comparators in this article, in each case
they will actually be op amps.
In fact, consider that op amps and
comparator ICs contain almost identical circuitry; the main difference, besides the output configuration, is that
op amps are compensated for closedloop stability, which makes them slower to react. But for this project, we’re
dealing with slowly changing signals
so that isn’t a problem.
(Op amps are normally configured
with external negative feedback while
comparators normally have positive
feedback [hysteresis]).
Fig.2 also shows the LED connections for the dot and bar modes. In bar
mode, each LED connects between the
positive supply and the op amp output
via a series 2.2kΩ resistor. This means
each LED will light whenever its comparator output is low.
For dot mode, the anode of each LED
connects to the next higher op amp
66
Silicon Chip
output. So a LED will light when the
higher op amp output is high and the
lower op amp output is low.
For example, for LED1, when Vin is
higher than the voltage at TP1 but lower than the voltage at TP2, the output
of IC2a will go low and current will
flow from the output of IC2b, through
LED1 and the 2.2kΩ resistor and then
into the output of IC2a.
In other words, IC2b is “sourcing”
LED1’s current while IC2a is acting as
the “current sink”. As stated above,
this would not work with a typical
(open-collector output) comparator.
OK. Now when the voltage at Vin
goes above the voltage at TP2 but is still
lower than at TP3, IC2b’s output will
go low, switching off LED1 but it will
sink current through LED2 which ultimately comes from the output of IC3b.
Therefore, in dot mode, only one
LED will light at any given time.
For bargraph mode, the LEDs are reconfigured as shown in Fig.2 (LED1’,
LED2’ etc) and so they will light up
whenever the associated comparator output goes low, so if LED2’ is lit,
LED1’ will be lit and if LED3’ is lit
then LED2’ and LED1’ will also be lit.
Switching thresholds and
dithering LEDs
Having said that, it is possible for
two LEDs to be alight (or partly alight)
when the input signal is close to one
of the voltage thresholds, defined by
the reference resistor “ladder” (ie, at
TP1, TP2, etc).
This is due to the fact that the op
Celebrating 30 Years
amps have inherent noise which can
cause them to rapidly switch on and
off when the two input voltages are
very close together.
This can be prevented by using hysteresis and as mentioned above, this
involves adding positive feedback between the output of each comparator
and its non-inverting input.
However, that would require the
addition of three resistors to each (op
amp) comparator and we have not
done that with this 10-LED bargraph
circuit since it would mean an additional 30 resistors. That’s a lot of hassle to solve a minor problem.
Full circuit description
Now let’s have a look at the full
circuit of the 10-LED dot/bargraph
display in Fig.3. This shows the 10
(op amp) comparators and the 10resistor ladder network providing the
reference voltage for each comparator.
The resistor network is connected to
the output of adjustable voltage regulator REG1, an LP2951. This ensures
a stable voltage to the resistor string
regardless of variations in the input
supply voltage. REG1’s output voltage is adjusted by trimpot VR2 to a
precise 10V DC.
Note that this bargraph circuit by
itself is only suitable with a DC input
signal; it will not respond an audio
(AC) input signal. In this respect, it
is the same as bargraph circuits using
the LM3914/15 series chips. (We will
get to the additional circuitry which
allows that later.)
siliconchip.com.au
The DC input signal is applied to
CON1 and voltage is limited by the
clamping diodes D2 and D3, to a range
of 0-11.4V, protecting the circuit from
excessive voltages. The input 100kΩ
resistor limits the current through the
D2 and D3 to safe levels.
If the input voltage to be monitored
swings by more than 10V, it should be
attenuated and that can be done by installing link JP1. That places a 10kΩ
resistor in circuit which, in conjunction with the input 100kΩ resistor following CON1, attenuates the signal by
a factor of 11.
Op amp IC1a is configured as a noninverting amplifier with is gain varied
by trimpot VR1. Its gain can be varied
between unity (one) and six.
Note that op amp IC1b (part of the
same dual op amp) is not used in the
Fig.3: this circuit is an expansion of Fig.2 to show all ten
comparators and their LEDs, together with an adjustable input
gain stage IC1a. Its gain is varied by trimput VR1. The adjustable
regulator, REG1, provides a stable 10V reference supply for the ten
comparators.
siliconchip.com.au
Celebrating 30 Years
February 2018 67
circuit and it is disabled by having it
pins 1 & 2 connected together and pin
3 connected to 0V (GND), so it won’t
oscillate or otherwise misbehave.
The circuit is set for dot or bar
modes by installing the soldering the
appropriate set of PCB copper pads at
the output of each op amp comparator, ie, either all the “DOT” pad pairs
are joined or all the “BAR” pad pairs
are joined.
The operation is then as described
above, only with ten LEDs rather than
three.
Handling audio signals
If you connected an audio signal up
to CON1, half of it would be clipped
by D3 and the other half would cause
the bargraph to swing up and down
rapidly; not really an ideal situation.
A better solution is to amplify, rectify and filter the audio signal to produce a DC level corresponding its peak
or average amplitude.
There are many different ways of doing this, two of which are known as VU
Meter or Peak Program Meter (PPM)
displays. Further signal processing is
required to achieve these responses.
All these possibilities are covered
by the Signal Processing circuit shown
in Fig.4.
It consists of a non-inverting amplification stage (IC5a), a precision fullwave signal rectifier (IC6a & IC6b) and
a VU response filter stage (IC5b). IC5
& IC6 are LMC6482AIN dual rail-torail op amps.
The audio input signal from CON1 is
fed via a 100nF capacitor and applied
to potentiometer VR3. Instead of being
directly grounded, the “cold” side of
VR3 is connected to a voltage divider
comprising two 10kΩ resistors, with
the junction bypassed with a 100µF
capacitor.
This method of connection allows
the incoming signal to swing symmetrically about the half supply point
(around 5.7V, ie, 11.4V÷2).
Op amp IC5a amplifies the attenuated signal by a factor of 16, giving a
gain range of 0-16. Gain is reduced by
frequencies above 32kHz due to the
330pF capacitor across the 15kΩ negative feedback resistor.
Its low-frequency response rolls off
below 16Hz, as set by the 1kΩ resistor
and 10µF capacitor between the inverting input (pin 2) and ground (0V).
Precision rectification
without diodes
The output signal from IC5a is fed
via a 10µF capacitor to the precision
full wave rectifier comprising IC6a and
IC6b. Its job is to convert the negative
voltage portions of the signal into positive voltages so that we can determine
the average signal level (the average of
a symmetrical AC waveform is 0V).
This precision rectifier is unusual in
that it does not use any diodes and nor
does it need a negative supply rail. It
works because the op amps are rail-torail types. This means that while their
inputs and outputs can swing from
within a few millivolts from +11.4V
(ie, the positive supply rail) to 0V (or
actually to -0.3V in the case of the input), if the input signal swings negative, the op amp’s output will swing
down to 0V but go no further.
So if we apply a sinewave centred
about 0V to the input of voltage follower IC6a, its output will precisely
follow the input signal for the positive excursion of the signal but the
negative excursions will result in a
0V (“clipped”) output. This means
that the output signal at pin 1 will be
a half-wave rectified sinewave.
So that gives us a positive-going signal but only for the positive half of the
AC signal. We need the whole thing.
This is provided by IC6b and the way
it works is very clever.
When the input signal at “A” is below 0V, the output of IC6a (at “C”) is
0V as described above and thus the
non-inverting input pin 5 of IC6b is at
0V; so it is grounded. It now becomes
an inverting amplifier with a gain of
-1, as determined by the two 20kΩ resistors at pin 6, one from the output
at pin 7 and one from the input signal, at “A”.
The third 10kΩ resistor is irrelevant
since with an inverting amplifier, both
inputs are at 0V and therefore that resistor will have 0V at both ends, so no
current will flow through it. It’s effectively out of circuit when the input
signal is negative.
So IC6b will invert the negative-going signal at point “A” to an identical
but inverted positive voltage signal at
pin 7 (“E”).
But when the input signal swings
Fig.4: as an audio signal is AC, this circuit provides both rectification
and signal filtering to give either VU and PPM characteristics. Its
outputs drive the circuit of Fig.3.
68
Silicon Chip
Celebrating 30 Years
siliconchip.com.au
positive, the output of IC6a at “C” will
be identical to the input signal but with
half the amplitude, because of the resistive divider at its input (pin 3).
Here’s where it gets a bit tricky. Op
amps use negative feedback to attempt
to keep both their input pins at the
same voltage. We have half the input
voltage at pin 5 of IC6b, so we would
expect to also see half the input voltage at pin 6.
The question then is what output
voltage from IC6b is required to provide this. We have the full input signal at “A”, which then flows through
a 20kΩ resistor to “D”.
If we assume that the output of IC6b
is identical to the input signal (ie, the
signal at “E” is equal to the signal at
“A”) then we can consider the two
20kΩ resistors to be in parallel, meaning the current is effectively flowing
through a single 10kΩ resistor.
This virtual resistor forms a voltage
divider with the 10kΩ resistor from
“D” to ground, reducing the signal
amplitude by half.
This matches the signal that’s already present at “C”, hence, this is
the condition which will keep both
op amp input voltages equal.
And that means that for positive
voltages at “A”, the output at “E” must
be an identical signal.
Since we’ve just demonstrated that
the output at “E” is identical to the
input at “A” for positive voltages and
an exact, inverted version for negative
voltages, that means that the signal at
“E” must be a rectified version of the
signal at “A”.
We have attempted to illustrate this
rectification process with the waveforms at the various circuit points. So
there is an sinewave shown at point A
and resulting half-wave rectified signal
with positive half cycles at points B, C
& D. Note the periods for which points
B & C and therefore pin 5 is held at 0V.
We have shaded the negative-going
portions of the signal at point “A”.
These portions are effectively ignored
by IC6a because it cannot respond to
them.
But note the complete rectified
waveform at point E. See that it includes the shaded portions of the signal which have been inverted and amplified by IC6b.
Filtering and processing
We now need to filter that rectified
signal to recover a DC voltage that’s
proportional to either the peak of the
incoming signal or the average, or
some combination of the two with differing time constants (ie, VU or PPM).
VU metering was originally provided by a mechanical meter with particular physical characteristics which determined its response to signals.
It is not ideal for indicating transient signals that can cause amplifier
clipping or excessive recording levels.
However, the display is good for a general guide to signal levels.
The electronic VU filter built around
op amp IC5b simulates the ballistics
of a mechanical VU meter which is
relatively slow responding to changes in level.
It is specified that upon a step
change in the input level, it must
reach 99% deflection in 300ms with a
1-1.5% maximum overshoot. This requires a second-order low pass filter
with a high-frequency roll-off at 2.1Hz
and with a Q of 0.62.
IC5b is configured as a Sallen-Key
filter with the above characteristics,
to produce the VU output at pin 3 of
CON3.
If you’re recording audio and you’re
What do “VU” and a “PPM” stand for – and what do they measure?
Just about everyone would have seen (or at least seen a picture
of!) a meter on an amplifier or tape recorder labelled “VU” with
a scale running from -20 to +3, so it’s a reasonable assumption
that it is displaying “VUs”, whatever they are! The VU – which,
incidentally, stands for Volume Unit – is arguably the most misunderstood “measurement” (along with the decibel!) in the whole
of electronics.
Peak Program Meters, or PPMs, probably run a close second.
We’ll get to those in a moment.
What is a Volume Unit?
Even though the VU meters found in a lot of consumer equipment are not particularly accurate (many are there more for show
than anything!), the Volume Unit is actually an accurately defined
quantity. It was first developed in the USA in 1939 by Bell Labs,
along with broadcasters CBS and NBC, to show the “perceived
loudness” of an audio signal. It became a US (and later international) standard in 1942.
The standard states that a reading of 0VU equals 1.228V RMS
at 1000Hz across a 600 ohm resistance.
Confused? Don’t be: just remember that
the VU meter is normally used to provide
a quick visual guide, not give a definitive
measurement.
Mechanical VU meters are slow to
react to changes in level – deliberately
so. This is partly due to the inertia of the
meter itself (or ballistics) but also due
to the circuitry around it; in effect the
siliconchip.com.au
VU meter integrates the signal, presenting an average level rather
than an instantaneous (or peak) level.
The whole point of a VU meter is to show a level which the circuit as a whole can handle without overloading (causing distortion). That’s normally a level of 0 (zero) VU (on many VU meters
this will also be shown as 100%).
Above that (usually marked by a red zone on mechanical VU meters) you run the risk of overload – especially, for example, when
you’re recording to an analog tape recorder. That’s why you adjust
the level so that the reading seldom, if ever, goes much over 0VU.
Incidentally, VU meters and signals with lots of sharp transients
(eg, drums) do not work well together – so much so that the VU
meter, especially the mechanical variety, has fallen out of favour
it recent years.
Which is precisely why we are presenting our highly flexible
LED version!
The Peak Program Meter
This is a variation on the VU meter which shows, as its name
suggests, the “peak” (or maximum) signal
level. Again, this is designed to stop you
over-driving a circuit or a recorder.
The PPM is often just a single LED which
flashes on maximum level. If you set a level
where the LED is mostly on, you will undoubtedly get a distorted signal.
Sometimes a VU meter will also incorporate a LED (as seen in the photo at left) to
give this indication.
Celebrating 30 Years
February 2018 69
Fig.5: here’s how to assemble the LED display PCB which is shown here with
a matching same-size photo. Make sure you connect the bar or dot pads (not
both!) on the underside of the PCB.
concerned about clipping (ie, the recording level exceeding the capability
of the recorder to cleanly reproduce it),
you are better off using a Peak Program
Meter (PPM) indicator.
A PPM meter is built using a filter
which ignores very short transients
but otherwise has a fast attack and
slow decay, so you can better see the
peak level.
Its response should be 1dB down
from the peak level for 10ms tone
bursts and 4dB down for 3ms tone
bursts.
These requirements are met by a
filter with an attack time constant of
1.7ms and a 650ms decay rate.
Here we use a schottky diode (D4)
to charge the 1.047µF capacitance (ie,
1µF and 47nF in parallel) via a 1.6kΩ
resistor, which sets the attack time constant. The decay rate is set by the combination of the above capacitance and
the parallel 620kΩ discharge resistor.
on a PCB coded 04101181 and measuring 58 x 122mm. It fits into an optional
UB3 plastic utility box measuring 130
x 68 x 44mm. Follow the overlay diagram of Fig.5 to see how each component is soldered to the PCB.
Before construction, decide whether you want a dot or bar display and
whether you need a linear, log or VU
scale. Use Table 1 to select the values
of resistors R1-R10, according to your
scale requirement.
Fit the resistors first. You can check
the colour code for each resistor value
by referring to the resistor colour code
table but we recommended that you
also check each resistor value with a
digital multimeter before soldering.
Resistors are not polarised but it is a
good idea to install them so that their
colour codes all run in the same direction. This makes it so much easier to
check their values later on.
Construction
If you want a dot display (ie, only
one LED lit at a time), each pair of pads
The 10-LED Bargraph is constructed
70
Silicon Chip
Dot or Bar mode selection
Celebrating 30 Years
labelled “DOT” will need to be bridged
with solder. There are nine such pairs.
The dot links are on the underside of
the PCB, between the end of the 2.2kΩ
resistor and the LED anode.
Conversely, if you want a bargraph
(where all LEDs will light on full
scale), then bridge the Bar links located near the PCB edge (there are nine
of these, too).
You may need to use short bits of
resistor lead offcuts to bridge the two
PCB pads if you find you can’t do it
with solder alone.
Having done that, install the capacitors. There are two types used in
the circuit.
One type is MKT polyester and can
be recognised by their rectangular
prism shape and plastic coating. The
second are electrolytic and are cylindrical in shape and have a polarity
stripe along one side for the negative
lead (the positive lead is also longer
than the negative lead).
The electrolytic capacitors must be
inserted with the correct polarity as
shown on the PCB overlay, with the
longer lead to the + side and the negative stripe on the opposite side.
Electrolytic capacitors will have
their value and voltage rating printed
on them while MKTs are marked with
a code indicating their capacitance,
shown in the capacitor codes table.
Now install diodes D1, D2 and D3;
D1 is a 1N4004 (1A) type while D2
and D3 are 1N4148s (signal diodes).
You can then solder a single PC stake
at the GND terminal position. This allows you to use an alligator clip lead to
connect the negative probe of a meter
to the circuit, while the positive lead
with a standard needle probe can be
used to contact test points TP1-TP10.
IC sockets for IC1-IC4 and REG1
should then be installed with the
notched end towards pin 1.
Scale:
R10
R9
R8
R7
R6
R5
R4
R3
R2
R1
Linear
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
1kΩ
Log
6.8kΩ
4.7kΩ
3.3kΩ
2.2kΩ
1.6kΩ
1.2kΩ
820Ω
560Ω
430Ω
1kΩ
VU
1.1kΩ
1kΩ
820Ω
750Ω
1.3kΩ
1kΩ
820Ω
910Ω
1.5kΩ
680Ω
Table 1 – Values for resistors R1-R10.
siliconchip.com.au
TO SELECT DOT MODE, SHORT OUT
THESE PADS WITH SOLDER
(ON ALL LEDS 1-9)
TO SELECT BAR MODE, SHORT OUT
THESE PADS WITH SOLDER
(ON ALL LEDS 1-9)
Here’s the area of the
main PCB where you
select the dot or bar
graph mode (right
under the LEDs).
Simply short out the
appropriate pads, as
indicated. If you can’t
get solder to bridge
across the gaps,
use short lengths of
resistor lead offcuts.
Before soldering, check that all the
pins have gone through the holes in
the PCB and that none are bent under
the socket.
Terminal blocks CON1 and CON2
must be fitted with the wire entry holes
to the nearest edge of the PCB.
Trimpots VR1 and VR2 can then
be installed. VR1 is a 5kΩ trimpot
that may be marked as 503 instead of
5k. Similarly, VR2 may be marked as
504 instead of 500k. Don’t get them
mixed up.
Now for the LEDs: if using surface
mount LEDs, these are soldered in
place on the top of the PCB with the anode of each toward the top of the PCB.
Use a multimeter set to diode test
to check which is the anode and the
cathode on each LED. The LED will
glow when the red positive lead is on
the anode (A) and the black negative
lead on the cathode (k).
If using leaded LEDs, then the longer lead is the anode. Install these at an
equal height above the PCB, which is
most easily done using a spacer between the legs to set the height during soldering.
Now straighten the IC leads and insert them into their IC sockets, making
sure that REG1 is not mixed up with
IC1/IC2 and that each is oriented correctly, ie, pin 1 notch/dot lined up with
the socket notches, as shown.
Signal processing board assembly
You only need to build this board
if you are feeding an audio signal into
the LED Bargraph. The PCB is coded
04101182 and measures 58 x 81mm. It
can be stacked below the 10-LED Bargraph on 15mm standoffs if required.
The overlay diagram is shown in Fig.6.
As before, solder the resistors first,
siliconchip.com.au
Parts list –10-LED Bar/Dot Graph
1 double-sided PCB, coded 04101181, 58 x 122mm
1 UB3 plastic utility box 130 x 68 x 44mm (optional)
2 14-pin DIL IC sockets
3 8-pin DIL IC sockets
1 2-way PCB-mount screw terminal (5/5.08mm spacing) (CON1)
1 3-way PCB-mount screw terminal (5/5.08mm spacing) (CON2)
1 PC stake
1 5kΩ mini horizontal trimpot (VR1)
1 500kΩ mini horizontal trimpot (VR2)
1 10kΩ 16mm linear potentiometer (for testing purposes)
Semiconductors
2 LM358 dual op amps (IC1,IC2)
2 LM324 quad op amps (IC3,IC4)
1 LP2951 adjustable regulator (REG1)
1 1N4004 1A diode (D1)
2 1N4148 small signal diodes (D2,D3)
10 3mm or SMD 1206 LEDs (LED1-LED10)
Capacitors
4 10µF 16V PC electrolytic
1 100nF 63V/100V MKT polyester
1 10nF 63V/100V MKT polyester
Resistors (all 0.25W, 1%)
1 270kΩ
2 100kΩ
For linear scale, add:
10 1kΩ (R1-R10)
For log scale, add:
1 6.8kΩ
1 4.7kΩ
1 1.2kΩ
1 820Ω
For VU scale, add:
1 1.1kΩ
2 1kΩ
1 910Ω
1 1.5kΩ
1 10kΩ
10 2.2kΩ
1 1kΩ
1 3.3kΩ
1 560Ω
1 2.2kΩ
1 430Ω
1 1.6kΩ
1 1kΩ
2 820Ω
1 680Ω
1 750Ω
1 1.3kΩ
Parts for Signal Processing board
1 double-sided PCB, coded 04101182, 58 x 81mm
2 14-pin DIL IC sockets
2 2-way PCB-mount screw terminals (5/5.08mm spacing) (CON3,CON4)
1 3-way PCB-mount screw terminal (5/5.08mm spacing) (CON3)
1 100kΩ mini horizontal trimpot (VR3)
Semiconductors
2 LMC6482AIN CMOS dual op amps (IC5,IC6)
1 BAT46 diode (D4)
Capacitors
1 100µF 16V PC electrolytic
3 10µF 16V PC electrolytic
3 1µF 63V/100V MKT polyester
1 470nF 63V/100V MKT polyester
1 100nF 63V/100V MKT polyester
1 47nF 63V/100V MKT polyester
1 33nF 63V/100V MKT polyester
1 330pF ceramic
Resistors (all 0.25W, 1%)
1 620kΩ
2 100kΩ
3 10kΩ
1 1.6kΩ
Celebrating 30 Years
2 62kΩ
2 1kΩ
2 20kΩ
1 15kΩ
February 2018 71
Fig.6: same-size PCB overlay and matching photo of the audio signal processor
board, which drives the main display PCB in either VU or PPM modes.
then the sole diode (D4), then the capacitors.
Note that along with the MKT and
electrolytic capacitors, this board also
uses a ceramic capacitor, which will
normally look like a disc and is not
polarised. Then fit the IC sockets for
IC5 & IC6, as before, making sure the
notched end goes towards the pin 1
dot as shown in Fig.6.
Follow with trimpot VR3, which
may be marked as 104 rather than
100k. Then install terminal blocks
CON3 and CON4, again with their wire
entry holes towards the closest edge
of the PCB. CON3 is made by dovetailing a 3-way and 2-way screw connector together before inserting them
into the board and soldering the pins.
Finally, insert the two ICs into their
sockets, making sure that they are both
oriented correctly.
for minimum gain from IC1a.
Switch on power and the LEDs
should all light when the test potentiometer is rotated near fully clockwise and they should all be off when
it is fully anticlockwise. LEDs should
sequentially light up as the potentiometer is rotated clockwise, one at a
time if dot mode was selected or in a
bar otherwise.
You can check that the reference
voltages are correct at test points TP1
to TP10. Table 2 shows the voltages
expected at these test points for a 10V
reference at TP10. The voltages should
be within about 10% of the shown value in the table.
As you wind VR2 fully anticlockwise, you will find that the top LED
will light with only about half full
clockwise rotation. That is because
the reference voltage for the LED Bargraph is below 5V and so the output
from the potentiometer only needs to
be this high for the top LED to light.
Similarly, if VR1 is rotated fully
clockwise to amplify the potentiometer signal by about a factor of four, the
amount of travel required from the
potentiometer for a full-scale display
will be small.
It will be around one-eighth of full
rotation in a clockwise direction from
an initial fully anticlockwise setting.
If you’re using the Signal Processing
board and the LED Bargraph board has
Testing and setting up
Before powering up, check your construction carefully and in particular,
check the orientation of the ICs and
electrolytic capacitors and diodes.
Is it a good idea to test the LED Bargraph PCB by itself first, even if you
are going to use the Signal Processing
board later.
Use a 10kΩ linear potentiometer
connected as shown in Fig.7 for testing. Connect the power supply between the +12V and GND inputs but do
not switch it on yet. Adjust VR2 so that
the voltage between TP10 and GND is
10V and rotate VR1 fully anticlockwise
72
Silicon Chip
Fig.7: connections between the audio signal
processor PCB (left) and the LED display PCB.
Celebrating 30 Years
siliconchip.com.au
checked out so far, you can now wire
the two together as shown in Fig.8. To
calibrate it, apply a 250mV RMS audio
signal to the signal input and set VR3
fully clockwise. Adjust VR2 for 10V
at TP10 and adjust VR1 so the display
just lights LED10.
You can then apply a line level audio
signal to the input to see the display
vary. Note that VR3 will need to be
adjusted to reduce the line level voltage to a suitable level for monitoring
on the bargraph.
Line level signals can vary over a
wide range, from around 315mV RMS
full scale up to 1.228V RMS, with
some devices such as CD, DVD and
Blu-ray players producing in excess
of 2V RMS.
To make an accurate VU meter, the
0VU level (LED7) should be set to light
with a 1.228V RMS signal applied to
the audio signal input.
This level can be measured using a
multimeter set to read AC Volts and
a signal generator set to a frequency
that the multimeter will measure accurately.
Typically, multimeters will accurately read 50Hz signals but some may
measure above 1kHz. Check your meter’s specifications before setting the
signal generator frequency.
In practice, the sensitivity of the
VU meter (or PPM) meter should be
adjusted to set the range for the audio
SC
signal that’s being monitored.
Linear
TP10
10V
TP9
9V
LED8,
8V
TP8
LED7,
7V
TP7
LED6,
6V
TP6
LED5,
5V
TP5
LED4,
4V
TP4
LED3,
3V
TP3
LED2,
2V
TP2
LED1,
1V
TP1
Log
0dB
(10V)
-3dB
(7.08V)
-6dB
(5.01V)
-9dB
(3.55V)
-12dB
(2.51V)
-15dB
(1.78V)
-18dB
(1.26V)
-21dB
(0.89V)
-24dB
(0.63V)
-27dB
(0.417V)
VU
+3dB
(10V)
+2dB
(8.91V)
+1dB
(7.94V)
0dB
(7.08V)
-1dB
(6.31V)
-3dB
(5.01V)
-5dB
(3.98V)
-7dB
(3.16V)
-10dB
(2.24V)
-20dB
(0.71V)
Resistor Colour Codes
Qty
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
Value
620kΩ
270kΩ
100kΩ
62kΩ
20kΩ
15kΩ
10kΩ
6.8kΩ
4.7kΩ
3.3kΩ
2.2kΩ
1.6kΩ
1.5kΩ
1.3kΩ
1.2kΩ
1.1kΩ
1kΩ
910Ω
820Ω
750Ω
680Ω
620kΩ
560Ω
430Ω
* Quantity depends on configuration – see parts list.
4-Band Code (1%)
blue red yellow brown
red purple yellow brown
brown black yellow brown
blue red orange brown
red black orange brown
brown green orange brown
brown black orange brown
blue grey red brown
yellow purple red brown
orange orange red brown
red red red brown
brown blue red brown
brown green red brown
brown orange red brown
brown red red brown
brown brown red brown
brown black red brown
white brown brown brown
grey red brown brown
purple green brown brown
blue grey brown brown
blue red brown brown
green blue brown brown
yellow orange brown brown
5-Band Code (1%)
blue red black orange brown
red purple black orange brown
brown black black orange brown
blue red black red brown
red black black red brown
brown green black red brown
brown black black red brown
blue grey black brown brown
yellow purple black brown brown
orange orange black brown brown
red red black brown brown
brown blue black brown brown
brown green black brown brown
brown orange black brown brown
brown redblack brown brown
brown brown black brown brown
brown black black brown brown
white brown black black brown
grey red black black brown
purple green black black brown
blue grey black black brown
blue red black black brown
green blue black black brown
yellow orange black black brown
Fig.8: test setup
connections, using a 10kΩ
linear pot, to ensure
that all LEDs light up at the
right points. Voltages for
the various test points are
shown at left.
Table 2 – Test point voltages/
signal thresholds.
siliconchip.com.au
Celebrating 30 Years
February 2018 73
|