Project Report

25
IQRA UNIVERSITY FACULTY OF ENGINEERING SCIENCE AND TECHNOLOGY LIGHT INTENSITY METER Student : Zubair khan Instructor : Dr Abid Kareem & Muhammad Kashif Majeed Course: INTEGRATED ELECTRONIC Bachelor of Engineering Electronics December 2013

description

Semester Project Report

Transcript of Project Report

Page 1: Project Report

IQRA UNIVERSITY FACULTY OF ENGINEERING SCIENCE AND TECHNOLOGY

LIGHT INTENSITY METER

Student : Zubair khan

Instructor : Dr Abid Kareem & Muhammad Kashif Majeed Course: INTEGRATED ELECTRONIC

Bachelor of Engineering Electronics December 2013

Page 2: Project Report

ACKNOWLEDGEMENT:

I would like to express my deepest appreciation and gratitude to my teacher Mr. Kamran Khan for

his advice and guidance throughout the project. He has provided me valuable direction and

suggestions during this project. I would also like to express my appreciation to my classmates who

have given me ideas on how to design the lux meter or light intensity meter.

Project Objective:

This project aims to design and develop an inexpensive and accurate light intensity meter

basically using only electronics components. It also provides an opportunity to apply the

knowledge of electronics module to design a prototype of a product.

Description:

Here is lux meter or light intensity meter circuit that has many many applications in real

world but the main application of this meter is use for measuring light intensity.

Research:

Background study and literature review

Discussion on Ideas and Concepts

Technical Design and Modeling

Testing and Evaluation of Ideas

Implementation

Hardware Development:

Components selection and Circuit Simulation

Design Implementation

Testing and Troubleshooting

Pcb Designing And Fabrication

Modifications and Improvements

Design prototype casing

Page 3: Project Report

Block diagram:

Page 4: Project Report

Components

9V== Dc Adaptor

PCB board (Square Print) 5"x 8"

Op-Amp LM324 ( Quad Op-Amp)

Capacitor 47 uf 35 volt

Resistance 1/4 watt 10Ω,100,10K,1K

Battery connector

Terminal block

Variable resistor 2.2k

SN74LS147 3-LINE PRIORITY ENCODERS

HD74LS04 HEX inverter

Ldr light-dependent resistor

Common anode 7 segment display

LED light emitting diode 3 mm

Silicone glue sticks

Jumper wires

Equipment required

Digital multimeter

Soldering iron/ wire

Oscilloscope

Plier set

Screwdriver set

logic probe

Iron saw

Aluminum oxide paper No #1500

Breadboard

Glue gun

Variable power supply

Materials required in pcb designing & fabrication

Over Head Projector sheet

Laser Printer

Electric Iron

Steel wool

Paint thinner

Black permanent marker

Copper board/ PCB

Etching solution (Ferric chloride)

Drill machine

Drill bit 0.5 and 0.8 mm

Page 5: Project Report

Application:

Sensitive Medical Equipment.

Checking lamp or fluorescent tube light illumination.

Automatic solar tracking device.

Measurement Sunlight lux in day time.

light sampling

Checking light intensity in the room.

Automatic streetlights intensity controlled.

Devices Specifications

Function Description

Power requirements dc 5v (800 mA)

Intensity range 0~2000 Lux

Display type 7 segment led display 2 inch

Operating Temperature 30 ~ 65

Device type solid-state control device

Sample rate 1 time/sec

Accuracy ±(3% +30d)

Page 6: Project Report

Operational amplifier:

The standard operational amplifier (op-amp) It has two input terminals, the inverting (-) input and

the non-inverting (+) input, and one output terminal. Most op-amps operate with two dc supply

voltages, one positive and the other negative, as shown in fig , although some have a single dc

supply. Usually these dc voltage terminals are left off the schematic symbol for simplicity but are

understood to be there.

Little History About Op Amp :

The operational amplifier concept originated around 1947. It was proposed that such a device

