Title: Computer Engineering Activities Infra Red Security Interface SI 2004
1Computer Engineering ActivitiesInfra Red
Security InterfaceSI 2004
- Graham Smyth
- smythel_at_mnsi.net
2Computer Engineering Units
- Grade 10/11/12
- 1. Hardware
- 2. Networking
- 3. Integrated Circuits
- 4. Programming
- 5. Interfaces
3Interfacing Activities
- Grade 10
- One bit
- Three LEDs
- LED simulators
- ASCII
- Binary counting
- Light patterns
- Intersections
- AC ???
- Grade 11
- One bit
- One byte
- DC motor
- Bi-directional
- LED traffic light
- LED intersection
- Demultiplexer
- GUIs
- Mouse control
- AC ??
4Interfacing Activities
- Grade 12
- One byte
- LED intersection
- Stop Lights AC?
- Vehicles
- Security systems
- Drag strips
- Music Box
- Latches
- Marquees
- GUIs/Mouse Control
5Introduction to Traffic Lights
6Traffic Lights
7Traffic Lights
8Introduction to Motors
9Motors
10Breadboard Connections
Connected
High Fives
Divider
Low Fives
Connected
11Security Software
Turing
- parallelput(number) - reads 8 pins
- put parallelget - reads 5 pins
- mousewhere(x,y,click)
- play(CDEFG)
- drawline(x1,y1,x2,y2,red)
- Provincially licensed
12Interfacing System Unit 5
Computer Interface Peripheral
- Wires
- ICs
- Resistors
- Capacitors
- Transistors
- LED's
- Motors
- Lights
- Robots
- Music Box
- Joysticks
Wires
Wires
13Security System Project
- Develop a security system based on infra red
beams. The system should include - Two IR beams.
- When either or both beams are broken then
corresponding LEDs should be activated to warn
the users that intruders have entered the
premises. - Additional features will be added as time
permits.
14Hardware Required
- 4 pair cable
- Short wires for jumpers
- Two LEDs
- Two emitters (here white)
- Two receivers (here dark coloured)
- Two 10k resistors (brown/black/orange)
- Four 220 resistors (red/red/brown)
- Breadboard
- D sub connector
- 8 male pins
- 7805 regulator
- Power supply
15Hints and Tips
- Buy in pairs
- Clearly identify emitter and receiver
- Clearly identify polarity ( and legs)
- Buy according to application
- Check ratings (voltages required)
- Test emitter with LED (or multimeter)
- Test collector with flashlight
- Build one step at a time
- Demonstration/ testing model
16Security Hardware - Resistors
1 0 X 103
Red Red
Brown Gold
Tolerance -5
Resistors 220 ohm red/red/brown 10K
ohm brown/black/orange
17Resistor Chart
18Security Hardware Cable D sub to Breadboard
Male Pin
Insulated Wire
Small Crimp Tab
Stripped Wire
Large Crimp Tab
Need White/Brown, Brown, White/Green, White
Orange, White Blue
19 D Sub Connector /Harness
20 4 Pair Colour Code
White/Blue
Blue
White/Orange
Orange
White/Brown
Brown
Green
White/Green
21Security Hardware Parallelport
Input I0 I3
Output D0 D7
13 12 11 10 9 8 7 6
5 4 3 2 1
25 24 23 22 21 20 19 18 17
16 15 14
Input I4
Grounds 18 - 25
View from back of Computer
22 D Sub Connector
Pin 10
Pin 2
D sub Connector
Pin 18
23D Sub Connector Colour Code
24D Sub Connector Wires
Pin 2 White/Brown is the Second Hole Down Bottom
ROW
Pin 3 Brown - 3 Down
Pin 18 White/Green Top Row 5 Down
Short side on top
Pin10 White/Orange 4 holes from bottom
Pin 11 White/Blue 3 holes from bottom
25Photo Gates
Here 5V
26Voltage Regulator (7805)
7805
Input Voltage
Output Voltage5V
Ground
27Regulator
7805
Input Voltage
Ground
28Powering Breadboard
5V
Ground
29Photo Gates Emitter /Receiver
Emitter
Receiver
Bump Front
-
-
30Emitter 1
220 ohm
-
Jumper1
31Receiver 1
Brown/Black/Orange
White/Orange From pin 10
-
Jumper 2 - Aligned
White/Green Pin18
32SoftwareReceiver 1
loop put parallelget Returns input pin
number end loop
- Beam parallelget value
- Not broken X
- IR 1 Broken Y
33Emitter Receiver 2
Red/Red/Brown
Brown/Black/Orange
-
Jumper 4 Aligned
Jumper 3 Aligned
34Emitter Receiver 2
White/ Blue
35SoftwareReceiver 1 and 2
loop put parallelget Returns input pin
number end loop
- Beam parallelget value
- None broken X
- IR 1 Broken Y
- IR 2 Broken Z
- IR 1 and 2 Broken W
36IR with LEDs
Red/Red/Brown Aligned (2)
Two LEDs
Jumper 6
Jumper 5
37IR with LEDs Connected
White/Brown
Brown
38IR and LED Software
- var value int
- loop
- value parallelget
- put value
- if value X then
- parallelput (0) LEDs Off
- elsif value Y then
- parallelput (1) Activates LED1
- elsif value Z then
- parallelput (2) Activates LED2
- elsif value W then
- parallelput (3) Activates LED1 and 2
- end if
- end loop
39Level 4 Enhancements
- Add sound to the IR system where one note is
played when the first IR sensor is broken (ex
C), another note when the second is broken (ex
E), and a third note when both are broken (ex
G). - Display the message Sector 1 has been
infiltrated when beam 1 is broken. Similar
messages for beam 2, and also beam 1 and 2.
Display Situation normal when no beams are
broken. - Add a GUI representing the two LEDs. Activate the
GUI at the same time as the real world LEDs are
activated. - Add an additional arming feature where each IR
system can be armed individually. - Add an annoying buzzer system the will activate
when either IR beam is broken. - ???Innovative???
40Addresses
smythel_at_mnsi.net www.classictechnology.ca www.ho
ltsoft.com