Contact

Links

Legal

Home

Audio

Hi-Fi

Electronics

PIC

DIY

Articles

Control

A4 Power
Amplifier

Overview

Analogue

Control

Power Supply

Construction

Conclusion

Schematics

Contact Me...

Guestbook

About...

There is a surprising amount of control electronics in this
amplifier. Firstly, the unit has a tactile front panel switch which also
contains the blue power LED. There's also an D-type connector mounted on the
rear panel that accepts the 12V trigger signals from the preamp.

The power is carefully managed to avoid switch-on surges that can cause
fuses to blow. The LM4780 mute inputs have to be controlled to prevent pops
and bangs from the speakers. The temperature of both heatsinks is monitored
and the amplifier is muted if the temperature rises excessively - should the
temperature fail to fall to a normal level within a suitable time, the amplifier
is shut down. Finally, should a DC fault be detected in any of the channels,
the amplifier is switched off.

Most audio power amplifiers use output relays which, in conjunction with
a suitable delay circuit, prevent switch-on pops and bangs. Additionally, in
the event of a DC fault these relays can be used to isolate the speakers
from the faulty amplifier. However, properly implemented National Semiconductor
"Overture" IC's are free from switch on/off noises so these relays are
unnecessary. So in the event of a DC fault, the power is switched off and
the energy contained in the smoothing capacitors could end up being dumped
into the connected loudspeakers. But this is better than no protection at
all, and as the smoothing capacitors are relatively small, the potential for
damage is much reduced.

While initially planning to implement these functions using discrete
circuits, I decided that employing a software-based solution would be much
more dependable. The various time delays could be readily altered if
necessary, and would not be reliant on electrolytic capacitors that are
prone to aging. New functionality could be added, and the component count
would be reduced.

The mains transformer is switched off during standby, so some means of
powering the control circuitry is required. There wasn't space in the enclosure
for a small standby transformer, so I employed a capacitive dropper - a
well-known technique that's used in lots of mains-powered applications.
However, adopting this strategy requires a knowledge of safe working with
live mains, and I do not recommend you try this unless you understand this
risks. The earth of the PIC circuitry is at half-mains, and connecting
earthed test equipment could cause serious risks!

Important Safety Warning/Disclaimer

This control circuit is powered directly from the mains electricity,
and in the interests of safety, you should not attempt to copy this unless
you are fully aware of the risks involved, and the necessary precautions
required during PCB layout, component selection and construction.

The author disclaims all responsibility for any loss or damage, and
reading further implies agreement with this disclaimer. You have been
warned!

If you want to copy this control system, then please consider using a
small mains transformer to power it instead of the capacitive dropper scheme
detailed here.

Power control

The control circuitry is split between two circuit boards - the first one
manages the supply of power to the mains transformer and also generates a
regulated 5V rail to power the PIC. Additionally, this board generates the
active-low /MAINS-FAIL signal.

The torroidal transformer requires an inrush-limiting function to prevent
fuses blowing and lights dimming at power-up. This is usually catered for by
connecting a power resistor in series with the transformer for the initial
power-on, then shorting out that resistor with a relay after a short delay.
This is most commonly done using a circuit like this:

As you can see, this makes for an incredibly simple control circuit, that
can readily be "retro-fitted" to an existing amplifier if required. The
transistor turns the relay on after a short delay, bypassing the soft-start
resistor. The power for the relay coil comes from a convenient part of the
power supply.

There are a few issues with this control scheme. If for some reason the
relay fails to turn on, the equipment remains powered via the soft-start
resistor - for something like an audio amplifier, this might go unnoticed if
it's used at low levels. Meanwhile the soft-start resistor will rapidly
overheat, causing damage to itself or the surrounding circuitry. This
failure mode is more common than you might think - the relay contacts can go
bad over time, or the control circuit, although simple, can go wrong. Also,
the simple (but often used) control circuit shown above doesn't reset as
quickly as is desirable, even with the extra diode to help discharge the
capacitor. So, very brief power outages can cause fuses to fail.

The soft-start bypass relay is powered all the time the unit is on, which
is wasteful. And the power switch and the soft-start bypass relay end up being
connected in series, meaning that the mains has to pass through two sets of
contacts - not good for reliability. So I decided quite early on to use a
"parallel" scheme:

