Official Forum

JCM inVentures Inc.

(403) 284-2876

" I ORbot!"

wpe18.jpg (3166 bytes)Welcome back to the laboratory, my apprentice creator! I am glad to see that you have survived the perils on the AND-roid ( and it's nemesis, the NAND-roid ). In this session, we will be studying another important part of our robot-brain: The OR gate and NOR gate.

Let's wire up an OR gate right away so we can see how it behaves. A typical OR gate integrated circuit is the 74LS32 ( 74ALS32, 74HCT32, 74F32 are all OR gates too! Ignore the letters and concentrate on the numbers 7432. )

Enough talk, Igor! Wire up this circuit...

Now experiment with turning each, and then both of the input switches ON.

You will notice that the output ( connected to the logic probe ) behaves in the following manner. (Remember, logic probe RED is ON and GREEN is OFF)

Here's what you should see:
bulletWhen both inputs are OFF, the output is OFF
bulletIf input 1A OR input 1B are on ( OR both are ON ), the output is ON

Concept Alert:

An OR-gates output will be ON if at least one of it's inputs is ON! It's output will be OFF if all it's inputs are OFF!

Here's how the four OR-gates in a 74LS32 integrated circuit are connected. ( The Vcc is +5V and the GND is connected to ground. )

Notice the curved shape for the OR-gate symbol.

Disconnect the first OR-gate ( 1A, 1B, 1Y ) and hook up the other three gates in the pack and make sure that they too function properly! We wouldn't want any bad OR-gates getting into our robots head, now would we!

OR-gate Truth-Table

Here's how our OR-gates response looks on our Truth Table:

Reading the table left-to right, ( 0 is OFF and 1 is ON ) we see that only the first line ( both inputs OFF ) give us an output which is OFF. All other inputs produce an ON output!


The next logic gate which bears analysis is the NOR gate ( Which is short for NOT-OR ). The NOR gate is exactly like a mirror image of the OR gate: that is to say, whatever way the OR gate would respond to it's inputs, the NOR gate would respond opposite!

Let's hook one up and see how it works!

Here's the expected behavior...
bulletIf both inputs are OFF, the output will be ON!
bulletIf either input is ON or both inputs are ON, then the output will be OFF.

NOR gate Truth Table

Does your NOR gate respond this way? If so, then test out the other NOR gates in this integrated circuit... Notice that the gates are connected slightly differently from the AND/NAND gates;

Note the symbol for the NOR gate. It's exactly like the OR gate, except for the small "bubble" on it's end. That bubble says that the output is the opposite of what you would expect from a normal OR gate.

What good are OR/NOR gates?

These gates are useful anywhere where an output is desired if any one of a series of inputs is ON. Such as..

Home Alarm system: Each input connected to a window or door sensor. If any is opened, then the OR/NOR gate would sound an alarm.

Home Robot Saftety Device: Each input is connected one of many bump sensors surrounding the robot. If the robot should touch something with any of theses sensors, the robot will shut-down to prevent injury.

Now we have all the basic bits we need to create an effective robot brain! Now we must study ways of combining these mechanisms to increase it's intelligence!

Design of the incredible OR-BOT:

Now, let's create an OR-BOT brain which will avoid obstacles and keep from falling off the table!

Firstly we must fabricate two feelers for each side of the orbot: One feeler will reach forward and try to touch walls. The second feeler will reach down and feel the table surface. Now, if the forward feeler OR the table feeler gets bumped we want the opposite motor to go backwards!

We can build this feeler circuit using stiff wire on our breadboards as shown:

A two-feeler OR-BOT circuit