Projects

Kids' Basics - Amplified Antics

An exploration of basic amplifiers for projects and experimenting

Daniel Koch

Issue 67, February 2023

Nearly every maker needs an amplifier at some point on their workbench. If you ever work with an audio circuit, it helps to have a small amplifier to probe the circuit with and make sure you're getting sound where you need it. The two circuits we have lined up for you have different properties, and each has its good and bad points. We'll build one this month, then the other next month. We'll discuss the inner workings in the 'How It Works' section, and tell you the good and bad points of each so you can choose when to use them.

In addition, these amplifiers can be built into bigger projects. For example, you could use one as the output stage in a noisemaker circuit built from components that make the right sound, but not with enough power to drive a speaker. We have built amplifiers into Kids' Basics projects before, but they have always been a means to an end and we have not discussed them in any real detail. Some have been very simple, while others have been based on dedicated Integrated Circuits (ICs). This time, we're making them on their own and they are the sole focus.

In Kids' Basics projects, we never solder. This is to make the projects as safe and accessible as possible, because soldering is a skill that needs to be learned and has some hazards. However, these amplifiers would work best when soldered. If you do have soldering skills, or you know someone who does, there are solder versions of the breadboards we use here, that you can copy the designs straight over to.

Some are identical but most have a very slight layout change. The ones we use here in the DIYODE workshop, for example, are two rows shorter, and have smaller spacing between the power rails and the rows. So, the links used from the power rails to the rows are different colours. Besides that, you should be able to copy designs straight from one type of breadboard to the other.

SOME HELPFUL HINTS

We encourage you to read all the way to the end of the article before you build. Not only will you then have a better feel for the overall picture as you build, but we sometimes discuss options or alternatives that you will need to have decided on. You will need some basic hand tools for most builds. Small long-nosed pliers and flush-cut side cutters meant for electronics are the main ones. Materials like tape or glue are mentioned in the steps, too. We always produce a tools materials list if you have to go shopping, but anything that is lying around in most homes is just stated in the steps.

As always with Kids' Basics, we avoid soldering to make the build more accessible to more people, but having an adult around can still be helpful. You won't need any particular skills besides being able to identify components at a basic level, and even then, we help as you go along. If, for example, you don't already know what a resistor is, you'll probably be able to work it out from the photos and description in each step.

We do provide a schematic or circuit diagram but this is just helpful if you already know how to read one. Don’t stress if you have never learned, but take the chance to compare the digital drawing of the breadboard layout (which we call a 'Fritzing' after the company that makes the software) to the schematic and see if you can work some things out. You can make this project from the Fritzing and photos alone. You might also like to check out our Breadboarding Basics from Issue 15.

The Build:

Parts Required:IDJaycar
1 x Solderless Breadboard-PB8820
1 x Packet Breadboard Wire Links-PB8850
4 x Plug-to-Plug Jumper Wires *-WC6024
1 x 47Ω 1W Resistor *-RR2542
2 x 47kΩ Resistors *-RR0612
1 x 100nF Capacitor *C2RM7125
1 x 220µF Capacitor *C1RE6158
1 x BC337 NPN Transistor *-ZT2115
1 x Small Speaker-AS3000
1 x 4AA Battery Pack-PH9200
4 x AA Batteries-SB2425

* Quantity used, item may only be available in packs.

Step 1:

Place the breadboard in front of you, with the outer red (+) rail facing away from you and the outer blue (-) rail closest to you. Install two wire links, one joining the two red (+) rails and one joining the two blue (-) rails.

STEP 2:

Insert a wire link from the upper red (+) rail to a row, and a BC337 NPN transistor with its flat side facing you and its left-hand (collector) leg to the wire link.

Step 3:

Add a wire link from the middle (base) leg of the transistor off to the right. Install two 47kΩ resistors (YELLOW VIOLET BLACK RED SPACE BROWN), one from the upper red (+) rail to the transistor base and wire link, and the other from the upper blue (-) rail to the other end of the wire link.

Step 4:

Place a wire link from the right-hand (emitter) leg of the transistor across the gap in the board, and a 100nF capacitor (104 or 100n) from the 47kΩ resistor/wire link row off to the right.

Step 5:

Insert a 47Ω (YELLOW VIOLET BLACK GOLD SPACE BROWN) 1W resistor from the lower blue (-) rail to the wire link that crosses the gap in the board. Add a 220µF electrolytic capacitor with its negative (striped) leg in an empty row and its positive (unmarked) leg in the same row as the 47Ω resistor.

Step 6:

Cut the ends off two plug-to-something jumper wires and bare the wire. Twist it through the holes in the speaker terminals, firmly, and tape the joins. If you're a Kids' Basics regular, you probably have this set-up already.