Controlling this layout is slightly more complicated, and unlike the series
scheme above, it doesn't lend itself to being added to an existing amplifier.
At switch on, the power relay is energised, supplying energy via the
soft-start resistor, and after a short delay the bypass relay is switched.
As above, the power for the bypass relay comes from the secondary side of
the mains transformer.

However, the power relay can be switched off once the bypass relay has been
energised, saving some energy. Doing this adds an important failsafe - if
there is a fault in the power relay or soft-start resistor, or in the power
supply of the amplifier, the bypass relay doesn't energise. If there is a
fault in the bypass relay or control, the amplifier will simply be switched
off when the soft-start relay is de-powered.

As the power relay only passes current for a brief period of time, you can
consider alternative technology here - after all, relays are large, expensive
and mechanically noisy. Two conventional relays operating together in this
scheme could make quite a racket at power-up! Triac-based solid-state relays
can cause problems with audio equipment because of their behaviour around
the zero-crossing point, but as the relay will only be passing current for
half a second or less, this isn't an issue here.

I could have purchased an off-the-shelf SSR (solid state relay), but I
couldn't easily find a device that fitted into the 16mm of height that I had
under my "false floor" (see later). Plus, I wouldn't have learned anything
that way. Instead, I found a triac and a special opto-coupler that is designed
to drive the gate of the triac - it also incorporates a zero-crossing
detection circuit to ensure clean transitions. The LED in the opto-coupler
requires just a few milliamps of current - easily provided by a logic
circuit or a PIC...

I decided to take advantage of the solid-state relay when switching off
the amplifier. Of course, simply switching off the bypass relay is all that
is required at shut-down, but I decided to on a cunning scheme to save wear
and tear on the relay contacts. When the software receives the shut-down
command, either from the front panel switch or via the 12V trigger input,
the amplifier is immediately muted and the front panel LEDs are updated to
indicate Standby. Then the solid-state relay is powered up. After a short
delay, the bypass relay is depowered, but the amplifier remains powered via
the soft-start resistor and relay. Finally, after another short delay, the
solid state relay turns off. Because the opto-coupler incorporates
zero-crossing detection, the transition is clean and doesn't generate any
interference that could affect other pieces of equipment.

This circuit was built on Veroboard, taking great care to ensure that correct
creepage distances are maintained, and using tinned copper wire to
supplement the copper tracks to ensure that the potentially high currents
don't damage anything. On the same board, I incorporated the standby power
supply for the PIC control circuitry:

The mains is reduced using a capacitive dropper. The 470nF capacitor is
has an X2 rating, which means it is designed for continual use across the
mains, and is designed to fail safely open-circuit in the event of a
high-voltage surge. Never use standard components in these sorts of
circuits!

The 100 ohm resistor is to absorb any switch-on surge (when the dropper
capacitor is uncharged), and will fail open-circuit in the event of an overload.
The metal-glazed 1.5M resistor is specially rated for continuous
high-voltage operation, and its role in the circuit is to discharge the
dropper capacitor when the mains is removed.

A full-wave rectifier produces DC, limited by the 10V Zener diode. From
here, it is smoothed and regulated to 5V, ready for the PIC to use. The current
demand is small - the only load is the PIC itself, the two front panel LEDs
and the LEDs in the opto-couplers. For this application, a capacitive dropper
is ideal, but a small mains transformer would be much safer - unfortunately
I had no room in the case for one. If you are considering building a
similar design, I would urge you to use a conventional transformer unless
you know what you are doing!

There is also a mains failure detection circuit here. This is essential to
ensure the soft-start routines are properly reset, and to avoid
microprocessor lock-ups. It's a simple but very effective circuit that would
work just as well with a mains transformer instead of the capacitive
dropper.

By inserting the 1n4001 diode between the diode bridge and the smoothing
capacitor, we can derive the 100Hz post-rectifier waveform. This turns the
first transistor on and off again 100 times a second. Every time this transistor
turns on, the 470n capacitor is discharged. As the mains disappears, the
capacitor quickly charges via the 68K resistor, turning on the second
transistor and resetting the PIC. This happens within about 30ms, so it only
needs a couple of missing cycles to respond.

Finally, here is a picture of the finished board. You can see how the limited
height required careful planning. The mains connections are at the top, with
connections to the transformer, the mains input, the soft-start relay and
the bypass relay. The bottom wires go to the PIC control board, and carry 5
volts, the mains-fail signal and the control signal for the solid-state
relay.

PIC Control

