I have a small transistor a 2n2222. It has a 100 ohm resistor to Arduino. I plugged in a small fan (only 80 Ma at 5 volts) to the transistor. When connected to the resistor it does not go as fast as when I connect it to +5 line
It has a 100 ohm resistor to Arduino.
That is too small use 1K or so.
When connected to the resistor it does not go as fast as when I connect it to +5 line
Yes it won't because of the saturation voltage drop across a transistor.
Also I hope the load is in the collector and not the emitter.
the load should be in the collector? what happens if they are switched?
Then you get even more loss of voltage through the transistor.
(only 80 Ma at 5 volts)
sp. "mA"