Step 7:

Plug one wire of the speaker into the lower blue (-) rail, and the other carefully into the negative leg of the 220µF capacitor. Be careful, because the legs on these capacitors are usually hidden by the body and getting the wrong row will leave you with no sound and lots of frustration later!

Step 8:

Add two plug-to-plug jumper wires, one light-coloured one to the end of the 100nF capacitor and a dark-coloured one to the upper blue (-) rail. These are your test probes. Also add a 4xAA battery pack with the black wire to the lower blue (-) rail and the red wire to the upper red (+) rail. Don't add batteries until you're ready to test.

TESTING IT

You'll need an audio source to test this amplifier. The best thing would be any of the recent noisemaker circuits if you still have them. If not, an audio output on a TV that ends in an RCA plug, or anything similar, will do. Don't try putting the probes down a headphones socket, you'll risk a short-circuit.

On RCA plugs, which are on many older pieces of hifi and audio equipment and sometimes the output for TVs (though many now only have digital outputs or inbuilt speakers) will give a strong enough audio signal. The inner section is the signal, while the outer side of the metal shell is the ground.

When you have a source, add your AA batteries and place the probes on the source. You should hear some sound! If you don't, start by checking if the source is actually playing something, then check that the probes are touching well. Failing that, check the connections on the breadboard one by one to make sure everything is in its place and all the spring contacts are touching properly.

HOW IT WORKS

We’ll now go into details about how the circuit works.

AC VS DC AND AMPLIFIER CLASS

Most audio signals are AC, or alternating current. Alternating current starts at 0V, rises to a peak, then falls again to zero, before crossing zero and going into negative numbers for its other peak. When it is negative, this means the current is flowing the other way, hence 'alternating'.

We say 'most' audio signals because some are DC, or direct current. This creates some confusion for some people, even trained and experienced people. Most audio signals are a sine wave. Without getting into the maths, a sine wave is a mathematical curve with a certain set of properties. Most waves in nature, like ocean waves or ripples in a pond, are sine waves.

AC Sinewave
DC Sinewave

However, it is possible to have a DC, or direct current, sine wave (or any other wave). The shape of the wave is not what makes it AC. If the voltage of the current never crosses zero, and the current never reverses direction, then the wave is DC. While rare in audio circuits, you do find this happening in some simple noisemakers and signal generators. If they are DC circuits with only a positive (+) voltage rail and a ground or 0V rail, and the wave varies between these two but never crosses zero, it's a DC wave.

There is a solution, however, to using AC waves in DC circuits: You make a false '0V' between the ground and positive rails, using a voltage divider. The AC signal treats that as ground, the positive rail as the positive rail, and the true ground as the negative rail. A voltage divider is just two or resistors connected between a voltage and ground (or a higher and lower voltage in some cases). The voltage divides over the resistors based on their resistance.

This explanation of AC vs DC is not fully correct, and heavily simplified. However, the real explanation is too full-on for Kids' Basics and this version will still get you where you need to be.

DC Coupling with DC
DC Wave with Coupling
AC Coupling

Amplifiers are divided into classes depending on how they operate. The first amplifier we built is a single-transistor amplifier which falls under class A. In a class A amplifier, the output is from (generally) a single transistor that is always on. This means that current flows through the power side of the transistor even when there is nothing on the signal side. This is because the transistor is 'biased' on by the voltage divider at the base. This way, the transistor is sensitive to all of the input signal and never turns off. It also gives our 'false zero' point for an AC signal to work. This makes it a very clear signal, with no distortion. Remember, the transistor has a 0.7V (typical) so any signal below this level does not turn the transistor on at all. In other designs, which use two transistors with one handling the positive half of the signal and the other the negative half, there is a space where there is no signal at all coming out because the input is below the 0.7V (or -0.7V for a PNP transistor) required to turn on the transistor. This is distortion, and makes the sound 'rougher'.

The penalty for having the transistor always on in a class A amplifier is that current is always being drawn and heat is always being generated. For a bunch of other technical reasons that don't change the outcome if you don't know them, the overall efficiency of a class A amplifier is generally less than 10%.

That means less than one part out of ten equal parts of the electricity used by a class A amplifier is turned into output power. The rest is lost, mainly as heat. That means lots of heat sinking and a limit on the amount of output power for a given transistor.

The other option is a Class B amplifier, which uses two transistors. One is a NPN and handles the positive half of the cycle, while the other is PNP and handles the negative half of the cycle. You can still make a DC version of this, and use a voltage divider to set the two bases at a middle voltage. This has nearly the same effect as the AC equivalent.

