Nothing Special   »   [go: up one dir, main page]

Building AND, OR and NOR Gates Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

1.

Circuit Diagram

NOTE: The lamp voltage should not exceed the battery supply voltage, that is if you are
using a 6 Volts lamp, then, use a 6 Volts battery or DC voltage source in the circuit.

2. Circuit Explanation
The Logic AND Function
The Logic AND Function states that two or more events must occur together and at the same
time for an output action to occur. The order in which these actions occurs is not as it does not
affect the final result. For example, A & B = B & A AND In Boolean algebra the Logic AND
Function follow the Commutative Law which allows a change in position of either variable.

The AND function is represented in electronics by the dot or full stop symbol ( . ) Thus a 2-
input (A B) AND Gate has an output term represented by the Boolean expression A.B or just
AB.

In the circuit diagram the two switches, A and B are connected together to form a series
circuit. Therefore, in the circuit above, both switches A AND switch B must be closed (Logic
“1”) in order to put the lamp on. In other words, both switches must be closed, or at logic “1” for
the lamp to be “ON”.

Then, this type of logic gate (an AND Gate) only produces an output when “ALL” of its
inputs are present. In Boolean Algebra terms the output will be TRUE only when all of its inputs
are TRUE. In electrical terms, the logic AND function are equal to a series circuit as shown
above.

As there are only two Switches in the circuit, each switch with two possible states “open” or
“closed”. Defining a Logic “0” as being when the switch is open and a Logic “1” when the
switch is closed, there are then four different ways or combinations of arranging the two switches
together as shown.
The Logic OR Function
The Logic OR Function function states that an output action will become TRUE if either one
“OR” more events are TRUE, but the order at which they occur is not important as it does not
affect the final result.

For example, A + B = B + A and in Boolean algebra the Logic OR Function follows the
Commutative Law the same as for the logic AND function, allowing a change in position of
either variable.

The OR function is sometimes called by its full name of “Inclusive OR” in contrast to the
Exclusive-OR function we will look at later in tutorial six.

The logic or Boolean expression given for a logic OR gate is that for Logical Addition which
is denoted by a plus sign (+). So, a 2-input (A B) Logic OR Gate has an output term represented
by the Boolean expression of A+B = Q.

Here the two switches A and B are connected in parallel and either Switch A OR Switch B
can be closed in order to put the lamp on. In other words, either switch can be closed, or at logic
“1” for the lamp to be “ON”.

Then, this type of logic gate only produces and output when “ANY” of its inputs are present
and in Boolean Algebra terms the output will be TRUE when any of it inputs is TRUE. In the
electrical terms, represents the logic OR function is equal to a parallel circuit of two switches.

Again as with the AND function there are two switches, each with two possible positions
open or closed so, therefore there will be 4 different ways of arranging the switches.
The Logic NOR Function
The NOR or “Not OR” gate is also a combination of two separate logic functions, Not and
OR connected together to form a single logic function which is the same as the OR function
except that the output is inverted.

To create a NOR gate, the OR function and the NOT function are connected together in series
with its operation given by the Boolean expression as,

The Logic NOR Function only produces and output when “ALL” of its inputs are not present
and in Boolean Algebra terms the output will be TRUE only when all of its inputs are FALSE.
The Truth Table for the NOR function is the opposite of that for the previous OR function
because the NOR gate performs the reverse operation of the OR gate, we can notice that, the
NOR gate is the complement of the OR gate.

3. Parts
2x SPST Toggle switch
1x Lamp (lamp voltage should match battery/DC supply voltage)
1x Resistor 100E (brown black brown) 5% tolerance, 1/4 Watt
1x DC power supply 5 Volts

4. Pin Configurations
Bonus

A. Understanding Circuit/Schematic Diagrams

Name Designators and Values


One of the biggest keys to being schematic-literate is being able to recognize which
components are which. The component symbols tell half the story, but each symbol should be
paired with both a name and value to complete it.

Names and Values


