I'm completely new in hobby electronics, and I assembled the following circuit to control a power LED over wifi using esp8266. The problem is, that it is always, on no matter, what I send via GPIO1 port. I know that this is not an esp8266 problem, I tested my program with a simple low power LED, without the NPN transistor. I'm sure, I do something wrong with connecting that transistor.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Have you measured voltages yet? \$\endgroup\$ – Ignacio Vazquez-Abrams Jan 15 '16 at 22:03
  • \$\begingroup\$ no, not yet. but the problem is that the LED is on, even if I disconnect the esp chip, and let the base floating. \$\endgroup\$ – dnnagy Jan 15 '16 at 22:10

This probably comes down to one of two problems:

  1. You flipped some pins on the transistor. If I remember right, on a TIP41 the left pin is the base, the center the collector, and the right the emitter. This is when viewing with the black part of the package towards you and the pins down. Of course don't take my word for this. Check the datasheet.

  2. The GPIO1 pin isn't actually changing state. This is really easy to check. Put a voltmeter between GPIo1 and ground. It should be whatever the power supply voltage (usually 3.3 or 5 V) is when the LED is supposed to be on, and 0 V when its supposed to be off.

    If the GPIO1 pin voltage is correct, then you almost certainly have the transistor wired up backwards, or it got blown out. However, a TIP41 is not so easy to blow out, so probably wired wrong.

    If the GPIO1 pin voltage is stuck at the power supply, then you have a software problem.

A good way to check your circuit is to disconnect R2 from GPIO1. Then manually connect the left end of R2 to power and ground. The LED should be lit when it's connected to power, and not lit when connected to ground. If that's not the case, then the problem is with the transistor or how it's wired up.

| improve this answer | |
  • \$\begingroup\$ Oh, Im sure, i wired it wrong. I thought that the base is the middle pin, however, it's not. I'm so noob. Here's the datasheet: fairchildsemi.com/datasheets/TI/TIP41C.pdf \$\endgroup\$ – dnnagy Jan 15 '16 at 22:14
  • 1
    \$\begingroup\$ @DNagy - Everybody starts out noob. "Good judgement comes from experience. Experience comes from bad judgement." \$\endgroup\$ – WhatRoughBeast Jan 15 '16 at 23:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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