Вы находитесь на странице: 1из 4

** Not applicable for Sessional group A1 (Group 2,3 & 4)

Chittagong University of Engineering and Technology


Chattogram-4349, Bangladesh
Department of Electrical and Electronic Engineering
EEE 354 (Measurement and Instrumentation Sessional)
Experiment 1: Determination of sensitivity of a light sensor and further calibration
Objectives:
 Conversion of Physical variable (Light intensity) into electrical variable (voltage)
 To determine the relation between light intensity and sensor output voltage
 To construct an instrument that measures light intensity and display the value
refereed to a reference meter

Working Procedures:

The instrumentation is divided into 3 sections:


 Sensor design and data collection
 Curve Fitting with experimental Data to obtain the sensitivity of sensor
 Instrumentation and further calibration if needed

Sensor design and data collection:


Light dependent resistor (LDR) is calibrated with a reference Digital Luxmeter as a sensor.
An LDR is connected in series with a resistor (10k) and 5v power supply is applied as shown
in Fig.1. When applied light into LDR is increased then resistance of LDR is decreased. As
total resistance in the series branch is decreased; current increased and voltage across 10k
resistance is increased.

Fig.1. An Light dependent resistor is connected in series with a 10K fixed resistance

Curve Fitting with experimental Data to obtain the sensitivity of sensor:


An experiment is obtained in Circuit and Measurement Lab with a reference Digital
Luxmeter. Sensor of luxmeter and LDR sensor is put in the same distance from light
source. The change of LDR sensor voltage is observed with increasing or decreasing
intensity of light souece is given bellow as in Data table: 1.

© Dept. of EEE, CUET


Prepared by E.M.K. Ikball Ahamed
** Not applicable for Sessional group A1 (Group 2,3 & 4)

Data table:1
Lux (y) Vsensor (X) Lux (Y) Vsensor (x)
80 2.39 320 3.58
100 2.5 490 3.8
100 2.56 800 3.9
140 2.94 560 3.943
200 3.25 670 4.2
230 3.29 890 4.25
250 3.45 1020 4.3

Vsensor is then converted to the value of lux according to the sensitivity of Calibrated
Ldr.

Sensitivity equation: Choosing the best fit in MATLAB

= . − + − ; , =

Instrumentation:

The output voltage from the sensor is converted to a 8-bit digital number using the
internal ADC of the PIC 16F73. Vref is Vdd, and the ADC is 8 -bit. So, any input voltage from 0-
5 volt will be mapped to a digital number between 0-255. The resolution of ADC is 5/255
=19.6 mV/Count (step size of Quantization). Therefore, the digital output corresponding to
any input voltage Vin (binary) = Vin/19.6 mV.

Resolution of Vsensor measurement = 19.6 mV


I/P analog voltage = 19.6 * 8-bit count (mV)
Measured Vsensor = 19.6 * 8-bit count (mV)

Connection related to instrumentation and calibration will be covered in sessional


class.

Code:

// LCD module connections


sbit LCD_RS at RB7_bit;
sbit LCD_EN at RB6_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB3_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB1_bit;

sbit LCD_RS_Direction at TRISB7_bit;


sbit LCD_EN_Direction at TRISB6_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB3_bit;

© Dept. of EEE, CUET


Prepared by E.M.K. Ikball Ahamed
** Not applicable for Sessional group A1 (Group 2,3 & 4)

sbit LCD_D6_Direction at TRISB2_bit;


sbit LCD_D7_Direction at TRISB1_bit;
// End LCD module connections
float v,va,vd;
char txt[15];

void Display()
{
Lcd_init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_cmd(_LCD_CURSOR_OFF);
if(vd!=0)
{
Lcd_out(1,1,"Intesity in lux");
Lcd_out(2,12,"Lux");
floattostr(vd,txt);
Lcd_out(2,1,txt);
}
}
void main()
{
ADCON1=0b00000000; // configure - - - - - 000
trisa=0b11111111; // All pins of port A are declared as i/p
Lcd_init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_cmd(_LCD_CURSOR_OFF);
Lcd_out(1,1," LUX METER ");
while(1)
{
v = ADC_Read(0); //Digital level count, read from RA0
va=(v*4.9)/255; //analog voltage read, multiplying digital
level with resolution, Vref=4.9V
if(va>2)
{
vd=(174.4*va*va*va)-(1403*va*va)+(3862*va)-3500;
//Fitted curve, vd is lux
}
else
vd=0;
Display(); //Display Function call and return values
Delay_ms(200);
}
}

After breadboard implementation, please check the results with “REFFERENCE


LUXMETER” and % deviation.

Report Submission:
Submit a printed copy of mini report (not more than 6 pages)
including all working steps, figures, tables, explanations and
equations along with the photocopy of raw files of class work and
home work attached in back.

© Dept. of EEE, CUET


Prepared by E.M.K. Ikball Ahamed
** Not applicable for Sessional group A1 (Group 2,3 & 4)

The sessional sheet is just a guideline; please don’t copy the


document blindly for report writing.

© Dept. of EEE, CUET


Prepared by E.M.K. Ikball Ahamed

Вам также может понравиться