Values help define exactly what a component is. For schematic components like resistors,
capacitors, and inductors the value tells us how many ohms, farads, or henries they have. For
other components, like integrated circuits, the value may just be the name of the chip. Crystals
might list their oscillating frequency as their value. Basically, the value of a schematic
component calls out its most important characteristic.

Component names are usually a combination of one or two letters and a number. The letter
part of the name identifies the type of component -- R's for resistors, C's for capacitors, U's for
integrated circuits, etc. Each component name on a schematic should be unique; if you have
multiple resistors in a circuit, for example, they should be named R1, R2, R3, etc. Component
names help us reference specific points in schematics.

The prefixes of names are pretty well standardized. For some components, like resistors, the
prefix is just the first letter of the component. Other name prefixes are not so literal; inductors,
for example, are L's (because current has already taken I [but it starts with a C...electronics is a
silly place]). Here's a quick table of common components and their name prefixes:

Although these are the "standardized" names for component symbols, they're not universally
followed. You might see integrated circuits prefixed with IC instead of U, for example, or
crystals labelled as XTAL's instead of Y's. Use your best judgment in diagnosing which part is
which. The symbol should usually convey enough information.

Circuit Diagram Connections


Circuit diagrams or schematic diagrams show electrical connections of wires or conductors by
using a node as shown in the image below. A node is simply a filled circle or dot. When three or
more lines touch each other or cross each other and a node is placed at the intersection, this
represents the lines or wires being electrically connected at that point.

If wires or lines cross each other and there is no node, as shown at the bottom of the above
image, the wires are not electrically connected. In this case the wires are crossing each other
without connecting, like two insulated wires placed one on top of the other.

Example Circuit Diagram

Some Circuit Diagram Rules


The following are general circuit diagram rules.

- Wires or lines in circuit diagrams are usually horizontal or vertical. In some cases a diagonal
line may be used which is placed at 45 degrees.
- Component symbols in a circuit diagram are usually placed horizontally or vertically. On
very rare occasions a component may be placed at 45 degrees, but only for a very good reason.
- Circuit diagrams are drawn as simply and neatly as possible. This means that the physical
implementation of the circuit may look different to the circuit diagram, but they are electrically
the same.
- Lines connecting components can be thought of as insulated wires in most cases, with only
the ends of the wires being bare conductors for electrical connection.
- When lines cross each other in a circuit diagram, they can be thought of as two insulated
wires crossing if there is no node where the wires intersect or cross each other.
- Three lines intersecting at a point with a node at the intersection means that the three wires
are electrically connected. This connection can be thought of as three insulated wires bared at the
point of intersection and soldered together.
- Two wires that cross each other with a node at the intersection of the crossing point means
that the wires are electrically connected.

B. Resistor Colour Code


C. Capacitor Conversion Table

Some Examples of Capacitor Letter Codes


D. Anatomy of Breadboard

A breadboard is a rectangular plastic board with a bunch of tiny holes in it. These holes let
you easily insert electronic components to prototype (meaning to build and test an early version
of) an electronic circuit.

The connections are not permanent, so it is easy to remove a component if you make a
mistake, or just start over and do a new project. This makes breadboards great for beginners who
are new to electronics.

Inside a breadboard
The leads can fit into the breadboard because the inside of a breadboard is made up of rows of
tiny metal clips. This is what the clips look like when they are removed from a breadboard.
A row of five breadboard spring clips
When you press a component's lead into a breadboard hole, one of these clips grabs onto it.

How are the holes connected?


