AND gate issue

dl324

Joined Mar 30, 2015
18,326
Wow I never thought that building an AND gate would be so difficult.
The original circuit you were using works. It has limitations, but it works.

With the component values you're using, a HIGH output should be closer to 4.3V than 3.3V. There's something that you're not describing, there's a wiring problem, or one of the transistors isn't working correctly.
 

AlbertHall

Joined Jun 4, 2014
12,625
The original circuit you were using works. It has limitations, but it works.

With the component values you're using, a HIGH output should be closer to 4.3V than 3.3V. There's something that you're not describing, there's a wiring problem, or one of the transistors isn't working correctly.
The inputs to this gate are fed from a 3.3V supply.
My setup is the following: VCC is 5V, A and B are driven by PIR detectors that output 3.3V.
 

WBahn

Joined Mar 31, 2012
32,830
R=10K, R2=4.7K With these I get an output of: 0V when A&B are down, 0.9V when B is high and 2.2V when A&B are high. (A and B are at 3.3V when high).
What I need is to have an output of 0V when one of them or both are low and an output of at least 3V when both of them are high. Is that possible?
Is there some reason you can't use a digital logic IC?

If so, then I'd recommend making a NAND gate and follow that with an inverter. That lets you put the logic function in the first gate and the output driving function in the second.
 

ebp

Joined Feb 8, 2018
2,332
The fact that the inputs are 3.3 V also makes the circuit at #22 unsuitable unless Vcc is lowered to 3.3 V. With 3.3 V at an input and 5 V for Vcc, the voltage drop across the input 100k resistor would be about a volt and hence the base current about 8 µA (the other 2 into the 30k resistor). If the transistors had a gain of 100 (not unreasonable to expect) the collector current would be 800 µA, if not otherwise limited, resulting in 8 V across the 10k resistor - which of course isn't possible. The transistor would be saturated. With Vcc of 5 V, a HIGH would have to be in excess of about 4.5 V to reasonably assure proper operation. With Vcc of 3.3 V it will work with 3.3 V for HIGH.

Many of the PIR modules sold on the hobby market use an IC with approximately equal source and sink of about 10 mA, which means my earlier suggestion of wired-AND is not workable.

One consideration with an integrated circuit gate is the need for 5 V output swing from 3.3 V inputs. A gate with TTL-compatible inputs (e.g. 74HCT00 NAND or HCT08 AND) operating on 5 V would do nicely. Gates in through-hole packages are becoming scarce as most manufacturers have quit making them. TI is one of the few companies still making them.
 

Thread Starter

wchris777

Joined Dec 1, 2018
13
Is there some reason you can't use a digital logic IC?

If so, then I'd recommend making a NAND gate and follow that with an inverter. That lets you put the logic function in the first gate and the output driving function in the second.
I ordered the SN74LVC1G08DBVRG4 gate a month ago and apparently it will only arrive in a few weeks. So I lost my patience and tried to build one by myself.
 

WBahn

Joined Mar 31, 2012
32,830
I ordered the SN74LVC1G08DBVRG4 gate a month ago and apparently it will only arrive in a few weeks. So I lost my patience and tried to build one by myself.
I can sympathize with that. I assume where you are that the potential sources of parts is extremely limited and that there aren't any options as far as used/surplus electronics stores?
 
Top