Presentation is loading. Please wait.

Presentation is loading. Please wait.

Homework - Write Truth Tables for toy car. You will design a simple digital circuit to make a toy car follow a flashlight. The car has three light sensors.

Similar presentations


Presentation on theme: "Homework - Write Truth Tables for toy car. You will design a simple digital circuit to make a toy car follow a flashlight. The car has three light sensors."— Presentation transcript:

1 Homework - Write Truth Tables for toy car. You will design a simple digital circuit to make a toy car follow a flashlight. The car has three light sensors looking right, center, and left. The car has two motors to drive the right and left wheels. Make a truth table with three inputs and two outputs, as shown below. (Please use these columns to simplify troubleshooting.)

2 Evaluate truth tables for toy car.

3 How does the computer manipulate numbers? George Boole, a British mathematician (1815-1864). Logic and math are equivalent. All math functions can be determined using 3 primary logic operators: AND OR NOT Boolean logic is a complete system of logical operations.

4 You already know Boolean logic. Searched the Web for information. How would you get the technical specifications for a car radio? Do you get the same information for “car radio”?

5 The AND operator (both, all) river salinity dairy products exported to Europe

6 The OR operator (either, any) fruit OR vegetables fruit OR vegetables OR cereal from CSIRO Australia

7 The NOT operator fruit NOT apples

8 Let’s look at class using Boolean logic. Please stand up if you are: male AND black hair AND left handed Please stand up if you are: male OR black hair OR left handed How has the group changed depending on the logical operator used.

9 Computers use electrical circuits called gates to manipulate numbers. AND, OR, & NOT gates do all mathematical operations.

10 AND gate Two input bits produces one output bit. Both inputs must be true (1) for the output to be true. Otherwise the output is false (0). ABQ 000 010 100 111

11 OR gate Two input bits produce one output bit. Either inputs must be true (1) for the output to be true. ABQ 000 011 101 111

12 NOT gate The simplest possible gate is called an "inverter," or a NOT gate. One bit as input produces its opposite as output. AQ 01 10 From How Stuff Works

13 Google “JHU circuit builder”.  When you open circuit builder, specify the number of inputs and outputs.  Drag logic components into the circuit area to build your circuit.  Connect inputs (circles) to outputs (squares) by clicking first on one then dragging to the other. Inputs may have only a single connection but outputs may have multiple.  Once your circuit is completed you can choose either single input or all inputs to confirmation that your circuit operates correctly.

14 Design circuits using “circuit builder”. Use circuit builder to confirm the logic behavior of Go to the movie if you have $10 and if you find a ride. Fire alarm sounds if it senses heat or smoke.

15 Design circuit for voting. People can vote if they are a citizen, are 18 and are registered. Conditions = citizen, 18, registered Action = vote

16 Design circuit for R movie. You can go to the R movie if you have $10 and if you are over 18 or accompanied by a parent. Conditions = $10 and (>18 or parent) Action = go to movie

17 Design circuit for safe but economical operations of toxic waste incinerator. Want at least two sensors showing flame to open waste valve.

18 Control valve If any two sensors show flame, open the valve.

19 Design circuit to alert for bad sensors. Add a second output to show sensor agreement.

20 Sensor fault alarm If sensor 1, 2 and 3 don’t agree, then show sensor fault.

21 Try this problem Your home watering system will water the lawn if it is an odd day of month and the clock shows the preset time but not if the rain gage shows over 0.1 inch of water. The system will shut off when the timer has reached 5 minutes.

22 Homework - design a toy car circuit using AND, OR & NOT.

23 Homework Design your toy car circuit using AND, OR, & NOT gates.

24 RW on when LS or CS on. LW on when RS or CS on.

25 RW on (to seek) when no sensors are on.

26 Combine parts.

27 What if you want the car to turn when both two sensors see it.

28 Computers make all logic decisions with one type of electronic gate. All math operations can all be done with one type gate. The most sophisticated computer can be made from only this gate. Computer chip with 4 NAND gates.

29 NAND is a NOT and an AND gate. ABQ 001 011 101 110 ABQ 000 010 100 111  Not

30 Make a NOT gate from NAND gates. AQ 01 10

31 Make an AND gate from NAND gates? ABQ 000 010 100 111

32 Make an OR gate from NAND gates. ABQ 000 011 101 111

33 Convert the control valve circuit to NAND gates. NOT AND OR

34 Convert the sensor fault alarm to NAND gates and simplify the circuit. If sensor 1, 2 and 3 don’t agree, then show sensor fault. NOT AND OR

35 NAND chips 14 pins Four NAND gates Careful of I/O numbering Reversed on different sides DC +5 volts on pin 14 Ground on pin 7

36 Map circuit design to chip locations. chip 6 4 3 2 1 5

37 Cable from robot car

38 The IC chips fits on a breadboard. Connect wires between pins. Each row is electrically connected.

39 Homework Convert your toy car circuit from AND, OR, & NOT gates to NAND gates and simplify to 2 chips max. Number all gate I/O with chip pin numbers.


Download ppt "Homework - Write Truth Tables for toy car. You will design a simple digital circuit to make a toy car follow a flashlight. The car has three light sensors."

Similar presentations


Ads by Google