# EEVblog Electronics Community Forum

## Electronics => Beginners => Topic started by: Jasonbit on October 08, 2018, 03:48:27 am

Title: How calculate And gate with transistor?
Post by: Jasonbit on October 08, 2018, 03:48:27 am
Hello folks,

I need understand how calculate and analyze this circuit: https://postimg.cc/bDGgVwJs

Thanks
Title: Re: How calculate And gate with transistor?
Post by: Ferenc on October 08, 2018, 05:11:15 am
Think of transistors as switches. If you "push" the base, then you "close" the circuit between collector and emitter.
Therefor:
-If you press SW1, then you "close" Q1, but nothing is going to happen, because Q2 is still "open".
-If you press SW2, then you "close" Q2, but nothing is going to happen, because Q1 is still "open".
-If you press SW1 and SW2 at the same time, then both Q1 and Q2 are going to be "closed", so LED1 is going to lit up.

About the calculation, I don't know what you really want to do, but the datasheet has every information, you would need.
https://www.fairchildsemi.com/datasheets/BC/BC547.pdf (https://www.fairchildsemi.com/datasheets/BC/BC547.pdf)
Title: Re: How calculate And gate with transistor?
Post by: Jasonbit on October 08, 2018, 07:33:23 am
Think of transistors as switches. If you "push" the base, then you "close" the circuit between collector and emitter.
Therefor:
-If you press SW1, then you "close" Q1, but nothing is going to happen, because Q2 is still "open".
-If you press SW2, then you "close" Q2, but nothing is going to happen, because Q1 is still "open".
-If you press SW1 and SW2 at the same time, then both Q1 and Q2 are going to be "closed", so LED1 is going to lit up.

About the calculation, I don't know what you really want to do, but the datasheet has every information, you would need.
https://www.fairchildsemi.com/datasheets/BC/BC547.pdf (https://www.fairchildsemi.com/datasheets/BC/BC547.pdf)

I can interpret the schema. My question is how to calculate which current we have in the branch of the LED when both the gates are connected
Title: Re: How calculate And gate with transistor?
Post by: rstofer on October 08, 2018, 07:51:14 am
I played with this and while the collector current is easy, the base currents need a little nodal analysis.

For the collector, assume both transistors are saturated and they drop Vce sat of probably 0.2V.

Then you need to know something about the LED, specifically Vf (forward voltage drop) of, say 2.2V and you're just about there.  The voltage across the resistor is 5 - 2*0.2 - 2.2 or 2.4V.  Given a 1k resistor, there will be 2.4 mA flowing.  That is probably nowhere near enough to turn on the LED.

Ordinary LEDs have a Vf of around 2.2V and an If of around 20 mA.  That resistor would need to be 2.4V / 0.02A or about 120 Ohms.  It could be a little larger with less LED current, perhaps as high as 220 Ohms.

Once you settle on the collector current, you can assume the transistors have an hFE of 100 to get the minimum base current.  Then you assume a Vbe of 0.7V and you can do a nodal analysis on the resistors.  In broad terms, the base current will need to be around 200 uA and still provide the appropriate base voltage.

If that is true, the lower resistor will drop about 2V.  But it can't because the upper base voltage is 1.4V (two Vbe drops).  The most it can provide is 0.7V (one Vbe drop) divided by 10k or 70 uA.  Nowhere near enough if the collector current is to be 20 mA unless hFE is a lot higher than 100.

A better solution is to put both resistors in parallel from the 5V rail.  That series connection is a problem looking for a place to happen.

The other problem with the circuit is the floating base inputs.  You might want to pull the bases down to ground with a 1 MOhm resistor.  It could be smaller, you need to deal with it when you calculate the individual base resistors.  Just remember, the upper base needs to get to 1.4V and the lower base needs to get to 0.7V and they need about 200 uA to turn on, given the assumptions.
Title: Re: How calculate And gate with transistor?
Post by: BenjaminJackson on October 08, 2018, 10:53:46 pm
Thank you for sharing