would form an extremely useful analog building block. The first commercial op-amps used vacuum

tubes, but it was not until the introduction of the integrated circuit did the op-amp start to fulfill its

true potential. In 1964, the first integrated circuit op-amp, designated the 702, was developed by

Fairchild Semiconductor. This was later followed by the 709 and eventually the 741, which has

become an industry standard

Page 7: Project Report

Ideal Op-Amp:

The ideal op-amp has infinite voltage gain and infinite bandwidth. Also, it has infinite input

impedance (open) so that it does not load the driving source. Finally, it has zero output impedance.

Op-amp characteristics are illustrated in Figure. The input voltage, Vin, appears between the two

input terminals, and the output voltage is AvVin, as indicated by the internal voltage source symbol.

The Practical Op-Amp:

Characteristics of a practical op-amp are very high voltage gain, very high input impedance, and

very low output impedance.

Internal Block Diagram of an Op-Amp:

A typical op-amp is made up of three types of amplifier circuits a differential amplifier, a voltage

amplifier, and a push-pull amplifier The differential amplifier is the input stage for the op-amp. It

provides amplification of the difference voltage between the two inputs. The second stage is usually

a class A amplifier that provides additional gain. Some op-amps may have more than one voltage a

Page 8: Project Report

Assembly procedure:

The LM 324 dual op amp chip using as comparator configuration the reference voltage for

each comparator is set by the resistive voltagedividerCircuit and Vref.The output of each

comparator is connected to an input of the Priority encoder. The priority encoder is a digital

device that produces a binary number on its output representing the highest value input.

The encoder samples its input when a pulse occurs on the enable line (sampling pulse),

And a three-digit binary number proportional to the value of the analog input signal

appears on the encoders outputs. Encoder 74ls174 four bits output Q0, Q1, Q2, Q3 connect

to 4 bit input of bcd decoder 74LS48 remain pin of 74LS48 should proper grounded pin

number 7 is connect to ground 14 connect to vcc decoder output pin 9,10,11,12,13,14,15,

connect to seven segment common cathode display used 330 Ω resistor for limit the

current Ldr sensor one lead connect to 5v and other lead connect to 10kΩ variable resistor

pin 1 and remain connect to ground out put taken b/w resistor and lead.

Test Chart:

0

1

2

3

4

5

6

7

8

9

10

0 200 400 600 800 1000 1200

Segm

ent

disp

lay

Light Illuminance

Series1

Linear (Series1)

Page 9: Project Report

Light Sensor LDR [light depended resistor]:

A Photoconductive light sensor does not produce electricity but simply changes its physical

properties when subjected to light energy. The most common type of photoconductive

device is the Photo resistor which changes its electrical resistance in response to changes

in the light intensity. Photo resistors are Semiconductor devices that use light energy to

control the flow of electrons, and hence the current flowing through them. The commonly

used Photoconductive Cell is called the Light Dependent Resistor or LDR.

As its name implies, the Light Dependent Resistor (LDR) is made from a piece of exposed

semiconductor material such as cadmium sulphide that changes its electrical resistance

from several thousand Ohms in the dark to only a few hundred Ohms when light falls upon

it by creating hole-electron pairs in the material.

The net effect is an improvement in its conductivity with a decrease in resistance for an

increase in illumination. Also, photo resistive cells have a long response time requiring

many seconds to respond to a change in the light intensity.

Page 10: Project Report

Voltage Divider Network:

Connecting a light dependent resistor in series with a standard resistor like this across a single DC

supply voltage has one major advantage a different voltage will appear at their junction for

different levels of light.

The amount of voltage drop across series resistor, R2 is determined by the resistive value of the

light dependent resistor, RLDR. This ability to generate different voltages produces a very handy

circuit called a "Potential Divider" or Voltage Divider Network awe know, the current through a

series circuit is common and as the LDR changes its resistive value due to the light intensity, the

voltage present at VOUT will be determined by the voltage divider formula. An LDRs

