21st March 2016.
Today we had a look at amplification using an LM386 Operational amplifier.
So what is an op amp?
The interestingly named “Afrotechmods” gives a good video on it: https://www.youtube.com/watch?v=TQB1VlLBgJE and this other video gives a step-by-step breadboard build of how to specifically use the LM386 https://www.youtube.com/watch?v=ZOuZWE_tfgQ and in this third video, there is a ‘clapometer’ [clap activated] LED switcher https://www.youtube.com/watch?v=yPJ7AFVvZlI Note the clapometer is based on yet another Afrotechmods video called “Comparator tutorial & clapper circuit “… https://www.youtube.com/watch?v=y0Q0ERSP24A
Do please watch those good video’s they will help you. Watch them a few times. Don’t worry if you don’t get all the info immediately. It takes me a while for the info to sink in.
Today we tried to amplify a signal from a small microphone into an audible ‘noise’ from a standard speaker (8 ohm, 1 or 0.5 Watts). We had mixed levels of success. I used this LM386 data sheet to wire up a simple circuit (see the circuit schematic with a gain of 200).
The microphone has a typical magnet and ‘coil of wire’ kind of set-up, so sounds causing the microphones diaphragm to move – which is (I think) connected to a small magnet which also moves. This induces a small current in the coil of wire, so the microphone gives out a proportionate voltage, i.e. a signal. Now, the signal strength from a little microphone is pretty lousy. When putting the microphones small signal into the op-amp, we can’t really expect a HUGE signal out from the amplifier. Even with a gain of two hundred (i.e. how much the op-amp can amplified the signal), a very small signal will still be pretty small even if 200 times bigger. But we still should get something. After all, op-amps do amplify microphone sounds in many pieces of hardware.
A suggestion to try and make this better – dunno if it would work – is have the microphone riding on a DC voltage of about 1V. The 1V+/- the small signal may help with the amplification – just a suggestion – a 1V supply can be made from the classic ‘voltage divider’ Have 5V go through two resistors in series to ground… the first resistor being 4 ohms and the second being 1 ohm and the 1 ohm resistor being connected to ground. So the 1V DC “carrier power” for the mic will be obtained by connecting a wire from between the 4 and 1 ohm resistors and the other to ground. That will give us a 1V value.
Of course using multiples of this 4ohm:1ohm is sensible or we will get very large currents flowing through the resistors. we could use 800ohms and 200ohms. That will give less current through the resistors while still giving 1V from in-between the resistors to ground.
Note: If 5V was being used and 1 4ohm plus 1 ohm resistor was being used, the current flowing through the resistors would be be 1A !!! That’s quite a lot. The resistors would get very hot.
Using a 5V supply and a 800 ohm plus 200 ohm resistor, the current flowing through them would be 0.005A, or 5 milliamps which wouldn’t get the resistors very hot, but we should be cautious, too high a resistance may cause too little current to flow and devices might not work as they unusually need some threshold current (induced by a voltage difference) to work .
If you need capacitors or resistors of a certain value, just ask and I’ll see what I can do.
EVENTUALLY… (I am frightfully busy now) I will try and give a low-down on how op amps work, or more accurately, how to use them. Partly for your benefit, but also for mine so I can understand them better. As a student everything electronics never made any sense to me and op amps were the absolute worst. So by trying to talk about them it will also help me.
The schematic symbol for an op amp is a triangle. There are a minimum of 5 ‘lines’ from the op-amp. Below are three parts of the op amp, circled in green. The diagram is ripped from Afrotechmods.
Part 1: Schematic showing the output of an op-amp (this is pin 5 on the LM386)
Part 2: Schematic showing the inputs (you don’t have to use both. You can use one.) The one with a -‘ve symbol is called the inverting input, this is pin 2 on the LM386). If the inverting output is used, then signal inverts (think of a sin wave flipping upside down). Pin 3 is the non-inverting input. If this is ‘used’ then the output will just be amplified and not flipped over.
Part 3: This essentially is a ‘voltage available’ to give he maximum and minimum levels of the output. You can make, say, +12V available on the top voltage supply, (this is pin 1 or pin 8 on the LM386) and -12V on the bottom supply (this is pin 4 or pin 7 on the LM386). A ‘voltage available’ between +12V and -12V allows a maxium range of 24V for the output signal (from top to bottom).
–more to follow when I have time —
Please note, in the videos at the top, when you see ipods/mobile phones providing the signal to be amplified, those devices pump out quite a ‘large’ signal for amplification to begin with, hence when the LM386 ‘spits’ out the output, it will automatically be loud. We are using a mickey-mouse simple microphone, so we can’t expect HUGE output.
P.S. If you use a more powerful op-amp (i.e. one with a greater ‘gain’), you’ll probably start to get very noisy signals. OT if you pump the output from one op amp into another op amp, that will likely give loads of distortion.
IN THESE VIDEOS, DO PLEASE NOTE THE DIFFERENCES in the datasheet circuit and the one shown in the video.
As usual, once you have amplification, then change the values of the components and adjust the potentiometers (variable resistor) just to see the effects.
All this leads to analogue audio to digital recordings and data transmission / communication.
And here is the great GreatScott doing bluetooth audio transmission… 🙂 even though he dumps using the LM386 for a more beefy op-amp. Well…. I’m on a budget! :p