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:
(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.
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.
One thing to note is that
if (pwmVal != 255) {
pwmVal += 10;
...
is not going to stop at 255, since pwmVal will be 250, then 260, e.t.c. One way to fix this would be write
if(pwmVal < 255)
{
pwmVal += 10;
}
else
{
pwmVal = 255;
}
By the way your code is written, if DEBUG is set to 0, nothing will happen (pwmVal will be set to 0). If DEBUG is set to 1, the fan speed will increase at a rate set by "wait" (which isn't defined in this code), until it gets to it's maximum. The value will also be printed to the serial port.
Best Answer
Yes, your conclusion is correct. Just insert a 1K resistor in series with the base. But first try with a 10 K resistor and then keep on reducing it by 1K. For a more accurate value of the resistor, use this formula:
$$ R_{base} \approx {h_{FE}} \times \frac {V_{OH} - 0.7V} {I_{FAN}} $$
Where