1
\$\begingroup\$

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

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Put the fan (with a fly-back diode) in the collector connection, connect the emitter directly to ground. I am not providing an answer as I am sure this has come up before in previous question(s) but I can't find them so quickly. \$\endgroup\$
    – Oldfart
    Commented Dec 31, 2019 at 11:51
  • \$\begingroup\$ Thank you, its so obvious now you've said it that i'm a little embarrassed I didn't think of it. \$\endgroup\$
    – Rich
    Commented Dec 31, 2019 at 11:58

2 Answers 2

4
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

Your circuit is not good. You are driving the fan common collector which means the fan can only get Vb - 0.7V = 2.3V if the base drive is 3V. What you are observing is expected behaviour.

You want common emitter. This will allow the fan to get the full 5V available if the transistor saturates on. You might also want a resistor from base to ground to keep the transistor off if the logic output is undefined for an instant at switch on or whatever.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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