resistance, RLDR can vary from about 100Ω's in the sun light, to over 10MΩ's in absolute darkness

with this variation of resistance being converted into a voltage variation at VOUT as shown

Resistance Vs illumination graph:

Page 11: Project Report

Analog-to-Digital (A/D) Conversion:

A/D conversion is a common interfacing process often used when a linear analog system must

provide inputs to a digital system. Many methods for A/D conversion are available. However, in

this discussion, only one type is used to demonstrate the concept.

The simultaneous, or flash, method of A/D conversion uses parallel comparators to compare the

linear input signal with various reference voltages developed by a voltage divider.

When the input voltage exceeds the reference voltage for a given comparator, a high level is

Produced on that comparators output. Figure 1316 shows an analog-to-digital converter

(ADC) that produces three-digit binary numbers on its output, which represent the values of The

analog input voltage as it changes. This converter requires seven comparators. In general ,2n_ 1

comparators are required for conversion to an n-digit binary number.

The large Number of comparators necessary for a reasonably sized binary number is one of the

Page 12: Project Report

Drawbacks of the simultaneous ADC, but IC technology has reduced the problem somewhat

by combining multiple comparators and associated circuits on a single IC chip. For

example,

6- or 8-bit flash converters are readily available. These ADCs are useful in applications

that require the fastest possible conversion times, such as video processing.

The Digital Encoder:

Unlike a multiplexer that selects one individual data input line and then sends that data to a single

output line or switch, a Digital Encoder more commonly called a Binary Encoder takes ALL its data

inputs one at a time and then converts them into a single encoded output. So we can say that a

binary encoder, is a multi-input combinational logic circuit that converts the logic level "1" data at

its inputs into an equivalent binary code at its output.

Generally, digital encoders produce outputs of 2-bit, 3-bit or 4-bit codes depending upon the

number of data input lines. An "n-bit" binary encoder has 2n input lines and n-bit output lines with

common types that include 4-to-2, 8-to-3 and 16-to-4 line configurations. The output lines of a

digital encoder generate the binary equivalent of the input line whose value is equal to "1" and are

available to encode either a decimal or hexadecimal input pattern to typically a binary or B.C.D.

output code

4 - to - 2 bit Encoder:

One of the main disadvantages of standard digital encoders is that they can generate the wrong

output code when there is more than one input present at logic level "1". For example, if we make

inputs D1 andD2 HIGH at logic "1" both at the same time, the resulting output is neither at "01" or at

"10" but will be at "11" which is an output binary number that is different to the actual input

present. Also, an output code of all logic "0"s can be generated when all of its inputs are at "0" OR

when input D0 is equal to one

One simple way to overcome this problem is to "Priorities" the level of each input pin and if there

was more than one input at logic level "1" the actual output code would only correspond to the

input with the highest designated priority. Then this type of digital encoder is known commonly as

a Priority Encoder or P-encoder for short.

Page 13: Project Report

8 - to - 4 bit Encoder or [Priority Encoder]:

The Priority Encoder solves the problems mentioned above by allocating a priority level to each

input. The priority encoders output corresponds to the currently active input which has the highest

priority. So when an input with a higher priority is present, all other inputs with a lower priority

will be ignored. The priority encoder comes in many different forms with an example of an 8-input

priority encoder along with its truth table shown below.

Priority encoders are available in standard IC form and the TTL 74LS148 is an 8-to-3 bit priority

encoder which has eight active LOW (logic "0") inputs and provides a 3-bit code of the highest

ranked input at its output. Priority encoders output the highest order input first for example, if

input lines "D2", "D3" and "D5" are applied simultaneously the output code would be for input "D5"

("101") as this has the highest order out of the 3 inputs. Once input "D5" had been removed the

next highest output code would be for input "D3" ("011"), and so on

Page 14: Project Report

The truth table for 8-to-3 bit priority encoder:

The truth table for a 8-to-3 bit priority encoder is given as

