Official Forum

JCM inVentures Inc.

info@jcminventures.com

(403) 284-2876

 


Ahh! You're ready to learn the basics of digital logic? Good!

Today, my young apprentice, we will create the brains of your first robot: the Incredible AND-ROID. In order to proceed, you must fit up your lab with the following things...

Preparation:

For this lab you will need:
bulletA 5.0 Volt Power Supply
bulletA Logic Probe
bullet3 Light Emitting Diodes
bullet3 330 ohm resistors ( orange-orange-brown-gold )
bulletA 74ls08 TTL digital logic chip ( Quad AND gate )
bulletSome 22 gauge hookup wire
bulletA prototyping breadboard

OR... You can use my favorite mad-scientist tool, the VULCAN 1 digital trainer and the amazing "Virtual Vulcan", which has everything you need for this experiment!

The AND-roid circuit:

Every robot needs a control system, and our ANDroid is no exception!  Our first robot will use the most important and fundamental logic element there is:  The AND gate.

wpe7.jpg (77350 bytes)

Figure 1:  ANDroid control circuit

Wire up the circuit as shown in this diagram. Be very careful to position the wires exactly as shown, or our creature will not live!  If you wish, you can download the Virtual Vulcan file for this circuit by clicking on the above image!

Now, we've just built the brain of our AND-droid! The brain of our robot consists of a basic logic gate called an AND GATE! ( It's the 7408 )  It's now watching it's two inputs ( the two turquoise wires ) which are connected to the outputs of switches "1" and "2".

It's output is connected to three indicators... The Probe ( Red is HIGH and Green is LOW ), LED 3, and the "buzzer".  These indicators are watching the same output, only indicating them in different ways!

wpe15.jpg (1580 bytes)Turn on your Vulcan by clicking ( or flicking ) the left-most switch and experiment with the two input to our AND gate, switch 1 and 2. 

Switch 1 Switch 2 Ouput of AND gate What's going on here?
OFF = 0wpe8.jpg (811 bytes) OFF = 0wpe8.jpg (811 bytes) OFF = 0wpe8.jpg (811 bytes) The output will be OFF unless Switch 1 AND Switch 2 are ON
OFF = 0wpe8.jpg (811 bytes) ON = 1wpe14.jpg (846 bytes) OFF = 0wpe8.jpg (811 bytes) Again, the output will be OFF unless Switch 1 AND Switch 2 are ON
ON = 1wpe14.jpg (846 bytes) OFF = 0wpe8.jpg (811 bytes) OFF = 0wpe8.jpg (811 bytes) Once more, the output will be OFF unless Switch 1 AND Switch 2 are ON
ON = 1wpe14.jpg (846 bytes) ON = 1wpe14.jpg (846 bytes) ON = 1wpe14.jpg (846 bytes) A-HAH!  Both Switch 1 AND Switch 2 are ON, so the output of our AND gate is ON!

Remember, an ON condition is indicated by a RED on the logic probe and an audible "BEEP" on the buzzer!

wpe17.jpg (1402 bytes)Concept Alert: The And Function:

That's the concept, my young robot-hacker: In order for the output of an AND gate to be ON, both inputs A AND B must be ON. If either is OFF, the output will be OFF.

wpe4.jpg (9308 bytes)

Now, the logic chip you are using has actually got 4 AND gates on board, each with 2 inputs and 1 output. We are currently using inputs 1A(on pin 1) and 1B (on pin 2) and output 1Y ( on pin 3 ).

Try testing out gate 2 with inputs 2A (pin 4) and 2B (pin 5) with output 2Y (pin 6) , then gate 3 and 4. To do this, move the switch wires to the next gate's input's and the logic probes wire to the Y output.

AND-bot behavior:

Now, what fiendish things can we make our AND-roid do? Well, here's some idea's...

1) Give your robot two touch sensors, one by the front wheels and one by the back! Connect the output of our AND gate to a motor driver so that an ON output drives the motor forward and and OFF turns the motor off.
bulletWhen neither wheel is touching the ground, the drive motor is off.
bulletIf the front wheel is touching the ground, the motor stays off.
bulletIf the back wheel touches the ground, the motor stays off.
bulletIf both front AND back wheels touch the ground, the drive motor is turned on and away the AND-roid goes! ( EET's Ahh-llive!! )

2) You motion sensor floodlamp in your backyard has an AND-brain just like this little robot! One input is connected to a light sensor, and the other input is connected to the motion sensor. The output is connected to the lamp.

Motion must be sensed AND the area must be dark before the lamp is turned on!

3) ROBOT SUMO WRESTING is a sport where one robot must find another within a five foot circle and push that robot out. How does the beast of battle figure out when the victim is directly in front?? AND-brains! The left input and right inputs are connected to feelers which extend out the front of the robot. If the left feeler AND the right feeler touch the opponent, then then enemy is directly to the front! The AND-brain commands the motor to drive straight forward and victory is assured!