| msoe.edu > Dr. Durant > Courses > GE110 > Lab 6 |
This is a 1-week lab.
This activity will acquaint you with how logic circuits use information from other common electrical components. In this laboratory sensors detect what a simple moving robot is doing and the output of the logic circuit serves to adjust the motion of the robotic vehicle.
Prof. Barnekow designed the DigiBot hardware and original lab assignment. Prof. Durant modified the lab assignment for GE-110.
Do the following before the lab meeting and submit a copy of your work to your professor at the beginning of lab.
The DigiBot is a mobile platform (a vehicle that can move) equipped with several sensors whose logic output allows you to control the vehicle's motion and functions. The sensors detect both the presence of obstacles and the position of the DigiBot relative to a black stripe that the vehicle can be made to follow. A prototyping board on the vehicle allows you to implement the desired digital logic circuits to control the functions of the DigiBot. The sensor outputs are combined by the logic circuit in a manner to control two motors which power the vehicle.
![[Figure 1. DigiBot Block Diagram]](figure1block.gif)
Figure 1. DigiBot Block Diagram
All logic circuits and components (including building blocks) are active devices. That means they require attachment to a power source such as a battery or power supply in order to operate. This is as opposed to passive devices (or components), such as resistors, which do not require any connection to a power source.
| A | Input | Direction control for the right motor |
| B | Input | Enable for the right motor |
| C | Output | Right sensor of the line tracker |
| D | Output | Collision Sensor |
| E | GND | Ground, return path for current |
| F | VCC | Power connection to the batteries |
| G | Output | Center sensor of the line tracker |
| H | Output | Left sensor of the line tracker |
| I | Input | Enable for the left motor |
| J | Input | Direction control for the left motor |
To function ALL active devices require that the appropriate pins of each DIP be connected to VCC and to GND. See the pin connection requirements for each active device for guidance.
Top and Bottom views of the DigiBot are shown in Figures 2 and 3.
![[Figure 2. Top View of Vehicle]](figure2top.jpg)
Figure 2. Top View of Vehicle: Connectors A through E are near the right wheel at the top of the figure, while connectors F through J are near the left wheel near the bottom of the figure. The collision sensor can be seen at left. The protoboard is the white board mounted between the 2 rows of connectors.
![[Figure 3. Bottom View of Vehicle]](figure3bottom.jpg)
Figure 3. Bottom View of Vehicle: The two motors can be seen at right attached to the wheels. The battery compartment is visible at center, while the three tracking sensors can be seen on the green printed circuit board near the left side of the picture. The on-off switch can be seen on the DigiBot at the lower left.
DigiBot Schematics: The schematic for the available pins of the DigiBot are shown in Figure 4 and the pin functions are listed in the System Inputs and Outputs section. Your logic circuit will take the outputs from some of the sensors, convert these outputs to form new logic signals that become the logic inputs to the motors. The inputs serve to control the motor based on what the sensors detect.
![[Figure 4. DigiBot Electrical Connectors]](figure4connections.gif)
Figure 4. DigiBot Electrical Connectors
The VCC connections shown in Figure 4 are already internally attached. It is only necessary to flip the switch into the ON (closed) position to direct power to all of the components.
Become more familiar with the DigiBot by performing a few simple tests to check its functionality.
For all tests, flip the power switch located on the underside of the DigiBot into the ON position.
Motor Test: For the following test, put the DigiBot on blocks to keep it from moving when the wheels turn. First, test the function of the left motor by running a wire from VCC to the enable of the left motor, I. Then, connect a wire from VCC to the direction control of the left motor, J. Record the direction of rotation of the left wheel. Connect J to GND and again record the direction of rotation of the left wheel. Connect I to ground to stop the left motor. Repeat these steps for the right motor.
Obstacle detector test: Keep the motor enables connected to GND. The motors do not have to be running for this test. Using a logic probe or a multimeter, check the logic level on the obstacle detector output, D. If there is no obstacle within ten inches of the sensor, there should be a logic low present. If using a multi-meter, this will be a voltage between 0 volts and .8 volts. Now, place your hand or some other object in front of the obstacle sensor. There should be a logic high present. If using a multi-meter, this will be a voltage between 3 volts and VCC (around 5.5 volts).
Line tracker test: The motors do not have to be running for this test. You will need a piece of white paper with strip of black electrical tape attached. Place the black tape beneath the center sensor of the line tracker. The left and right sensors should both have the white paper below them. Now, check and record the logic level present on the track sensor outputs. The left and right sensors, H and C, should have a logic high present and the center sensor, G, should have a logic low. Repeat this test by moving the black electrical tape beneath the right and left sensors. Record the logic levels for each test. The sensor with the black tape beneath it should have a logic low and the sensors with the white paper below them should have a logic high.
Performing all of the tests provides assurance that the individual components of the DigiBot are performing properly.
Wire the circuit you designed for the prelab assignment. Insert the 7404 (inverter), 7408 (AND), and 7432 (OR) DIPs along the center groove of the Protoboard. Your instructor will provide information on how to wire your circuit shown using the ICs, protoboard, and wires. Wire the enables (B and I) to VCC (F) so that the motors are always enable.
Note: Each IC package must have connections of F (VCC) to Pin 14 and E (Ground) to Pin 7.
Test the operation of the DigiBot on the provided track. The vehicle should follow the tape path defined by the black tape.
Some things you can do to achieve a better understanding of the DigiBot and digital logic:
You will need to demonstrate your project to the instructor during the week 6 lab meeting. The demonstration will count for 50% of your project grade.
There is no microprocessor in the logic circuit for the DigiBot. Hence, as long as the wires of the circuit are connected in a specific manner, the performance of the DigiBot is fixed within a limited range of capability. That means whatever change in performance you wish to effect could only be done by changing the DigiBot circuit, such as changing the circuit connections, adding more gates, etc. If circuit performance can only be changed by a change in wiring and/or components, the circuit is referred to as being hardwired.
If there are only limited things you want a circuit to do, having a hardwired circuit is a very reasonable thing to have. But if you want versatility, an ability to easily make changes in performance, some programming capability must be introduced in the circuit. A microprocessor of some type must be used. Then you can change performance via programming commands and there is no need to solder any connections or detach/attach wires. But software can be corrupted and crash. Hence, the both hardwired circuits and microprocessor controlled circuits exist in industry.
Logic gates are the building blocks of digital circuits. A commonly used gate that you may have not discussed in lecture is the NAND gate. This is a gate that combines the performance of an AND gate followed by a NOT gate. The electrical performance of circuits in general is specified in terms of the input and output behavior of the circuits. For logic circuits, simple and complicated, that behavior can be provided by what is called a truth table, a relationship between input and output, if the input is such and such, the output is so and so.
Let us begin with the AND gate. Its symbol and its truth table for a gate with 2 input is as follows:
![[And truth table]](andTable.gif)
The truth table has all possible logic levels for the input and the corresponding output logic level that defines what an AND gate does. Only if both inputs are HIGH, have a value of 1, is the output also high. Otherwise the output is always LOW, a value of 0.
What if the output of the AND gate is inputted into a NOT gate, a gate whose output logic state is the opposite as that of the input logic state. An input of 0 results in an output of 1 and an input of 1 results in an output of 0. That combination of a AND gate followed by a NOT gate is the defining behavior of the NAND gate. The symbol and truth table are:
![[NAND truth table]](nandTable.gif)
The amazing thing is that it is possible to transform any desired logic relationship between input and outputs into a functioning circuit using only NAND gates (instead of a mix of inverters, AND gates, and OR gates). This will be proven in EE-290.
This page was last updated on Tuesday, 18-Oct-2005 17:56:14 CDT.