Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 102 Engineering Computation Chapter 11 LabJack Photo Resistor & Mechanical Switch Interface Dr. Herbert G. Mayer, PSU Status 9/2/2015 For use at CCUT.

Similar presentations


Presentation on theme: "ECE 102 Engineering Computation Chapter 11 LabJack Photo Resistor & Mechanical Switch Interface Dr. Herbert G. Mayer, PSU Status 9/2/2015 For use at CCUT."— Presentation transcript:

1 ECE 102 Engineering Computation Chapter 11 LabJack Photo Resistor & Mechanical Switch Interface Dr. Herbert G. Mayer, PSU Status 9/2/2015 For use at CCUT Fall 2015

2 Syllabus LabJack HW Overview LabJack Features LabJack HW Control Input & Output Channels Digital Input Output\Analog Input Analog Output Summary

3 2 Photoresistor A photoresistor, or photocell, is a semiconductor device whose resistance depends (inversely) on the incident light intensity. Symbol: illumination increases  resistance decreases

4 3 Connect photoresistor to analog FIO channel LabJack AIN Sense VS RpRp V in You need to add the external resistor R. R Read AIN: LabJack AIN Sense VS RpRp V in R ← OR → Read AIN: Issues: AIN range is 0 to +2.44 V Sensitivity of response depends on R

5 4 Mechanical Switch A switch is a component that can interrupt or divert electric current in a circuit. Symbol: Mechanical switches have “contact bounce”. Courtesy of Wikimedia Commons SPST SPDT Pushbutton

6 5 In the lab exercises and project, a mini push button switch (SPST, momentary ON) is used. Switch Input → Left two pins are internally connected together (same node) Switch Output → Right two pins are internally connected together (same node ) 1 1 1 Schematic view 1

7 6 Connect switch to digital FIO channel: SW pushed → V in = 0 V Digital value read is 0. SW released → V in = +3.3 V Digital value read is 1. +3.3 V Sense 100K Ω LabJack FIO Internal circuit – You do not need to build this. SW Assume switch is normally open. V in Read FIO: If 0 → SW pushed (ON) If 1 → SW released (OFF)

8 7 Connect switch to analog FIO channel (AIN): SW pushed → V in = 0 V SW released → V in = VS Threshold value = VS / 2 LabJack AIN SW Assume switch is normally open. Sense VS 1K Ω V in You need to add the external pull-up resistor. Read AIN: If V in < VS / 2 → SW pushed (ON) If V in ≥ VS / 2 → SW released (OFF)

9 8 What if there are not enough FIOs available to support multiple switches? Example: Connect three switches to a single FIO channel on the LabJack. → Configure the FIO for analog input (AIN) and connect the switches to a voltage divider network. AIN LabJack VS R up R1R1 R2R2 SW 0 SW 1 SW 2 V AIN


Download ppt "ECE 102 Engineering Computation Chapter 11 LabJack Photo Resistor & Mechanical Switch Interface Dr. Herbert G. Mayer, PSU Status 9/2/2015 For use at CCUT."

Similar presentations


Ads by Google