However, it's still not perfect. What we actually need is a class AB amplifier, which has two transistors and a small voltage bias between them so that they are almost on when nothing is happening. This gets around the distortion because the 0.7V internal voltage drop across the transistors' bases is already taken up by bias voltage, therefore the input signal has immediate effect. This nearly eliminates crossover distortion.

THE CIRCUIT

The first circuit is called a 'common collector' amplifier and uses one transistor. We often don't think of common collector circuits as amplifiers, but rather as buffers, because they do not offer a voltage increase. However, they do increase the current, and therefore power still increases. This is still useful as we can drive a speaker this way. The voltage from our maker circuits is often enough to drive the speaker, it's just the lack of current holding us back. This circuit is also called an 'emitter follower' because the voltage at the emitter follows the voltage at the base. You'll find the terms 'common emitter' and 'common collector' used for amplifiers. The 'common' refers to the transistor terminal which is not used for either input or output.

The circuit itself and its component values are quite common, as are some variations, mainly different resistor values. They all work in a similar way. At the input, the signal is fed through a 100nF capacitor C1. Inside a capacitor are two plates opposite each other with an insulator (called a dielectric) in between. That's why the symbol in the circuit is two plates with a gap in between. When a voltage is applied to one plate, it charges, and the charge repels the charge in the other plate, emptying it. Like charges repel, opposite charges react. When one plate is fully charged, the currents stop flowing. By doing so, a capacitor will pass an AC current, but block a DC current. So, C1 passes any AC signals, because the plates charge and discharge as the current rises and falls and changes direction.

Additionally, a DC wave will pass through, too, as long as it is constantly rising and falling. The capacitor functions on potential difference, or voltage difference. If a DC wave

rises from 3V to 6V, the capacitor will charge from 3V to 6V and the other plate will reflect that change. When the voltage falls on the input, the plates catch up. If there are any flat spots, the capacitor blocks them. That's why we say the capacitor blocks DC: For current to pass, it must be changing, even if it does not cross zero volts.

With the incoming wave passing through the capacitor, we arrive at the base of the transistor. Here, two resistors connect. The other end of one goes to the 6V supply rail, while the other end of the other goes to the ground rail, or 0V. This forms a voltage divider, holding the base at half the supply voltage.

We covered voltage dividers in depth in a Classroom article targeted at younger readers and people unfamiliar with electronics, if you want to look that up. It involves chocolate, too! With the base at half the supply voltage, we have the false ground we mentioned earlier.

The base of an NPN transistor needs current supplied to it, which flows out through the emitter to allow a larger current to pass through the collector-emitter path. This current comes from the supply rail via R1, a 47kΩ resistor. Some flows through the base, while some flows through the second 47kΩ resistor R2. So, the voltage will not be quite equally divided here but it will be very close. This means the transistor is turned on around half-way when the circuit is powered up but idle. As soon as an input wave activates the capacitor, the plate connected to the resistors and base charges and discharges opposite the plate connected to the input source. This is called "AC coupling'.

When the plate is charging, it sinks, or absorbs, current. It does so faster than the 47kΩ resistor can supply it, so the voltage at the junction of R1 and R1, and Q1's base, falls accordingly. This means the input wave is reflected in the collector-emitter path of the transistor, but with much more current. There is another point to this arrangement, and that is input impedance. Impedance is the term used for resistance in AC circuits, and it is used because resisting the flow of electricity in AC current is about more than just the physical resistance of components.

However, in our case, the resistance is the vast majority of the impedance. We'll use the correct term but remember that impedance may include things like inductive reactance and capacitive reactance. We have capacitive reactance here but it is small and we'll ignore it because it's Kids' Basics and this explanation is already long enough.

The impedance is complex but amounts to a bit under half of the value of the two equal input resistors R1 and R2. That's a good enough explanation for our purposes! So, if impedance and resistance both resist current flow, that means that not much current can flow into the input. That means that not much load is placed on the signal source, and that is very handy! An ideal amplifier has infinite input resistance so that it does not load the source at all, but this is impossible in the real world. However, a value of around 22kΩ on 6V as our impedance means that only 0.27mA flows! That's good because many circuits that generate a signal cannot provide much current: The more current the load takes, the lower the output voltage or the less effective the circuit.

So, we have a high input impedance and the voltage at the output follows the voltage at the input. Why is that useful? Current. With the base of the transistor activated, current flows through the collector to the emitter of the transistor. There is one more resistor here, R3, with a value of 47Ω and a rating of 1W.

We normally use quarter (1/4W or 0.25W) or half (1/2W or 0.5W) Watt resistors in Kids' Basics, because quarter watt carbon film and half watt metal film resistors from most brands are the same size. The rating is the amount of power the resistor can 'dissipate', or turn into heat. That's how they work. Power has the formula P = IV, where I is the current flowing through in Amps, and V is the voltage dropped across the resistor, in Volts.

