1
\$\begingroup\$

I make big mistake in my design. I connect output to ESP8266 GPIO2 at this pin I got base of NPN transistor to control LED.

schematic

I test it on breadboard but probably by noise or "universe magic floating voltage" there was no problem with boot. I make PCBs but of course now ESP wont boot because it need to be HIGH on GPIO2 to boot from flash. So I need add pullup to D4 (it is no problem) but how I can invert logic of NPN or replace it with something different without manufacture whole new PCB ? Thanks guys.

\$\endgroup\$
3
  • \$\begingroup\$ Your question is less than clear. What is the actual problem? Is the transistor interfering with the pullup? Why can't you just drive the pin low after boot? \$\endgroup\$ Commented Apr 9, 2019 at 15:20
  • \$\begingroup\$ Problem is: I need add pullup to D4, but if I add this pullup I will be unable to drive LED because on base of T1 will be still some current and LED will be allways turned ON so I need invert logic of T1. \$\endgroup\$
    – Fires_CZ
    Commented Apr 9, 2019 at 15:25
  • \$\begingroup\$ cdn.instructables.com/FND/SB75/ICE0EFAB/… \$\endgroup\$
    – D.A.S.
    Commented Apr 9, 2019 at 15:28

2 Answers 2

1
\$\begingroup\$

An N-channel MOSFET would let you have a pull-up that lets it boot, since the gate does not draw current after the original capacitive charge. The LED would be on a boot but that may not be an issue.

Or you probably don't need the transistor, you could perch a small resistor on two of the transistor pads and use the GPIO to drive the cathode low. You may need to increase the series resistance to keep the LED current in spec for the IC.

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

You can replace the transistor, if a typical SMT SOT-23 type such as MMBT3904, directly with a MOSFET such as an AO3400A, the pinouts are compatible and the internal pullup in the ESP8266 module should suffice for boot-up. You can leave the 5K in place, or take it out.

The LED will remain on until you actively drive GPIO2 low.

\$\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.