Classes/2010/VIS147A/Lab3
From Robert-Depot
Contents |
Lab 3 - Switches, Logic, Loops
Topics
- Learn about the variety of switch types:
- Push Button switches: Normally Open (NO) and Normally Closed (NC).
- Throw Switches: incl. SPST, SPDT, DPST, DPDT
- Boolean Logic: True, False, AND, OR, NOT, NAND.
- Relays.
- A Latch: one bit of information. Simple Set/Reset latch
Supplies
- 1 SPST Normally Open (N.O.) switch
- 1 SPST Normally Closed (N.C.) switch
- 5V, 40mA relay PB370-ND [1]
- 1 light bulb.
- Red and black hookup wire.
- Wire strippers, clippers, and pliers.
- Ridiculous Knife Switches (DPDT, available in class).
Activities
Normally Open (N.O.) and Normally Closed (N.C.)
Using the continuity setting on your multimeter, determine which is your Normally Open (N.O.) and which is your Normally Closed (N.C.) pushbutton switch. Building a simple switch and light bulb circuit, test out how each one behaves (i.e. directly experience it for yourself):
Selector Switch
- With the ridiculous knife switches available in class, build a simple "selector switch" that turns on one of two bulbs:
AND gate
- Build an AND gate and verify its behavior (by drawing and completing a truth table similar to those from lecture):
OR gate
- Build an OR gate and verify its behavior (with a truth table):
Relay
- Familiarize yourself with the 5V relay, using the data sheet if you are stuck [2]
- Which pins go to the coil?
- Which pins are the contacts that get switched?
- Is the relay Normally Open(NO) or Normally Closed (NC)?
- Using the multimeter for current sensing, how much current does the relay coil draw?
- With the relay, build a simple S-R latch:
- Now, turn the latch into a pixel:
- Congratulations You have built yourself one bit of digital memory and simple digital display!
Logic, generally
- Now, returning to the idea of logic, label one side of a knife switch "TRUE" and the other side "FALSE".
- Working in small groups, use multiple knife switches (say five or more) and build a circuit that responds to a complex input. For instance, my circuit has five switches ("A" through "E") and one Light Bulb ("O"). The lighbulb, O, only turns on if switches A, C, and D are True, and switches B and E are false.
- Build your circuit and show that it works.
- Represent that circuit as a logical statement, for ex.: O = (A + C + D) + (!B + !E)
- Draw that circuit as a diagram.