Digital Encoder using Logic Gates:

Page 15: Project Report

Datasheet of74LS147 [priority encoder]:

(a) internal logic diagram of 74LS147 (b) pin out of 74LS14or 74148

© recommended operating conditions

(Dip) dual inline package dimensions of 74LS147 or 74LS1478

Page 16: Project Report

Binary Decoder:

A Decoder is the exact opposite to that of an "Encoder" we looked at in the last tutorial. It is

basically, a combinational type logic circuit that converts the binary code data at its input into one

of a number of different output lines, one at a time producing an equivalent decimal code at its

output. Binary Decoders have inputs of 2-bit, 3-bit or 4-bit codes depending upon the number of

data input lines, and a n-bit decoder has 2n output lines

A 2-to-4 Binary Decoders:

A 2-to-4 Binary Decoders Logic diagram:

A Binary Decoder converts coded inputs into coded outputs, where the input and output codes are

different and decoders are available to "decode" either a Binary or BCD (8421 code) input pattern

to typically a Decimal output code. Commonly available BCD-to-Decimal decoders include the TTL

7442 or the CMOS 4028. An example of a 2-to-4 line decoder along with its truth table is given

below. It consists of an array of four NAND gates, one of which is selected for each combination of

the input signals A and B.

Page 17: Project Report

BCD to 7-Segment Display Decoder:

As we saw in the previous tutorial, a Digital Decoder IC, is a device which converts one digital

format into another and one of the most commonly used device for doing this is called the Binary

Coded Decimal (BCD) to 7-Segment Display Decoder. 7-segment LED (Light Emitting Diode) or LCD

(Liquid Crystal Display) type displays, provide a very convenient way of displaying information or

digital data in the form of numbers, letters or even alpha-numerical characters.

Typically 7-segment displays consist of seven individual colored LED's (called the segments),

within one single display package. In order to produce the required numbers or HEX characters

from 0 to 9 and A to F respectively, on the display the correct combination of LED segments need to

be illuminated and BCD to 7-segment Display Decoders such as the 74LS47 do just that.

A standard 7-segment LED display generally has 8 input connections, one for each LED segment

and one that acts as a common terminal or connection for all the internal display segments. Some

single displays have also have an additional input pin to display a decimal point in their lower right

or left hand corner.

In electronics there are two important types of 7-segment LED digital display.

The Common Cathode Display (CCD) In the common cathode display, all the cathode

connections of the LED's are joined together to logic "0" or ground. The individual segments

are illuminated by application of a "HIGH", logic "1" signal to the individual Anode terminals

The Common Anode Display (CAD) In the common anode display, all the anode

connections of the LED's are joined together to logic "1" and the individual segments are

illuminated by connecting the individual Cathode terminals to a "LOW", logic "0" signal

Common Cathode and Common Anode Format:

Page 18: Project Report

7-Segment Display Format:

Electrical connection of the individual diodes for a common cathode display and a common anode

display and by illuminating each light emitting diode individually, they can be made to display a

variety of numbers or characters

So in order to display the number 3 for example, segments a, b, c, d and g would need to be

illuminated. If we wanted to display a different number or letter then a different set of segments

would need to be illuminated. Then for a 7-segment display, we can produce a truth table giving the

segments that need to be illuminated in order to produce the required character as shown below.

Pin out for 7 segment common anode & common cathode

Page 19: Project Report

Truth table for a 7 -Segment Display:

7-Segment Display Elements for all Numbers

It can be seen that to display any single digit number from 0 to 9 or letter from A to F, we would

need 7 separate segment connections plus one additional connection for the LED's "common"

connection. Also as the segments are basically a standard light emitting diode, the driving circuit

would need to produce up to 20mA of current to illuminate each individual segment and to display

the number 8, all 7 segments would need to be lit resulting a total current of nearly 140mA, (8 x

20mA).

Page 20: Project Report

