Opto-Transistor Lab

Opto-Transistor Lab - 1COMPUTER ENGINEERING Name...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1COMPUTER ENGINEERING Name:________________________ Opto-Transistor Lab (Infra Red Emitter / Receiver) Name: ________________________ Purpose: To build a photo gate made up of an emitting diode and an opto-transistor. These are often called an emitter and receiver. I3 I0 Parallel port cable I4 Input Ports Theory: In order to allow information to be received through the parallel port, I0 to I4, the parallelget command is used. The input ports are shown above. Each computer has its own unique value when the port is open or closed . Procedure: Use the following program to determine the open and closed values for each of the 5 input ports. Run a piece of wire between each input port and ground. The value when the lead is in the port is the closed value. loop put parallelget end loop Data-in Address I0 I1 I2 I3 I4 Pin Number 10 11 12 13 15 Closed Value Opened Value Theory: The opto-transistor and emitter come in pairs. When the emitter, the coloured one, is activated, the light given off falls on the receiver and a current will flow through it. If the light beam is broken the computer will receive a certain signal, if the light beam is not broken then the computer receives a different signal. Note: From the diagrams shown below the opto-transistor or receiver is built opposite to a regular LED. Here the long leg is the negative lead. Procedure: 1. Connect the wires, as shown below, so that the emitter is connected to the first output pin (D0) and a receiver to the fourth input pin (I3) on the parallel port. NOTE: 2. Fold both sensors about 90 degrees so they face each other, about 3 holes apart as shown above. Use the program below and the value you found on page one to determine if the light beam is broken between the emitter and receiver. parallelput (1) loop if parallelget = (closed value) then put “LIGHT BEAM IS ON” elsif parallelget = (open value) then put “THE LIGHT BEAM IS BROKEN” end if end loop Assignment: 1. Adjust your program from the previous page so that when the light beam is broken a sound will occur. Use the command: play (“a,b”). 2. From our text book read pages 116 and 117 Opto-Transistor (receiver) and page 378. Give a detailed explanation how a receiver and emitter function. ...
View Full Document

This note was uploaded on 02/10/2011 for the course ICE 4M1 taught by Professor Deabr during the Spring '11 term at Spring Arbor University.

Ask a homework question - tutors are online