In our circuit, the resistor drops nearly the whole voltage. There is a slight drop across the collector-emitter path, but not much. So, we're just going to say the resistor drops the whole voltage. First, we use Ohm's Law to find the current, which we find from our Ohm's Law Triangle using the supply voltage of 6V and the resistor value of 47Ω:

So, 6 ÷ 47 = 0.128A, or 128mA. With this, we have the numbers for the amount of power dissipated:

0.768W is well above the 0.5W of our metal film resistors and would destroy a 0.25W carbon film. So, we need to source a 1W unit. Luckily, they can still be bought over the retail counter and they're not huge. They cope with the heat but still don;t touch it in operation.

Resistor R3 gives the current somewhere to flow, but also limits the current so the transistor does not fail due to overload. 128mA is well within the 500mA minimum (some models up to 800mA) limit for the BC337 transistor we use.

But, there is another component: Capacitor C2. This is a 220µF electrolytic capacitor, much bigger than the input capacitor. That's because it needs to handle a lot more current, and can never be allowed to fill up. If it did, current would stop flowing until the wave changed back to a downward direction, and the sound would be very distorted indeed.

This capacitor AC couples the output in the same way C1 does for the input. The difference is the current it handles. There is a slight difference: The current through the transistor never changes direction like the input signal, it just rises and falls. IF we just had the capacitor connected to the emitter, it would charge when the transistor was conducting, but there would be no way for the current to discharge again when it was not conducting, or conducting less.

In order to charge and discharge on both sides, the positive side needs to be able to discharge its current. This is the other reason we have R3.

When the transistor is not conducting, or is not conducting much, the capacitor can discharge through R3 to ground faster than the small current flowing through the transistor when the input is at the bottom of the wave can charge it.

The other side of the capacitor connects to the speaker, and the other side of the speaker connects to ground. The voltage in this section comes via the charging and discharging of the capacitor plates, which is why there is no current path as such here from the positive rail. When the positive plate of the capacitor is discharging, the negative plate charges, and current flows from the ground rail because the capacitor is at a lower potential difference (voltage).

When the positive plate charges, the negative plate discharges. The current in this type of capacitor is quite high, so the amplifier still works even though it is not connected directly.

USING IT

So, you have an amplifier. What do you do with it? It's designed to use as a test instrument when making basic audio circuits. Maybe you have an Arduino making sounds from its PWM pins via the TONE function, and want to just quickly listen before it's built into the circuit with amplifier and speaker modules?

Maybe you're building an audio oscillator or sound maker and want to test the circuit as you work, before you build an output stage? Or maybe you have built the whole circuit but are not getting sound out of your more complex amplifier, and want to know if the input is actually giving a signal?

The best way to do this is with probes. You can use commercial probes like these ones, which need to be soldered but you can find screw-terminal ones. You can also make your own from nails mounted inside cheap

ballpoint pen housings. Twist a wire firmly around a nail. In both cases, the other end of the wire needs to be able to plug into the breadboard, so you'll need to twist on a jumper wire plug. We have done this many, many times now in Kids' Basics so if you're brand new, just browse the last few issues online for free, and you'll find instructions. Alternatively, you can just use the plug-to-plug wires we used when building it.

The dark coloured wire for the input needs to go to the ground of the circuit you are testing. This might be a ground rail with a positive rail somewhere else, or you might have a split rail or dual rail supply. This is like we described in the 'How It Works' section when 0V or GND is in the middle of a positive and negative voltage rail, with three rails in total. In this situation, the input GND connection goes to 0V.

The other probe, the SIG probe, is the one you test with, looking for sound. Because of this, you might like to attach a spring hook of some sort to your GND probe, if it will never move much during testing. It really depends on how you use your amplifier.

WHERE TO NEXT

The main changes to make are to the value of R1 and R2, and C1. R1 and R2 can be anywhere between about 4.7kΩ and 200kΩ. Try different values and see what happens to the volume of the sound for a given audio source. Try one of our past noisemaker projects like one of the sirens we made, or the steam whistle from Issue 45, because it was op-amp based and had a low current output. C1 can vary between 10µF and about 100pF. Again, try it and see what happens to the sound.

As we pointed out in the introduction, the circuit is best made more permanent. Breadboards are notoriously unreliable and have a lot of electronic noise in them, not to mention contact being lost when components are bumped and move in the sprint contacts. If you can solder or know anyone who can, converting to solder breadboard would be a great idea. If not, try surrounding everything but R3 with Blu Tack to hold everything steady.

NEXT MONTH:

We'll look at a more advanced amplifier with a stronger output and a completely different operating principle.