As mentioned, I initially planned to use a discrete control system, combining
the temperature sensor and mute control of the Micro-Amp,
and the power control of the Gainclone
Monoblocks, with some minor modifications to provide a soft-start
function. But then I started playing around with some ideas with a PIC, and
one thing led to another...

While using a microcontroller for such a simple function seemed like
overkill, space is at a premium inside the amplifier and any means of
reducing component-count is welcome. And it enabled me to experiment with
some interrupt-driven techniques which will form the basis of an introduction
to interrupts that I'm writing for the PIC
section of this site.

Without thinking too hard about it, I started experimenting with the
ubiquitous PIC16F84, but this turned out to be an ideal choice here. I used
most of the ports, and over half of the programme memory, perhaps
surprisingly. The PIC runs at 10 MHz - this is higher than in my preamp, but
chosen because the PIC trainer boards that we use at work are fitted with a
10MHz crystal. However, I was surprised when working out the
interrupt-driven LED dimming routines that I could actually have made use of
a faster processor!

As noted above, the PIC is powered from the mains via a capacitive dropper,
which leaves the logic ground is at "half-mains" (approximately minus
150-160V w.r.t. neutral). Obviously the control circuits cannot be directly
connected to the amplifier, so to allow communication with the rest of the
unit, a total of 6 optocouplers are used (including the special optocoupler
that forms the solid-state relay in conjunction with the triac).

The basic PIC circuit is very simple:

The power switch and Standby LED are mounted on the front panel, and the
SOFT-START and /MAINS-FAIL signals travel to the power control board. Everything
else is mounted on the control board:

The "live" circuitry is on the left of the board, and as much copper as
possible was removed from underneath the opto-couplers, thus forming a
safety isolation barrier. The connectors are as follows:

Front panel switch and Standby LED (bottom left, 6-way)

From the power control board (top left, 4-way)

To power-on relay (top right, 2-way)

To amplifier (middle right, 6-way)

From 12V trigger input (bottom right, 2-way)

The circuitry on the right of the board is explained next:

Bypass relay control

As previously discussed, the bypass relay connects the mains transformer
directly to the mains, bypassing the soft-start triac and power resistor.
The PIC energises this relay a short while after energising the soft-start
relay. The power for the relay coil actually comes from the mains transformer,
meaning that if there is a fault in the soft-start circuit or power supply
of the amplifier, it can't switch on. This is a useful "failsafe" mode, but
might cause some headscratching when fault-finding at some point in the
future!

The relay is powered from the negative supply rail from the amplifier -
all of the control circuitry has been located between ground and -UNREG because
of the Mute requirements of the LM4780 ICs. Because the supply is
unregulated, the relay is fed from a 2-transistor current source - this
ensures the relay is able to pull in while the supply is low due to the
action of the soft-start resistor, but when the supplies are established, it
ensures that coil consumption doesn't rise - good for long-term
reliability.

With no light from the opto-coupler LED, the transistor is off and no base
current flows into the BC337. When the PIC lights the LED, the current source
can work. The two 33K resistors are arranged so that the collector-emitter
voltage of the opto-coupler transistor doesn't exceed the maximum allowed
value (around 25 volts for the 4n27)

Mute control

This looks simple, but was a bit more complicated to get right. To work,
a current must be drawn from the mute pins of the LM4780. This current is
initially withheld by the PIC so that the switch-on is noise-free (the OPA2134
buffer causes a slight noise at power-on). Temperature sensors on each
heatsink mute the amplifier in the event of overheating, and the PIC must be
aware this has happened. For the "single" mode, just one of the LM4780's
on the heatsink is muted, and this must not interfere with the above.

This diagram shows the circuitry, which is split across the two power
amplifier modules and the control board. The three sections are joined by
the "MUTE" connections (yellow wires).

The 10K resistors provide the necessary current to each LM4780 to bring
it out of the mute condition. The amplifier can be muted by shorting the mute
line to ground, and this is exactly what each of the thermal switches does
at the appropriate temperature. The transistor, when biased on by the 100K
resistor, also shorts the mute line to ground. When the PIC lights the
"PLAY" LED, the transistor is turned off, and the amplifier unmutes.

The PIC knows when the amplifier is muted because the LED in the "MUTED"
opto-coupler goes out. This enables the software to flash the power LED, and
eventually shut down the amplifier if it doesn't cool down sufficiently
quickly. Of course, when the amplifier is muted by the software (rather than
the thermal switches), the PIC can't tell for sure whether the amplifier is
overheated or not - this is accounted for in the software.

