I have a 12V supply with a buck converter stepping down 12V -> 3.3V to power an esp8266 microprocessor.

The esp is controlling a 12V LED strip switched via 2n2222 transistors. When all LEDs are switched off I can see this constant flicker going on.

How can the transistors switch when the base is grounded, or what else could explain this flicker?

I don't have an oscilloscope unfortunately.

edit: When I remove buck converter and power esp separately the flicker is resolved.

  • \$\begingroup\$ Consider using a MOSFET instead of bipolar transistor to get a clear output. This might be a case of leakage current while using buck converter which is a switch mode power supply. \$\endgroup\$ Mar 28, 2019 at 2:22
  • \$\begingroup\$ When the transistor is off the collector voltage only rises a few volts with about 8~9V across the string. It also becomes high impedance making it sensitive to lousy (cheap and dirty) Buck regulators perhaps operating at 150kHz with lots of harmonics into the AM band. \$\endgroup\$ Mar 28, 2019 at 3:12

3 Answers 3


There is a high frequency common mode ground noise causing spurious conduction.

Using a pullup resistor of 10k to 100k from Collector to V+ should be enough to disable this effect by shunting the voltage across the LEDstrip when off.

The base current needs to be at least 5% of LEDstrip current when ON.

You can also apply low ESR caps to the 3.3V ESP load to reduce ripple and use twisted pairs to reduce EMI.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Ok I will give this a try. Can you elaborate on 'high frequency common mode ground noise', is this AC noise on the ground? Specifically what is happening to cause the flicker. \$\endgroup\$
    – trapper
    Mar 28, 2019 at 3:07
  • \$\begingroup\$ provide a photo of your grounds \$\endgroup\$ Mar 28, 2019 at 3:27

Suppose your buck regulator has ringing at 100MHz, with amplitude of 0.1 Amp. And that current flows thru 2" of wire, or 50 mm or about 50 nanoHenries inductance.

If, using V = L * dI/dT, we show 0.5 volts peak ringing, then your bipolars may be turning on.....just a little bit.

Math: V = 50nH * 0.1 amp /2.5 nanoseconds

V = 50/2.5 * 0.1 * nano/nano = 20 * 0.1 = TWO VOLTS


Sometimes off is not really off. It only takes about 650mV to turn on a small signal transistor like a 2N2222 or 2N3904. Transistor leakage is possible, but that is more of an issue at high temperatures. So the problem is that the base of the transistors is not going down close to zero volts, so they will be in a clean 'OFF' state, or some type of noise is getting into the transistor base.

Check make sure the MPU pins are at zero volts in the OFF state, and not just floating in a tristate mode. Check for ground noise, as ground bounce is the same as putting a pulse into the base of the transistors. It will show up on an oscilloscope or a good DVM set to read AC volts. Just to be sure that off is really an OFF state, install 10K resistors from base to emitter. When ON they will only consume 65uA from the MPU pins.

By the way, if the MPU pins connect directly to the base of the transistors without a 1K current limiting resistor, the MPU output can damage the transistors, or damage the MPU pin driver. Please double check this.


Your Answer

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

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