Photo Resistor Input with LabVIEW Virtual instruments



Bill Marchese / Manny Hernandez ET-360/L

Photo Resistor Input with LabVIEW Virtual instruments Part 1

1) Objective of Lab:

a. The following concepts will be introduced and applied with a photo resistor, LabVIEW application and its interface.

2) Procedure:

Photo Resistor, 10 k pot and DAQ Connections

Schematic [pic]

3) Schematic:

Attach DAQ to computer through USB cable.

a. Photo resister and 10 k Potentiometer

i. Photo Resister +5V pin 31

ii. DAQ Ground pin 32

iii. Photo Resister + AI 1 pin 5

iv. DAQ Ground pin 6

v. 10k pot + AI 1 pin 5

vi. 10k pot and wiper Ground

Block Diagram Panel

1) Place a While loop on the Block Diagram

a. Right Click

b. Express

i. Exec Control

1. While loop – make sure all components are inside

2) Place DAQ assistant inside while loop (on left hand side) on the Block Diagram

a. Right Click

b. Express

i. Output

1. DAQ assistant

ii. NI-DAQ create new express task

iii. Acquire signal: analog input AI1

c. Right Click DAQ assistant select properties

i. Under configuration should read voltage

ii. Signal input - Max 5 and Min 0

iii. Selected units – volts

iv. Acquisition mode – N samples

v. Sample to read – 50

vi. Rate (Hz) – 50

vii. an

3) Place comparator top center of Block Diagram Panel.

a. Express (Right click block diagram)

i. Arithmetic and Comparison

1. Comparison (click comparison?)

b. Right click comparator / select properties

i. Under compare condition select less or equal

Front Panel

4) Place waveform graph bottom center of Front Panel

(Right click front panel)

a. Express

i. Graph indicator

1. Waveform Graph

b. Right click waveform graph select properties

i. Appearance tab

1. Under label check off visible (select visible if not already checked)

2. Under visible type in Amplitude

ii. Format and Precision tab

1. Under Type select Automatic formatting

2. Digits - 6

3. Under Precision Type select the following

a) Digits of precision (check box below digits of precision)

b) Check off hide trailing zeros

5) Place Meter (call it Light level) on top center of waveform graph on Front Panel

(Right click front panel)

a. Express

i. Numeric Indicators

1. Meter

b. Right click Meter select properties

i. Appearance

1. Under label check off visible (select visible if not already selected)

2. Under visible type in Light Level

ii. Format and Precision

1. Floating point

2. Digits enter 6

3. Precision type – Significant digits

6) Place Boolean on the left side of the meter.

a. Control

i. Boolean

1. Select square or round LED

b. Right click Boolean and select properties

i. Appearance

1. Under label check off visible

2. Under visible type in Low Light

3. Under colors choose for on and off

7) Place pointer slider select on the left side of the meter.

a. Control

i. Numeric

1. Vertical Pointer Slide

b. Right click Vertical Pointer Slider select properties.

i. Appearance

1. Under label (check off visible?)

2. Under visible type in Low Set

3. Under colors select colors

ii. Format and Precision

1. Select Automatic formatting

2. Digits – 6

3. Precision type Significant digits

4. Check off Hide Trailing zeros

8) Wire the Block Diagram as shown in illustration.

a. For information

i. Blue and white stripe wire is wire.

ii. Orange wire is constant

iii. Green wire is Boolean

4) Challenge (Modification):

a. How can you turn on the low light LED so it turns on when a brighter light source goes over the photo resistor?

b. How do you calibrate the photo resistor for different light levels?

5) Analysis:

a. Answer the following questions in written paragraph form and turn in next week:

i. What is the function of the photo resistor and the potentiometer in series?

ii. How can you determine if you are mid range voltage with your potentiometer?

iii. How is the DAQ used in both digital and analog mode for this exercise?

6) Write-up:

a. Do not write a formal lab report.

b. Turn in a snap shot of the Front Panel and Block Diagram.

c. Explain and answer the above questions.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download