I have a simple setup with a BC547 C NPN transistor with nothing connected to the base as shown: 5V to collector, high z on base, emitter to 1K Res to LED to GND. I'm using a USB cable plugged into the wall. Why is it that when I touch the wire connected to the base, the LED brightly lights up?

  • \$\begingroup\$ Is the base of the transistor floating? \$\endgroup\$
    – Mitu Raj
    Nov 7, 2020 at 15:34
  • \$\begingroup\$ @MituRaj yes it is \$\endgroup\$
    – Bailey
    Nov 7, 2020 at 19:48
  • \$\begingroup\$ Floating inputs induce noise on the input, causing unpredictable switching of the transistor. Tie it to a logic level always. Your fingers are sources of static charges that might have caused transistor to turn on momentarily. \$\endgroup\$
    – Mitu Raj
    Nov 7, 2020 at 20:11

3 Answers 3


I expect the main cause of the symptom is that you run it from a 5V charger plugged into the wall. Try the same thing again, but this time with a power bank, I guess the LED will not light up that bright as it does with the wall charger.

The reason is common mode noise emitted by the charger. "Common mode noise" means that while the "+5V" and "GND" keep having a potential difference of 5V all the time, the voltage between GND and actual earth potential can be oscillating quite strongly. As long as you do not connect anything earth referenced to your circuit, the common mode noise does not affect the operation of your circuit. But if you touch the base of the transistor, you provide a path from "actual earth" to the transistor. Your path to earth is partly leakage current, and partly capacitive coupling to earth.

The GND output of the supply oscillates between being above earth potential and being below earth potential. If you touch the transistor base, the LED lights up only during the time GND is below earth potential. As the switching frequency of these supplies is around 100kHz, you will not see any flickering of the LED, though.


Assuming you're touching nothing else (like, say, the 5V?):

You're a big antenna / capacitive load on power lines / coupling into whatever. It's hard to tell what really is the source of current here.

Together with the base emitter junction, which does act like a diode in this mode of operation, you seem to be injecting enough current into the transistor to make it operate in saturated region.

That's in fact a bit surprising to me; the BC547C is a relatively low-\$\beta\$ transistor and it takes a bit of current to make the output current large, but here we are. If I had to take a wild guess: your USB supply is not the greatest, it has a lot of ripple at low load, and that's easily coupling into you.

It's harmless to you, but obviously changes the operation of your circuit.

That's exactly why, whenever you have a circuit that has high gain (like your single-transistor amplifier), you need to keep its input well-protected against such interference: keeping the traces on a PCB short, don't use flying cables, don't use breadboard, always put a low-pass filter before the input to get rid of anything high frequency, maybe shield the box, use differential signaling and make sure any noise coupled in is common mode…

  • \$\begingroup\$ Thanks for the answer. I think you're right about the unusually high transistor gain, I may have a faulty batch of transistors. I doubt the power supply is an issue though, since i tested it with multiple power supplies, maybe it has something to do with the USB cable being 10ft long? \$\endgroup\$
    – Bailey
    Nov 7, 2020 at 11:35
  • \$\begingroup\$ "high gain" is the opposite of a fault. Quite the contrary, most datasheet specify a minimum gain, but no maximum. That's no problem, because usually you never use them for anything but either pinch-off/saturation operation (i.e. "on/off"), or with feedback, where it only matters that the gain is high enough and more gain only makes things better. \$\endgroup\$ Nov 7, 2020 at 13:06

Let us run a bit of math, with assumption we need 0.1 milliamp (100 microAmps) into the base of that transistor.

And we'll assume within the wall are 117VAC (160 volt peak) power cables.

We will assume the USB cable runs 1cm away from power cables, for 10 meters.

We will use I = C * dV/dT in our final math.

First compute (estimate) the capacitance etween the USB and the power (HOT) wire.

Using the parallel plate capacitance formula (in a dense grouping of wires, not 2 wires alone, but a rats_nest of wires, parallel_plate is a fine first estimate)

C = Eo * Er * Area/Distance, which for AIR dielectric becomes approximately

C = 9e-12 farad/meter * (1mm (size of copper cores) * 10 meters)/1cm

C = 9e-12 * 1e-3 * 10 / 1e-2 == 9e-12 * (1e-3 * 1e+1 * 1w+2) = 9e-12 * ONE

And we round up to 10 picoFarads.

Can we get 0.1 milliAmps thru that capacitance?

I = C * dVdT = 10pF * 160 volts * 377 radians/second

I = 1e-11 * ~~60,000 == 60e-(11*3) = 60e-8 amps = 0.6e-6

I for a pure sinusoid (no spikes from fluorescent lights, motor spikes_

  • I = 0.6uA and we wanted 100 uA.

Thus our assumption ---- we need 100uA --- is only satisfied at 1% of the goal.

But there can be other Trash coupled, from other electrical activity in the cable.

And the distance can be << 1 cemtimeter. And the edge_rate will be much faster than 60,000 volts/second (more like 1 volt in 10 nanoseconds, which 1,600X faster).

Importantly, because of collector_base leakages, the base will be self_biased within 0.1 or 0.2 volts of strong turnon. Thus even low voltages will turn on the transistor, even more.


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.