I have a small TV box which needs a fan because it overheats causing the cpu to throttle. I would like to have the fan turn on when the box is on, and turn off when the box is off. Unfortunately, the USB ports on the box always have power even when the box is off. The box also has no physical power switch. The only power indicator is an LED that is red when the box is off, and blue when it is on. I would like to use this LED signal to turn a small fan on and off.

The fan has a very low draw, and I will be reducing the voltage to the fan with a buck to 1.85V at which point it should draw 0.15A (It draws 0.40A @ 5V).

I have been reading about using a transistor as a switch, but most articles talk about using 5V at the base to turn the transistor on, and 0V to turn it off, while the LED on my box has much less than that. To make it more difficult, the LED never has 0V at any time on any leg. The voltages on each leg of the LED are as follows:

Leg: One Two Three

Blue: 0.60 3.26 1.90

Red: 1.97 3.26 1.39

The voltages were read using the ground of the power supply since that's what the emitter leg of a transistor would be connected to in order to switch power to the fan.

I have an S9014 NPN transistor and the specifications seem to indicate that it will turn on and off at the voltages indicated on the first leg of the LED, however I'm not certain about that. Also, many diagrams using a transistor as a switch include a resistor on the base and sometimes also on the collector of the transistor, but those diagrams are also often using 5V and not 1.97V.

Can I use the S9014 transistor with the base connected to the first leg of the LED, the emitter connected to ground, and the collector connected to a fan, with the fan connected to a 1.85V source, to switch the fan on and off? Will I have any problems with the transistor pulling too much current from the existing LED circuit? I will not be using the LED circuit to power the fan, just to signal the the transistor to turn on and off. Or am I looking in the wrong direction entirely?

Note: I need to keep all of the components being used to a minimum so they can fit inside the small TV box, so I can't use anything like an arduino, or a thermistor relay.

Note: Measuring voltage from leg 2 to legs 1 and 3 respectively, I get -2.65 and -0.15 on blue and -1.29 and -1.87 on red.

  • 1
    \$\begingroup\$ "I will be reducing the voltage to the fan with a buck to 1.85V at which point it should draw 0.15A (It draws 0.40A @ 5V)" - A fan doesn't respond to voltage like a resistor. At 1.85V it might not work at all. \$\endgroup\$ Commented Sep 3, 2019 at 1:43
  • \$\begingroup\$ It's a variable speed fan. 1.85V is the lowest voltage that it will operate on, I've tested it separately. \$\endgroup\$ Commented Sep 3, 2019 at 3:54
  • \$\begingroup\$ Your size constraint in no way precludes using a temperature sensor or an MCU; it only precludes using a large clunky board you might have seen containing one. \$\endgroup\$ Commented Sep 3, 2019 at 5:06
  • \$\begingroup\$ it would be informative if you could also measure from leg 2 to the other legs. \$\endgroup\$ Commented Sep 3, 2019 at 9:55
  • \$\begingroup\$ I noted that in a comment below, but it's a good idea to add it to my question. \$\endgroup\$ Commented Sep 4, 2019 at 10:00

2 Answers 2


I suspect the LED circuit looks something like this (resistor values are a guess):-


simulate this circuit – Schematic created using CircuitLab

You don't see 0V on either LED leg when on due to the current-limiting resistors, and you don't see 3.3V when off because LEDs drop some voltage even at the very low current your multimeter draws through them.

If you measure the voltage from leg 2 to each of the other legs you should see the voltage drop to zero when that LED isn't lit. If this is so then you could use a PNP transistor connected with its Emitter on Leg 2, and the Base connected to leg 1 via a high value resistor. This could then switch 3.3V to an NPN transistor which turns the fan on.


simulate this circuit

  • \$\begingroup\$ Measuring voltage from leg 2 I get -2.65 and -0.15 on blue and -1.29 and -1.87 on red. I like your idea of a Darlington transistor configuration, but will it work with negative voltage? \$\endgroup\$ Commented Sep 3, 2019 at 4:12
  • \$\begingroup\$ My calculations were based on blue LED voltage going from -2.6V 'on' to 0V 'off' (relative to +3.3V) so I think it will work fine. The 2N2222 should be able to switch ~500mA with the resistor values I chose. If your fan draws less than 200mA then R3 could be increased to 470 Ohms. BTW I tried to make a circuit using just an NPN transistor and couldn't get enough current out of it to run the fan (also resistor values were very critical). \$\endgroup\$ Commented Sep 3, 2019 at 4:54
  • \$\begingroup\$ I only have a S9015 and S9014 transistors right now can I use them instead? Also, I don't understand what all the resistors are for. I thought it was enough to connect the base of a transistor to the proper voltage to switch it on and off. \$\endgroup\$ Commented Sep 4, 2019 at 10:22
  • \$\begingroup\$ Yes you can use S9014/5. R2 and R3 are necessary to limit Base current. R1 and R4 reduce possible leakage currents and interference that could cause the transistors to turn on unintentionally. You might get away without them, but I would at least install R1. Use 1/8W axial or SMD resistors if space is limited. \$\endgroup\$ Commented Sep 4, 2019 at 22:11

I'm sure Bruce Abbott's answer is a good one, but just as an alternative approach - and a more general answer to how do I switch something based on an LED's current - you could use an optoisolator:


simulate this circuit – Schematic created using CircuitLab

I've disconnected the blue LED from the circuit and replaced it with the optoisolator LED. I've added R1 in series because the infrared LED in the optoisolator will have a lower voltage drop than the original blue LED, and we don't want to draw more current than the blue LED did. 150 Ω or so is probably about right. A 4N35 should be a suitable optoisolator.

Q2 can switch both the fan and the indicator LED. It needs to turn on with a couple of volts Vgs; something like an RFP12N10 or IRLD120 ought to work OK. 10 kΩ should be fine for R2. If you have more than +3.3 V available, that widens your choices for Q2 - just increase R3 appropriately to keep the LED current in range.


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.