Author Topic: Why is the LED lit with these transistor logic gates?  (Read 1154 times)

0 Members and 1 Guest are viewing this topic.

Offline harnonTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: au
  • Is this thing on?
    • My Personal Website
Why is the LED lit with these transistor logic gates?
« on: April 08, 2019, 04:06:39 am »
I'm guessing this is a fairly obvious question... I've soldered together a simple AND logic gate circuit using two transistors, but when I open the first switch and close the second the LED unexpectedly comes on - see the first attachment. Transistors are BC547s. I can add a pull down resistor between the two transistors to prevent this, so I'm assuming its something to do with the voltage between the two transistors floating.

Running a simulation shows that the voltage between the two transistors is 2.5V with both switches open (second diagram), which seems to show the transistors are acting as a voltage divider between +5V and GND. When I close the second switch only, the voltage drops to 1.55V (20mA above the LED voltage).

It looks like current is flowing from base to emitter of the second transistor to power the LED, however from what I read the BE junction can be treated as a Zener, with a breakdown voltage of 6V (according to the datasheet). As my voltage is well below this breakdown, where does the current to supply the LED come from?
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: us
  • Very dangerous - may attack at any time
Re: Why is the LED lit with these transistor logic gates?
« Reply #1 on: April 08, 2019, 04:10:17 am »
The LED & resistor should be on the high side between the +5 supply and the top transistor. The emitter of the bottom transistor connected to ground.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7615
  • Country: au
Re: Why is the LED lit with these transistor logic gates?
« Reply #2 on: April 08, 2019, 04:42:11 am »
I'm guessing this is a fairly obvious question... I've soldered together a simple AND logic gate circuit using two transistors, but when I open the first switch and close the second the LED unexpectedly comes on - see the first attachment. Transistors are BC547s. I can add a pull down resistor between the two transistors to prevent this, so I'm assuming its something to do with the voltage between the two transistors floating.

Running a simulation shows that the voltage between the two transistors is 2.5V with both switches open (second diagram), which seems to show the transistors are acting as a voltage divider between +5V and GND. When I close the second switch only, the voltage drops to 1.55V (20mA above the LED voltage).

It looks like current is flowing from base to emitter of the second transistor to power the LED, however from what I read the BE junction can be treated as a Zener, with a breakdown voltage of 6V (according to the datasheet). As my voltage is well below this breakdown, where does the current to supply the LED come from?
A Zener has a reverse biased junction.
The BE junction is forward biased, & will have a voltage drop of about 0.6v.
 

Offline Nerull

  • Frequent Contributor
  • **
  • Posts: 694
Re: Why is the LED lit with these transistor logic gates?
« Reply #3 on: April 08, 2019, 05:30:46 am »
You have about 270 microamps flowing through the base to emitter junction of the transistors when the switchers are closed. This is plenty to light a led.

Moving the led to the high side would prevent the base current from lighting the led.

Remember that the entire function of a transistor depends on the current flowing through the base to emitter junction. If the voltage you were using wasn't enough to conduct through this junction than your transistors would never work at all.
« Last Edit: April 08, 2019, 05:36:08 am by Nerull »
 

Offline harnonTopic starter

  • Regular Contributor
  • *
  • Posts: 215
  • Country: au
  • Is this thing on?
    • My Personal Website
Re: Why is the LED lit with these transistor logic gates?
« Reply #4 on: April 08, 2019, 05:34:00 am »
Thanks for the replies.

The BE junction is forward biased, & will have a voltage drop of about 0.6v.

Oh, I see - the diode is the opposite polarity to what I had in my head. That makes sense, thanks.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8293
Re: Why is the LED lit with these transistor logic gates?
« Reply #5 on: April 09, 2019, 12:22:20 am »
Hint: the arrows in transistor symbols point exactly the same way normal diodes do.

Your simulation doesn't seem to make sense --- what type of (visible light) LED has <1.5v forward voltage?

The others have pointed it out already, but in summary, the LED is being lit by the base current.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf