0
\$\begingroup\$

I'm building a full adder circuit using transistors. I am only doing it for fun, that's why I'm not using IC gates.

I am feeding it 5V and I'm getting really strange outputs. And it isn't even consistent, sometimes it does one thing and other times, other things. The outputs are around 3-4V, the LEDs sometimes shine normally, sometimes very faintly, sometimes not at all. And I just can't get it working. Can you see something off in my schematic?

And yes, I checked my PCB, I soldered everything good, there are no bridges.

I tried removing the resistors before the grounds, (R1, R6, R9, R18, R21, R26, R29, R32, R33) but it still doesn't work.

Here is the schematic: Full adder schematic

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Well, since you have series resistors in parts of your diagram: divide and conquer. Disconnect some of the stages and test. BTW, are you leaving your inputs floating? \$\endgroup\$ Mar 5, 2021 at 14:56
  • 1
    \$\begingroup\$ Sometimes it's useful to put 10k on a transistor base-to-emitter to prevent trickle currents from turning it on "a little bit". \$\endgroup\$
    – Kyle B
    Mar 5, 2021 at 14:59
  • 1
    \$\begingroup\$ @tlfong01 you are right, I only tested the whole thing together and hoping that it'll be good. I feel so stupid now. Gonna test everything then. \$\endgroup\$
    – Matthias
    Mar 5, 2021 at 19:50
  • 1
    \$\begingroup\$ @ClaudioAviChami I'm not leaving them floating, I connect the logical 0s to ground and yeah, I'll be testing it piece by piece tomorrow. \$\endgroup\$
    – Matthias
    Mar 5, 2021 at 19:51
  • 1
    \$\begingroup\$ @KyleB I can't really understand what you mean. I'm not like a professional, but not an absolute starter. I can feel by your comments, that this project was a bit too difficult for me. I only started this, because I couldn't really find easier ones. At least ones that are not too easy. If it's not too much to ask, could you provide some easier, but not like starter level stuff? \$\endgroup\$
    – Matthias
    Mar 5, 2021 at 19:55

2 Answers 2

0
\$\begingroup\$

You can't build a logic family this way -- as previously said, there is no voltage gain (signal restoration) in your AND or OR gates. This means that the output voltage swing (high to low) is smaller than the input swing. Eventually it won't be sufficient for your intended logic 1 (or logic 0) levels.

Build NAND and NOR gates (e.g. your AND's with following inverters.

Take a look at your carry_out signsl. It's at least 0.7 V below the 'B' signal coming in (VBE of Q22). That in turn is at least 0.7 V below its input (Q17) etc. follow that back and you'll see that there isn't a strong logic level.

There are other techniques to build gates with discrete -- investigate RTL or TTL logic.

\$\endgroup\$
3
\$\begingroup\$

With the exception of your "NOT" gates, none of your gates have any voltage gain. They all use transistors wired as emitter followers, which means that the voltage offsets from base to emitter accumulate until your signal levels are useless.

See my answer to Why are NAND gates used to make AND gates in computers? for a more thorough discussion of this issue.

See also Can you make a CPU out of electronic components drawn by hand on paper? and Will this schematic work as a four-bit shift register?

And your question is essentially an exact duplicate of Building a full adder with NPN BJT transistors

\$\endgroup\$
4
  • \$\begingroup\$ So in the first paragraph, you mean that only in the NOT gate, the output is almost directly connected to Vcc? In the others it has to flow through transistors. Or you mean that only in the NOT gate, the emitter goes directly to Ground and doesn't like goes into the rest of the circuit? I also checked out the links, that you attached. They seem a bit too difficult for me. I'm gonna search for other sources maybe I can understand something. \$\endgroup\$
    – Matthias
    Mar 6, 2021 at 10:19
  • \$\begingroup\$ Thanks you, that new link actually helped me! Before closing this thread, could you please answer my previous question: "So in the first paragraph, you mean that only in the NOT gate, the output is almost directly connected to Vcc? In the others it has to flow through transistors. Or you mean that only in the NOT gate, the emitter goes directly to Ground and doesn't like goes into the rest of the circuit?" \$\endgroup\$
    – Matthias
    Mar 6, 2021 at 11:58
  • \$\begingroup\$ Actually both. The point is, for the NOT gate, the output "swing" (range of voltage that it can produce) is much greater than the input swing. It has voltage gain. Conversely, with your AND and OR gates, the output swing is always slightly less than the input swing -- each B-E junction that the signal must pass through introduces another 0.7 V drop. Many paths through your circuit have four such drops in series. \$\endgroup\$
    – Dave Tweed
    Mar 6, 2021 at 12:16
  • \$\begingroup\$ I get it now. So the best solution is to just rebuild it with NOR gates? \$\endgroup\$
    – Matthias
    Mar 6, 2021 at 12:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.