Electrical – 3v output to switch on transistor for 5v fan

arduinonpnraspberry pitransistors

Im having trouble selecting resistors for my circuit. I have a 5v supply and my wemos board has a digital pin output of 3v.

I want to use the wemos output pin to switch a transistor (BC547) on to power my 5v fan. Without resistors im only getting 2.5 which is odd as i definitely have 5v at the transistor collector.

enter image description here

Best Answer

The problem is that you have configured your output transistor as an "emitter follower". In this mode the emitter voltage will follow the base voltage less about 0.6 to 0.7 V drop due to the base-emitter voltage drop. This matches what you are seeing.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. (a) Emitter follower. (b) Load in the collector.

With configuration (b) the GPIO will turn Q2 on to saturation. The collector voltage will drop to about 0.2 V giving 4.8 V to the motor. D1 protects the transistor from inductive spikes when the transistor is turned off.