- May 21, 2001
- 26,032
- 4,663
- 126
I'm teaching myself electronics and need help (no, this isn't homework).
New question:
Ok, I bought some parts for a circuit and put them into a breadboard. Almost everything operates very well. I was surprized that it went so smoothly. But I have one remaining problem.
I boiled it down to the logic gates. These things just aren't as simple as I'd like them to be. If I strip all the extra stuff out that functions properly, what I have left is this diagram. I have an input of ~5 V, two switches, an AND gate, a 160 ohm resistor and an LED. The AND gate is described here.
When both A and B are closed, the LED is at 100% brightness. Good so far. Problem: When A, B, or both switches are open, the LED is at ~50% brightness. Why isn't it off? Does the logic gate allow that much leakage? Is there anything I can do to prevent it?
Problem 2: While investigating this problem, I noticed that if I physically touch any of the wires connecting to pin 1, 2, or 3, then that 50% bright LED randomly goes to off, 50% bright, or 100% bright. It stays in that random state until I touch a wire again. Heck, if I even bring my hand close to a wire, the LED will change states. But if both A and B are closed the LED is always 100% bright as it should be.
What am I doing wrong? Thanks.
Old question:
New question:
Ok, I bought some parts for a circuit and put them into a breadboard. Almost everything operates very well. I was surprized that it went so smoothly. But I have one remaining problem.
I boiled it down to the logic gates. These things just aren't as simple as I'd like them to be. If I strip all the extra stuff out that functions properly, what I have left is this diagram. I have an input of ~5 V, two switches, an AND gate, a 160 ohm resistor and an LED. The AND gate is described here.
When both A and B are closed, the LED is at 100% brightness. Good so far. Problem: When A, B, or both switches are open, the LED is at ~50% brightness. Why isn't it off? Does the logic gate allow that much leakage? Is there anything I can do to prevent it?
Problem 2: While investigating this problem, I noticed that if I physically touch any of the wires connecting to pin 1, 2, or 3, then that 50% bright LED randomly goes to off, 50% bright, or 100% bright. It stays in that random state until I touch a wire again. Heck, if I even bring my hand close to a wire, the LED will change states. But if both A and B are closed the LED is always 100% bright as it should be.
What am I doing wrong? Thanks.
Old question:
Can someone explain to me how logic gates function (in terms of resistances, voltages, and where current flows)?
Suppose you had a generic logic gate. You'll have these features:
[*]Supply voltage pin, Vdd.
[*]Input voltage pins, Vin.
[*]Output voltage pin, Vout.
[*]Ground pin (sink), Vs.
Suppose the gate is supposed to output a true value (1), does Vout = Vdd?
[*]In this case, is there a significant internal resistance from Vdd to Vout?
Suppose the gate is supposed to output a false value (0), does Vout = Vs?
[*]In this case, is the supply voltage sent to ground? Is there an internal resistance for this?
I'm basically interested in what happens to each of the input/supply lines.