Remember that the inside of the breadboard is made up of sets of five metal clips. This means
that each set of five holes forming a half-row (columns A–E or columns F–J) is electrically
connected. For example, that means hole A1 is electrically connected to holes B1, C1, D1, and
E1. It is not connected to hole A2, because that hole is in a different row, with a separate set of
metal clips. It is also not connected to holes F1, G1, H1, I1, or J1, because they are on the other
"half" of the breadboard—the clips are not connected across the gap in the middle (to learn about
the gap in the middle of the breadboard, see the Advanced section). Unlike all the main
breadboard rows, which are connected in sets of five holes, the buses typically run the entire
length of the breadboard (but there are some exceptions). This image shows which holes are
electrically connected in a typical half-sized breadboard, highlighted in yellow lines.
Buses on opposite sides of the breadboard are not connected to each other. Typically, to make
power and ground available on both sides of the breadboard, you would connect the buses with
jumper wires, like this. Make sure to connect positive to positive and negative to negative (see
the section on buses if you need a reminder about which color is which).

E. Practice Circuit on a Breadboard


This tutorial shows you how to build a very simple circuit which lights up a single Light
Emitting Diode (LED).

You will learn:


- About resistors
- About LEDs
- How to read a circuit diagram
- How to build a circuit on breadboard

Parts Required:
- 1x Resistor 1k (brown black red gold)
- 1x LED (Light Emitting Diode)
- 1x Breadboard
- Few breadboard connecting/link wires
- 1x 9V Battery
- 1x battery snap/link for 9V battery

Reading the Circuit Diagram


The circuit diagram (also known as a schematic diagram) is shown below:

This circuit diagram tells us (clockwise from the battery): Connect the positive terminal of the
battery (red battery clip lead) to the 1 kilo-ohm resistor. Connect the other lead of the resistor to
the anode of the LED. Connect the cathode of the LED to the negative terminal of the battery
(black battery clip lead).

Often the battery or power source is not shown in the circuit diagram. It will be represented
by text that will show what voltage must be connected across the circuit. This diagram shows the
alternate circuit:

Building the Circuit


Get the parts and tools ready:
Watch video clip on CD. It will show you what you will be doing – step by step instructions.

Step 1: Insert the LED into the Breadboard


Start by bending the longer lead of the LED as shown in the previous photo. Plug the longer
lead (anode) of the LED into the top rail of the breadboard and the other lead into a hole in the
main part of the breadboard as shown:

Step 2: Insert the Resistor into the Breadboard


Use the side cutters to remove a 1k resistor from the string of resistors if they are taped
together. Cut the resistor lead as near to the tape as possible. Don't try to remove the tape as this
will leave a sticky mess on the end of the resistor lead which will then end up in your
breadboard.

Bend the leads of the resistor as shown below. Plug one of the resistor leads into a hole
directly below the cathode lead of the LED and the other lead into a hole below the middle
channel of the breadboard. This connects the LED cathode to one of the resistor leads. It does not
matter which way around the resistor is plugged into the breadboard.
Step 3: Insert the Wire Link into the Breadboard
Insert a wire connector into a hole directly below the resistor lead and into the bottom rail of
the breadboard.

Step 4: Insert the Battery Clip into the Breadboard


Plug the red (positive) wire of the battery clip into the top rail of the breadboard. Plug the
black (negative) wire of the battery clip into the bottom rail of the breadboard.

Step 5: Plug the Battery into the Battery Clip


Finally plug the battery into the battery clip to power up the circuit and switch the LED on.
Make sure to connect the battery clip to the battery the right way around. The opposite type of
connector on the battery clip must be connected to the battery terminals, i.e. the battery and
battery clip each have a pair of terminals and they will only connect to each other one way. If
you try to connect them the wrong way, they won't clip together, but they will put reverse
polarity on the circuit for a moment which may destroy the circuit, so be sure to connect the
battery the right way around the first time.
The following photo shows the circuit built in this tutorial with the connecting strips of the
breadboard that are used by the circuit in blue.

The red lead from the battery is joined to the LED via the top horizontal strip of the
breadboard. The LED connects to the resistor using a top vertical strip. The resistor is not shorted
out because it jumps across the middle insulated channel of the breadboard to a vertical
connecting strip below. The wire link connects the bottom resistor lead to the bottom horizontal
connecting strip which is then connected to the black lead of the battery.

END

You might also like