8
\$\begingroup\$

I'm trying to use a BC108A (datasheet) transistor as a switch for a 12V power supply using the 5V digital out pins on an Arduino Uno board.

I have connected the collector the 12V supply, the base to the 5V pin on the arduino and the emitter to ground via a multimeter.

Here's a picture of the setup: BC108A transistor Where red is multimeter to ground, blue 5V and white 12V.

I thought that this would result in 12V flowing out from the emitter when the base was high and nothing flowing out from the emitter when the base was turned low.

However my multimeter reports 6.1V from the emitter.

I think I got the pins figured out so I don't understand these results.

Can anyone explain these results? I'm new to this field so it's possible I got something basic totally wrong...

\$\endgroup\$

1 Answer 1

13
\$\begingroup\$

You've got the wrong setup: connect the emitter to ground and add a few resistors.

The base-emitter junction is like a diode, and the base will be 0.7 V higher than the emitter. If you would just apply 5 V to it you're kind of creating a short circuit: there's no resistance between 5 V and 0.7 V. Adding a 2 kΩ resistor will limit the current as per Ohm's Law:

\$ I = \dfrac{V}{R} = \dfrac{5 V - 0.7 V}{2 k\Omega} = 2.15 mA \$

Then the collector current will be a multiple of that. If that's 100 times (you can find the value in the BC108's datasheet as \$H_{21E}\$, which is a name nobody uses, everybody talks about \$H_{FE}\$) then the collector current will be 215 mA, 100 times the base current.

But your transistor will be useless: it will always have 12 V at the collector, no matter what current. And it will get hot: 12 V across it and 215 mA through it is 2.58 W!! Too much for the poor thing. So add a resistor between collector and 12 V:

enter image description here

(Here we also have a LED, but we can do with just the 1 kΩ resistor.)

We had a 215 mA collector current, which would cause a voltage drop across the resistor of 215 mA \$\times\$ 1 kΩ = 215 V!, according to Ohm's Law. But that's impossible, we only have 12 V and a 12 V across the resistor will cause 12 mA current, no more than that. So the resistor limits the current, even when the transistor will try to draw more.

If we would increase R2 to 100 kΩ then the base current will be 50 times smaller, or 43 \$\mu\$A, and the collector current would be 100 times that, or 4.3 mA. Then the voltage drop across R1 will be 4.3 mA \$\times\$ 1 kΩ = 4.3 V. So the collector will be 4.3 V lower than the 12 V, or be at 7.7 V.

So by choosing the right base current you can create a certain voltage at the collector, and when the base current is too high the collector voltage will go all the way to zero.

Note
You can make a circuit like you did, with a resistance between emitter and ground, but then the resistance should be much smaller than the multimeter's, which is often 10 MΩ; a value of 100 Ω will often do. Even then it's not a good circuit here, since the emitter voltage should never go higher than 4.3 V (the 5 V in - 0.7 V base-emitter). You'll never have 12 V there, and I can't even explain that you have a higher voltage than 4.3 V.

edit

"I was thinking of multiplexing four of my displays by putting a transistor before each common anode and then connect all 32 segment cathodes to 8 transistors."

This will work fine. What I described is the driver for one segment. Connect all cathodes for the same segments of the different displays together, and use 8 outputs to drive the 8 transistors.

Then you need something to step from one display to the next.

enter image description here

That will be the part of the circuit around Q1 and Q2 (Q3 is the segment driver). Q1 is a PNP transistor, which will source current to the segments of 1 display, so you'll need 4 of those, plus surrounding parts (Q2, R1, R2 and R3). Q1 will source current to its collector if there's a current from the emitter (12 V) to the base. We get that current by activating Q2, an NPN transistor like we saw earlier. So if you make "Display 1" high there will flow a current from 12 V through Q1's emitter-base and R2 to Q2's collector. You can use a BC807 for Q1.
Note: I would ditch the BC108. It's an old beast, and Digikey, which sells everything, doesn't even list it. Alternative: BC337; high \$H_{FE}\$ selections available, and 500 mA maximum current.

\$\endgroup\$
9
  • \$\begingroup\$ Thanks, I will study your response and try with appropiate resistors. One small question though, i will have a load of 10-100 mA after the transistor (the seven segment display in my other question), what do I need to think bout considering this? \$\endgroup\$
    – monoceres
    Commented Jun 24, 2012 at 17:45
  • \$\begingroup\$ @monoceres - Yes, that's right, that was you with the display. The LED in the schematic represents 1 segment, though in your case there will be 4 in a row. They caused about 9 V drop, right? Then you'll have 3 V remaining for R1, then 10 mA means 300 \$\Omega\$ 100 mA is 30 \$\Omega\$, but note that the display can't have that much continuously, so choose 300 \$\Omega\$. Even a mA base current is more than enough to get the 10 mA, so choose e.g. 4.7 k\$\Omega\$ for R2. Then it will be R1 which limits the current, not the transistor. \$\endgroup\$
    – stevenvh
    Commented Jun 24, 2012 at 18:05
  • \$\begingroup\$ @stevenvh measuring between Vcc and emitter may cause the measurement in your note. Either that or swapping collector end emitter. \$\endgroup\$
    – jippie
    Commented Jun 24, 2012 at 18:06
  • 1
    \$\begingroup\$ @jippie - No, I'm rather thinking of \$I_{CEO}\$ leakage current. 6.1 V over 10 M\$\Omega\$ is 610 nA, which seems like a realistic value. \$\endgroup\$
    – stevenvh
    Commented Jun 24, 2012 at 18:15
  • \$\begingroup\$ Sharp. Point taken, but cannot verify it in the datasheet. \$\endgroup\$
    – jippie
    Commented Jun 24, 2012 at 18:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.