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

Measurments and instrumentation Project report

Faculty of Engineering and Technology The University of Jordan, Amman-Jordan

Light meter design project


Done by : Safaa Nayef Alwreadat (0046401) Nadeen Mother Habash(0046431) Alaa hesham al-shubbak(0048030) Baraah Mohammed alhesa(0046386) Manal al-khtib ( 0025493)

30 DECEMBER 2007

TABLE OF CONTENTS
Abstract1 Introduction.. Application.. Theory. Procedure. Data collection Discussion Conclusion.. System description. Source of errors .. References Code

ABSTRACT
This project use a light dependent resistor (LDR) as a sensor of the light ,to build a lightdensity meter and calibrate it against the lux meter By using the Lux and multimeter the relationship between the light and the resistance is found also the maximum and the minimum values of resistance are taken then the DC bridge circuit is built which used to found the relationship between the resistance(or the light) and the output voltage . Anumber of reading for the output voltage is taken with the corresponding lux values and a relation ship with the least resolution between them was found using excel program A 16f876 pic microcontroller is used and the code was written using c program to take two analogue inputs relates to the output voltage and convert it to digital then substitute it in the relation ship and display the value of the lux on the LCD Finally the simple circuit which contain the LDR and other resistors can give the value of LUX at any light density

INTRODUCTION:
LDRs or light dipendant resistors are very very useful sensor especially on light/ dark sensor . normally the resistance of an LDR is very high , but they are illuminated with light resistance drop dramatically . Everything has an electrical resistance, some more than others. An LDR will have a resistance that varies according to the amount of visible light that falls on it. A close up of an LDR is shown below:

Figure1 : a light dependent resistance

The light falling on the brown zigzag lines on the sensor, causes the resistance of the device to fall. This is known as a negative co-efficient. There are some LDRs that work in the opposite way i.e. their resistance increases with light (called positive co-efficient).

THEORY:
The internal components of a photoelectric control for a typical American streetlight. The photoresistor is facing rightwards, and controls whether current flows through the heater which opens the main power contacts. At night, the heater cools, closing the power contacts, energizing the street light. The heater/bimetal mechanism provides a built-in time-delay. A photoresistor or LDR is an electronic component whose resistance decreases with increasing incident light intensity. It can also be referred to as a light-dependent resistor (LDR), photoconductor, or photocell. A photoresistor is made of a high-resistance semiconductor. If light falling on the device is of high enough frequency, photons absorbed by the semiconductor give bound electrons enough energy to jump into the conduction band. The resulting free electron (and its hole partner) conduct electricity, thereby lowering resistance. A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its own charge carriers and is not an efficient semiconductor, eg. silicon. In intrinsic devices, the only available electrons are in the valence band, and hence the photon must have enough energy to excite the electron across the entire bandgap. Extrinsic devices have impurities added, which have a ground state energy closer to the conduction band since the electrons don't have as far to jump, lower energy photons (i.e. longer wavelengths and lower frequencies) are sufficient to trigger the device. If a sample of silicon has some of its atoms replaced by phosphorus atoms(impurities), there will be extra electrons available for conduction. This is an example of an extrinsic semiconductor.

Wheatstone Bridge
The Wheatstone bridge is a type of d.c. bridge that is used for precision measurement of resistance from approximately 1 ohm to the low mega-ohm rangerange. A typical Wheatstone null type bridge is shown in Figure 1 below. An excitation voltage source is used to operate the bridge (Vi). A galvanometer is used to connect the mid-points of the right hand side voltage divider (made up of R2 and R4) and the left hand side voltage divider (made up of R1 and R3). The galvanometer connection between the two mid-points form a bridge between the two sides, hence the name of the device. When used as a null type device, it can produce an accurate measurement of resistance. When used in the deflection type mode, it can produce a change in an output voltage that is proportional to a change in the sensor under question (a resistor). The change in the resistance of the sensor is representative of a change in the value of an external variable (e.g., stress, force, temperature). The null type mode is more accurate than the deflection type mode, as the error in the former case will be in the mV or V compared to fraction of a volt in the latter case A wheatston bridge is used to find the output voltage that corresponds to the values of the (LDR) that changes according to the light density(LUX)

Figure 4: a dc null type bridge (wheatstone bridge)


LDR R2 Vo = Vi LDR R R + R 3 2 4

Then

ldr R2 = ldr + R R 2 + R4

APPLICATION:
Photoresistors come in many different types. Inexpensive cadmium sulphide cells can be found in many consumer items such as camera light meters, clock radios, security alarms, street lights and outdoor clocks.

They are also used in some dynamic compressors together with a small incandescent lamp or light emitting diode to control gain reduction. Lead sulphide- and indium antimonide-LDR are used for the mid infrared spectral region. At the other end of the scale, Ge:Cu photoconductors are among the best far-infrared detectors available, and are used for infrared astronomy and infrared spectroscopy

PROCEDURE :
1- at the first the sensitivity of the light dependant resistors (LDR) was measured by imposed it under maximum and minimum light intensity using the lux meter then take the corresponding resistance using amultimeter . 2- select the values of the Wheatstone bridge resistances by solved the equation which gives the relation between the resistors of the DC Wheatstone bridge and takes the input voltage equal to 4V . 3- connect the whetstone bridge on bred board including LDR which is the variable resistance . 4- apply 4V DC on the input terminal of the bridge . 5- at many different value of light intensity concentrated on the LDR measure the corresponding change in voltage across the out put terminal of the bridge which represent the change on resistance of LDR .

