0

I asked on a forum some time ago about why my logical AND operation doesn't work and I received this diagram:

enter image description here

I don't use resistors, I use potentiometers to lower the voltage and I tried to adapt this diagram for potentiometers(wired with only 2 legs). Would this work in real life?: enter image description here

EDIT: I'm asking if the second diagram would work in real life, an AND operation made with potentiometers in place of standard resistors.

Bogdan
  • 29
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 25 '21 at 16:50
  • As currently shown you are using a three terminal device as a rheostat not a potentiometer . – crasic Oct 25 '21 at 17:00
  • 1
    if you close S2, the LED will light regardless of S1. Not an And operation... – tobalt Oct 25 '21 at 17:05
  • why don't you replace the transistors with the two switches? – jsotola Oct 25 '21 at 17:39
  • Because I want to be able tocontroll the and with electricity – Bogdan Oct 25 '21 at 18:00
  • @Bogdan [This is how a hobbyist might approach designing RTL, ad hoc](https://electronics.stackexchange.com/a/281320/38098). (A professional would spend a lot more time on the topic and develop solid standards that cover a much wider scope of various considerations.) – jonk Oct 25 '21 at 23:18

3 Answers3

2

Logical AND operation using transistors

The problem is that the original forum post you received does NOT work as an AND gate for the LED.

Since there are no base current limiting resistors, SW2 can turn on the LED with all the LED current flowing through the BE junction. SW1 does nothing.

If you want an AND function use something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

R4 and R5 are optional, their only purpose is to handle the CB leakage.

DO NOT use potentiometers in the manner you show in your schematic, turning the pot to one end results in very low resistance and very high currents. Buy some resistors.

Jack Creasey
  • 21,428
  • 2
  • 15
  • 29
0

Not very well. Even if just S2 is closed, current can flow through the lower transistor's base emitter junction and light the LED. If the transistor isn't designed to handle the resulting base current, it could blow the transistor

The Photon
  • 126,425
  • 3
  • 159
  • 304
  • What can I do to make it a proper AND? – Bogdan Oct 25 '21 at 17:08
  • 1
    "blow the transistor" Don't think so. The upper transistor is acting as an emitter follower, and should be safe. The lower transistor might be stressed a little bit if it is on and the upper transistor is off, but it is characterized for up to 50 mA of base current; all of the LED current could go through the base without harm. – AnalogKid Oct 25 '21 at 17:13
  • @AnalogKid I'm not assuming the 2N2222 notations are accurate. – The Photon Oct 25 '21 at 17:35
  • @Transistor "NOR followed by inverter". NOR isn't an inverted OR? If I invert the nor isn't that cancel the first inversion created an OR? – Bogdan Oct 25 '21 at 17:35
  • @Bogdan, no, a NOR usually requires fewer transistors than an OR. An OR is an inverted NOR. – The Photon Oct 25 '21 at 17:48
  • " I'm not assuming the 2N2222 notations are accurate." They should be. The OP changed my 4401's to them. – AnalogKid Oct 25 '21 at 18:10
  • Sorry, @Bogdan, I should have said inverted NAND followed by an inverter. – Transistor Oct 25 '21 at 18:39
  • @AnalogKid they also changed to a different drawing tool, which might just have 2N2222 as the default NPN. – The Photon Oct 25 '21 at 18:50
0

I'm asking if the second diagram would work in real life, an AND operation made with potentiometers in place of standard resistors.

The potentiometers on the transistor base-emitter junctions are doing nothing.


NAND gates are very simple to make and since they have only one stage they have a short propagation delay (the delay between input changing state and the output changing state).

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. An AND gate built with discrete transistors.

Table 1. Truth table.

A  B  NAND  Inverted NAND
0  0   1         0
1  0   1         0
0  1   1         0
1  1   0         1

enter image description here

Figure 3. A CMOS AND gate. Why are NAND gates used to make AND gates in computers?

The AND gate of Figure 1 is not very good as the pull-ups are done using resistors and these would be slow in charging up the gate capacitance of the inputs it was feeding. That would limit the maximum speed of the logic.

The design of Figure 3 uses transistors to pull low and to pull high. These will have much lower resistance than the resistors of Figure 1 and so will facilitate high speed logic.

Transistor
  • 168,990
  • 12
  • 186
  • 385