Electronic – Make a real world example with a NPN Transistor

amplifiertransistors

I have read a lot about transistors and I still cannot make my last example work. On the internet I see that transistors are primarily used as switches and as amplifiers.

A) Use transistor as a switch

I want to open and close a circuit. For this example it is a 12 V lamp that I have:

enter image description here

The lamp is on all the time. In order to insert the transistor as a switch I do the following:

enter image description here

Now whenever my digital pin on Arduino is set to HIGH the light turns on.

B) Use transistor as a amplifier

Here is where I am getting stuck.

I want to amplify the signal coming from my aduio cable that is connected to my phone. I connect my audio cable to my phone like this:

enter image description here

I soldered the tip of the audio cable to one cable and the middle part to another cable. I soldered it like that because when I connect those two cables to a speaker I could hear sound. Anyways when I connect those 2 cables to an oscilloscope this is what I get:

enter image description here

As you can see the voltage varies from about -0.2 volts to 0.1 volts. This is what I have tried to amplify the wave:

enter image description here

The voltage varies between negative and positive therefore I do not know what cable to connect to emitter or collector. I have bough a simple 12V speaker. How can I amplify that wave to make the speaker that I bought play louder? In short I just want to amplify the waves that I read on the oscilloscope. WHen I lower the volume on the phone the waves get smaller in amplitude. How can I increase the size of those waves even more?

Best Answer

Transistors have a current gain that lets them control a larger current between the collector and emitter than the current fed in to the base,

However it takes about 0.6-0.8V to get current to flow in to the base of the transistor, If you want an on-off switch you "saturate" the transistor, essentially make the current your feeding into the base * the "beta" (current gain) of the transistor larger than what your hoping to switch, this way the transistor is switched on as hard as it can be

To amplify a signal, instead your using this gain to vary how much current is flowing through the load it is switching, in cases like this where the signal amplitude is small, the usual approach is to "bias" the transistor on, by holding the base at about 0.6V with a weak pullup,

The signal you would then couple to the base with a capacitor, so that current from that bias pullup does not flow back in to your phone.

add something like a 100K potentiometer between your transistor base and 12V, and adjust it until the speaker has say 1V across it (this is to get something, later additions can be to improve it into a proper amplifier), feed in your signal to the transistor base with say a 10uF capacitor n series (polarity would be positive to the base), you should now hear the signal amplified, decreasing the resistance of that bias potentiometer will make the signal louder, but will increase how much current is flowing through the speaker when not doing anything

Edit: In your arduino example, I would strongly recommend you use some level of resistance to limit how much current can flow into the base, it should be atleast 440 ohms (5V - 0.6V base voltage) / (10mA max per pin of arduino) = 440 ohms. In reality it would normally be a higher value, as unless you're switching a very large load can saturate the transistor at a much lower base current.