6- then find the relation ship between the light intensity and and change in voltage using excel software . 7- after that we write an a c code which take an analogue value (voltage) and convert it to digital , then this value enter to the previous relation shop to get the corresponding light intensity . 8- before triyng the program on hadware it is tested by software using pic simulater programe analogue values were input to the pic and the corresponding lux value were diplayed on the LCD module in the pic simulater program 9- After testing the program on software the program was applied to the hardware circuit 10- finally , the value of the light intensity in (lux) displayed on an LCD module.

SYSTEM DESCRIPTION:

Figure: light meter circuit The component of the circuit: DC Power supply Pic16f876 Resistors ,Capacitors Voltage regulater
Multi-meter

LCD

DATA COLLECTED
Table(1)
light intensity(lux) 0.1 0.2 0.3 0.5 0.7 0.5 0.9 1.4 3.3 3.8 6.6 6.7 5.2 5 4.9 7.3 4.5 8.2 9.3 12.2 10 10 50 70 11 160 30 140 40 0.5 20 3.2 4.8 5.5 7.1 6.3 voltage reading(V) 3.5 3.1 3.03 2.95 2.8 2.94 2.5 2.3 1.95 1.92 1.4 1.36 1.5 1.5 1.6 1.35 1.7 1.28 1.16 1.08 2.7 1.25 1 0.7 1.78 0.35 1.26 0.45 1.1 3 1.44 4 3.5 3.3 2.6 2.7 light intensity(lux) 7.8 10 9.2 10.5 14.5 13 14.2 11.8 11.4 12 15 19 17 37 32 42 50 57 62 65 73 78 89 92 96 100 111 120 130 150 180 190 220 210 250 230 voltage reading(V) 2.5 2.1 2.2 2.06 0.93 1.01 0.97 1.11 0.9 0.93 0.8 0.71 0.75 0.5 0.56 0.46 0.41 0.38 0.36 0.347 0.305 0.292 0.277 0.275 0.27 0.253 0.224 0.206 0.193 0.166 0.121 0.116 0.101 0.111 0.096 0.1

DISCUSSION
The maximum value of LDR at the minimum lux =560 k The minimum value of LDR at the maximum lux =120 To find the value of the resistors of the DC bridge we use the equation

Figure 5: a deflection type dc bridge


LDR R2 Vo = Vi LDR R R + R 3 2 4

@ LDR=120 assume Vo=0 ldr R2 = Then ldr + R R 2 + R4


120 R2 = 120 + R3 R 2 + R4

Let R3=R4 then R2=120 @ LDR=560k assume Vo=5

560 .12 5 = Vi 560 + R .12 + R in k 3 4

Assume R3=R4 R42+(560.12-111.976 Vi)R4 +67.2=0

.12111 .976 *Vi) (560 .12111 .976 *Vi) + 268 .8 (560 R4 = 2


2

By trying we found that the best value for Vi is equal to 4Volt and R3=R4=500K In this project two resistors of 1mega ohm were used in parallel to obtain one resistance of 500 kilo ohm And three resistor of 100,10.10 were used in series to obtain 120ohm By using the lux meter we see that the relationship between the resistance and the light is inverse when the light increases the value of the LDR decreases and vise versa

From the data collected the best relation between the light intensity with the voltage readings is Y= 20.308*x -2.585 The error is : R^2= 0.6707 This equation used in the code
350

300
2

y = 20.308x
250 light intensity (lux)

-2.5185

R = 0.6707

200

150

100

50

0 voltage(V)

Series1 1

Figure3:the relationship between light intensity versus voltage

CODE
//included file needed in our code #include<16f876.h> #use delay(clock=4000000) #include<lab4.c> #include<LCDFunction.h> #include<16F876reg.h> #include <stdlib.h> #include <math.h> main() { float resulto,temp,voltage; int16 value1,value2; lcd_init();

//define the variable used //value1 &value2 //intialize for the LCD

while(true) { setup_adc_ports( All_Analog ); //intialize analoge to digital ports setup_adc( ADC_CLOCK_INTERNAL ); //initialize clock @which the Adc will convert //switching between 2 channels to find the output voltage //delay must be used to correct changing between the two channels set_adc_channel( 0 ); delay_ms(50); value1 = Read_ADC(); set_adc_channel( 1 ); delay_ms(50); value2 = Read_ADC(); voltage= (value1-value2); //to convert the value of voltage to digital voltage = (5*voltage);

//reading the analoge value1

//reading the analoge value2 //out voltage from H bridge

voltage /= (1023 ); //subtitute the voltage value in the equation //the equation is "Lux= 20.308*voltage -2.585 " temp = (float)pow (voltage,-2.585 );//-2.585 resulto=(float)(20.308* temp); DisplayResult(resulto); //lux value will display on LCD as float number delay_ms(500); //delay needed to allow user to see the Lux value on LCD } }

CONCLUSION
The program written was succeed when tested using software and the results were identical to the expected ones, but when applying the program to the hardware circuits the results were not accurate theire were sources of errors some of them are known some are not.

SOURCE OF ERRORS
Systematic error Inaccuracy in resistors ,in power supply , Environmental error like temperature Personal error Error in the instrument used ( lux meter ,multimeter) Random error Unknown noise

REFERENCE
http://www.mstracey.btinternet.co.uk/technical/Theory/theorysensors.htm

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