When operated in Single mode, the unused LM4780 is muted. Steering diodes
ensure that this does not mute the remaining amplifiers.

DC Detection

As mentioned previously, the implementation of the DC failure circuitry
isn't as good as it could be because the amplifier doesn't employ muting relays.
But it's better than no protection, and was relatively easy to add.

The chosen scheme was designed to be very easy to implement, requiring a
minimal amount of extra wires to be run around the amplifier. Like the
"Mute" bus mentioned above, the "DC" connection runs across the amplifier -
identified with the use of blue cables. The summing point is on the PIC
control board. The 39K resistor pulls the summing point towards ground in
the absence of any connected amplifier modules - this enables the PIC
control board to be operated on its own without creating spurious DC fault
signals - useful during testing.

The summed outputs are low-pass filtered by the 100uF capacitor - the net
potential here should always be very close to 0V. Should this voltage rise
to greater than 0.6V, the first BC557 is biased on, and the current flowing
through the 150K causes the BC547 to conduct, lighting the LED in the
opto-coupler. Similarly, should the summing point fall to -0.6V, the second
BC557 conducts, again lighting the LED via the BC547. Note the high value
resistors here - to maintain trigger symmetry with this simple circuit, it's
important to minimise the current draw from the collectors.

There are some compromises with this system. Firstly, the DC trigger voltage
is slightly higher than is ideal - around 3V. This is because the 47K
resistor for the faulty channel effectively forms a potential divider with
the remaining three 47K resistors, and the 39K resistor on the PIC board.
However, when DC faults occur, they are normally much greater than 3V - and
to be honest 3V probably wouldn't harm most speakers.

Additionally, there is a chance that this system will fail to detect a DC
fault if two faults occur at the same instant, with opposite polarities. A
DC voltage of +35V on one channel coupled with -35V on another will sum to
zero. But, what are the chances of this?

Of course, the other difficulty with these schemes is choosing the best
value for the capacitor. There is always a conflict between reaction time,
and freedom from false triggering. The chosen value offers a reasonable
compromise here.

When the LED lights, the PIC immediately shuts down the amplifier and flashes
an error code on the Standby LED. A power-off reset is required before it
will work again. When shutting down, the PIC doesn't worry about following
the power-down sequence described above - it just turns off the main relay
ASAP!

12V Trigger Input

The final part of the control circuit is the easiest - the 12V trigger
input.

The rear-mounted toggle switch chooses between two of the power amplifier
triggers that the preamp generates - main or surround. The yellow LED is next
to the switch, and provides a useful visual confirmation of the presence of
the trigger signal. The trigger input will probably be already earthed, but
the 100K resistor ties it weakly to earth in case it's floating. The 1n4148
diode protects the LED in the optocoupler in the event of an AC or reverse
polarity trigger signal.

Switch Details

Since
posting this project, I've had a lot of emails asking about the power switch
used in this amplifier.

It's a vandal-proof stainless steel unit made by Bulgin (part number
MPI002/28/BL). The action is single-pole momentary, so at the risk of stating
the obvious, you will need some logic circuitry to use this as a power switch
- it can't be used on its own. (Yes, I have been asked this question. On more
than one occasion!)

You can choose the LED colour, the connection style (2.8mm "Faston" tags
as shown, or screw terminals), and illumination style (ring or centre-dot).
A word of warning: if you plan to solder to the tags, be aware that the
plastic is very soft and will deform during soldering. I was lucky and "got
away with it", but the switch doesn't feel quite as nice as it did when new.
Try not to use it in a situation where the space behind is limited!

I bought mine from Farnell but, as usual, Rapid are slightly cheaper. The
prices and part numbers were last checked Autumn 2009. Note also that the
range has been expanded, and it's possible to get white, as well as dual
colour LEDs in nice combinations - for example, blue and red is an option,
and is what I might choose if I was building a similar project today.

Bulgin switch suppliers

Supplier

Part number

Price each

Farnell

430-3076

£14.85+VAT

Rapid

78-1697

£13.26+VAT

Rapid

78-1745 (with screw terminals)

£11.99+VAT

More information can be found on the Bulgin
website.

Go to page:

1

2

3

4

5

6

7

Next
»

Home

About

Contact

Guestbook

Links

Legal

Site Map

© Copyright 2000-2016 Mark Hennessy. All Rights
Reserved. E&OE.
All opinions expressed are my own, and not those of my
employer.