1- Introduction
Following the same idea on simulating some digital gates on LTSpice and reproducing them on the bench, here I simulate an AND gate in LTSpice and assemble a simple circuit on the bench.
By comparing these two approaches I intend to facilitate understanding on the gate’s functionality, so I added a video explaining how an AND gate works and how both experiments were implemented.
Of course, each experiment has its own specific implementation details, but this only highlights how they are complementary in showing a student how the gate works and the components involved.
The circuit was taken from the book “Electronic Devices and Circuit Theory”, from Robert Boylestad, 6th edition.
2- BOM:
– Two 1N4004 diodes
– Two 5V DC power supplies at the input
– One 5V power supply at the output
– One 1kΩ resistor
– Two LEDs at the input, one LED at the output
If I have 0V at any of the inputs, and less than 5V at the anode of the diode, it will be directly polarised, so the output voltage will be low, thus correspondent to a logical 0 in the TTL logic.
The same idea can be applied when both inputs are 0V. The circuit output will also be a logical zero, as both diodes are reversally polarised, acting then as an open circuit.
When both inputs are logical one, or 5V, there will be 5V at the diode’s cathode and less than 5V at their anode. That means the diodes will conduct, therefore the circuit output will be logical one, or a little less than 5V.
This way, we can construct the circuit truth table as follows:
A | B | AND |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
3 – LTSpice simulation
The circuit was then simulated in LTSpice using a transient analysis.
In order to simulate varying input signals (on and off), I added two pulses at the input: one with 5V amplitude; delay period of 100us; time of rise and time of fall of 10ns; time on of 250us and period of 500us. The other with the same parameters, except the delay period, which in this case is 0, and period of 1ms.
Running a transient analysis of 8ms, we get the following graph, where we can see the correspondent output according to each input, following the AND gate truth table.
When running a transient analysis, the results we get are these:
Looking closer at its graph, we get this:
The graph clearly shows the output as one when both inputs are one, and zero when any of the inputs are zero.
4 – The experiment on the bench
This circuit was then reproduced using discrete components. The only difference I added was two LEDs at the input, one yellow to highlight input A, and one blue, to highlight input B, and a green LED at the output. This way it is much easier to see the varying inputs and its corresponding outputs following the AND gate truth table.
I used two 5Vdc power supplies at each input. So I would just turn each input on or off in turn to get the expected output for the AND gate.
Just to confirm what was explained from the diodes theory and the expected output, I also measured the inputs and outputs voltages using a multimeter.
These are some pictures I took from this bench experiment. They are quite artistic to be honest 🙂
This circuit behaved as expected, as you can see in the youtube video here:
And this is basically all.
Just please don’t forget to like it and subscribe to the channel!