Datasheet for 7-segment decoder [74LS47 or 74LS48]:

(A)Internal logic diagram for 74LS48 (b) Pin out for 74LS48 or74LS47

© recommended operating conditions

Page 21: Project Report

Electrical Characteristics:

Physical Dimensions:

Page 22: Project Report

Schematic diagram:

Page 23: Project Report

PCB [Printed circuit board]layout:

(a) Bottom view(b) silk layer

Page 24: Project Report

PCB [Printed circuit board] Making Process Step by Step.

Step 1: Prepare a layout of the circuit on any commonly used PCB designing software. A layout is a

design which interconnects the components according to the schematic diagram (circuit diagram).

Take a mirror image print of the layout on the OHP sheet using a laser printer. Make sure that the

design is correct with proper placement of the components.

Step 2: Cut the copper board according to the size of layout. A copper board is the base of a PCB, it

can be single layer, double layer or multi-layer board.

Single layer copper board has copper on one side of the PCB, they are used to make single layer

PCBs, it is widely used by hobbyist or in the small circuits. A double layer copper board consists of

copper on both the sides of the PCB. These boards are generally used by the industries. A multilayer

board has multiple layers of copper; they are quite costly and mainly used for complex circuitries

like mother board of PC.

Step 3: Rub the copper side of PCB using steel wool. This removes the top oxide layer of copper as

well as the photo resists layer if any.

Step 4: Place the OHP sheet (wax paper) which has the printed layout on the PCB sheet. Make sure

that the printed/mirror side should be placed on the copper side of PCB

Step 5: Put a white paper on the OHP sheet and start ironing. The heat applied by the electric iron

causes the ink of the traces on the OHP sheet to stick on the copper plate exactly in the same way it

is printed on the OHP sheet. This means that the copper sheet will now have the layout of the PCB

printed on it. Allow the PCB plate to cool down and slowly remove the OHP sheet. Since it is manual

process it may happen that the layout doesnt comes properly on PCB or some of the tracks are

broken in between. Use the permanent marker and complete the tracks properly.

Step 6: Now the layout is printed on PCB. The area covered by ink is known as the masked area and

the unwanted copper, not covered by the ink is known as unmasked area. Now make a solution of

ferric chloride. Take a plastic box and fill it up with some water. Dissolve 2-3 tea spoon of ferric

chloride power in the water. Dip the PCB into the Etching solution (Ferric chloride solution, Fecl3)

for approximately 30 mins. The Fecl3 reacts with the unmasked copper and removes the unwanted

copper from the PCB. This process is called as Etching. Use pliers to take out the PCB and check if

the entire unmasked area has been etched or not. In case it is not etched leave it for some more

time in the solution

Step 7: Take out the PCB wash it in cold water and remove the ink by rubbing it with steel wool.

The remaining area which has not been etched is the conductive copper tracks which connect the

components as per the circuit diagram.

Step 8: Now carefully drill the PCB using a drilling machine on the pads

Step 9: Put the components in the correct holes and solder them.

Page 25: Project Report

PROBLEMS AND SOLUTIONS:

Testing phase

The main problem I am facing during testing phase is how to synchronize my device

resulted data plotting on Intensity Graphs.

Hardware implementation phase

Pcb track Continuity problem.

74LS48 decoder ic dose not drive large segment display.

When the ldr sensor is connected to the Op Amp non inverting pin the all

comparator give output at same time.

Ldr sensitivity problem in day time

Pcb not etching properly

Solutions

Apply varnish solution after etching the pcb borad and checked all dry sold

connection .

Used buffer circuit for driving more gate .

Using transistor as a switch on output.

Connect linear pot meter with ldr sensor in series.

Increase the quantity of ferric chloride.

Reference

http://www.electronics-tutorials.ws/diode/diode_8.html

wikipedia.org/wiki/ldrsensor

https://www.facebook.com/EngineeringGarageVir?ref=tn_tnmn

https://www.sparkfun.com/products/9196