Intruder Alarm Name Mohamed Alsubaie MMU ID Supervisor Pr. Nicholas Bowring Subject Electronic Engineering Unit code 64ET3516

Similar documents
EXPERIMENT 1: Characteristics of Passive and Active Filters

Operational Amplifiers

Assist Lecturer: Marwa Maki. Active Filters

Analog Electronics. Lecture. Op-amp Circuits and Active Filters. Muhammad Amir Yousaf

Low Pass Filter Introduction

Introduction (cont )

Electronics II. 3. measurement : Tuned circuits

Analog Electronics. Lecture Pearson Education. Upper Saddle River, NJ, All rights reserved.

1) Consider the circuit shown in figure below. Compute the output waveform for an input of 5kHz

ECEN Network Analysis Section 3. Laboratory Manual

EK307 Active Filters and Steady State Frequency Response

AN-1106 Custom Instrumentation Amplifier Design Author: Craig Cary Date: January 16, 2017

Lesson number one. Operational Amplifier Basics

EE 3305 Lab I Revised July 18, 2003

Chapter 15: Active Filters

Homework Assignment 10

Chapter 10: The Operational Amplifiers

EK307 Passive Filters and Steady State Frequency Response

ActiveLowPassFilter -- Overview

LINEAR IC APPLICATIONS

Theory: The idea of this oscillator comes from the idea of positive feedback, which is described by Figure 6.1. Figure 6.1: Positive Feedback

Lab 9: Operational amplifiers II (version 1.5)

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

Active Filter. Low pass filter High pass filter Band pass filter Band stop filter

Special-Purpose Operational Amplifier Circuits

Homework Assignment 06

Laboratory 4 Operational Amplifier Department of Mechanical and Aerospace Engineering University of California, San Diego MAE170

OPERATIONAL AMPLIFIERS (OP-AMPS) II

Active Filters - Revisited

Differential Amplifier : input. resistance. Differential amplifiers are widely used in engineering instrumentation

Homework Assignment 03

Project 7: Seismic Sensor Amplifier and Geophone damping

Electronics basics for MEMS and Microsensors course

Advanced Measurements

Homework Assignment 04

When you have completed this exercise, you will be able to relate the gain and bandwidth of an op amp

"Improve Instrument Amplifier Performance with X2Y Optimized Input Filter"

University Tunku Abdul Rahman LABORATORY REPORT 1

Operational Amplifiers

EXPERIMENT NUMBER 8 Introduction to Active Filters

Introduction to Analog Interfacing. ECE/CS 5780/6780: Embedded System Design. Various Op Amps. Ideal Op Amps

ELC224 Final Review (12/10/2009) Name:

PHYS 536 The Golden Rules of Op Amps. Characteristics of an Ideal Op Amp

University of Pittsburgh

ECE4902 C Lab 5 MOSFET Common Source Amplifier with Active Load Bandwidth of MOSFET Common Source Amplifier: Resistive Load / Active Load

ECE 442 Solid State Devices & Circuits. 11. Operational Amplifiers

Experiment 1: Amplifier Characterization Spring 2019

ECE 317 Laboratory #1 Force Sensitive Resistors

Infrared Communications Lab

Laboratory 9. Required Components: Objectives. Optional Components: Operational Amplifier Circuits (modified from lab text by Alciatore)

Physics 303 Fall Module 4: The Operational Amplifier

Chapter 3 THE DIFFERENTIATOR AND INTEGRATOR Name: Date

Active Filter Design Techniques

Butterworth Active Bandpass Filter using Sallen-Key Topology

EE431 Lab 1 Operational Amplifiers

Operational Amplifier BME 360 Lecture Notes Ying Sun

Op-Amp Simulation Part II

University of Pittsburgh

Lab 10: Single Supply Amplifier

When input, output and feedback voltages are all symmetric bipolar signals with respect to ground, no biasing is required.

Summer 2015 Examination

EKT 314 ELECTRONIC INSTRUMENTATION

LM148/LM248/LM348 Quad 741 Op Amps

OPERATIONAL AMPLIFIER PREPARED BY, PROF. CHIRAG H. RAVAL ASSISTANT PROFESSOR NIRMA UNIVRSITY

Instrumentation amplifier

Instrumentation Amplifiers Filters Integrators Differentiators Frequency-Gain Relation Non-Linear Op-Amp Applications DC Imperfections

University of North Carolina, Charlotte Department of Electrical and Computer Engineering ECGR 3157 EE Design II Fall 2009

EET 438a Automatic Control Systems Technology Laboratory 1 Analog Sensor Signal Conditioning

ECE 4670 Spring 2014 Lab 1 Linear System Characteristics

Amplifier Basics A small signal is amplified to a large signal Gain is determined by the function of Vout/Vin or Iout/Iin or Pout/Pin Most amplifiers

ME 365 EXPERIMENT 7 SIGNAL CONDITIONING AND LOADING

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

Examining a New In-Amp Architecture for Communication Satellites

EE 2274 RC and Op Amp Circuit Completed Prior to Coming to Lab. Prelab Part I: RC Circuit

Unit WorkBook 1 Level 4 ENG U22 Electronic Circuits and Devices 2018 UniCourse Ltd. All Rights Reserved. Sample

Practice questions for BIOEN 316 Quiz 4 Solutions for questions from 2011 and 2012 are posted with their respective quizzes.

University of Michigan EECS 311: Electronic Circuits Fall 2008 LAB 2 ACTIVE FILTERS

The Operational Amplifier This lab is adapted from the Kwantlen Lab Manual

AD8232 EVALUATION BOARD DOCUMENTATION

ECE4902 C Lab 7

Mechatronics. Analog and Digital Electronics: Studio Exercises 1 & 2

ECE3204 D2015 Lab 1. See suggested breadboard configuration on following page!

TRANSDUCER INTERFACE APPLICATIONS

Laboratory 6. Lab 6. Operational Amplifier Circuits. Required Components: op amp 2 1k resistor 4 10k resistors 1 100k resistor 1 0.

EE320L Electronics I. Laboratory. Laboratory Exercise #2. Basic Op-Amp Circuits. Angsuman Roy. Department of Electrical and Computer Engineering

Learning Objectives:

ITT Technical Institute ET245 Devices II Unit 5 Chapter

EE2210 Laboratory Project 1 Fall 2013 Function Generator and Oscilloscope

10: AMPLIFIERS. Circuit Connections in the Laboratory. Op-Amp. I. Introduction

In-Class Exercises for Lab 2: Input and Output Impedance

IFB270 Advanced Electronic Circuits

Analog Design-filters

(b) 25% (b) increases

DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE MASSACHUSETTS INSTITUTE OF TECHNOLOGY CAMBRIDGE, MASSACHUSETTS 02139

2. BAND-PASS NOISE MEASUREMENTS

University of Utah Electrical Engineering Department ECE 2100 Experiment No. 2 Linear Operational Amplifier Circuits II

Operational Amplifier

An active filters means using amplifiers to improve the filter. An acive second-order RC low-pass filter still has two RC components in series.

Description. Output Stage. 5k (10k) - + 5k (10k)

EXAM Amplifiers and Instrumentation (EE1C31)

Transcription:

Intruder Alarm Name MMU ID Supervisor Subject Unit code Course Mohamed Alsubaie 09562211 Pr. Nicholas Bowring Electronic Engineering 64ET3516 BEng (Hons) Computer and Communication Engineering

1. Introduction This assignment is about design and builds an intruder alarm, which detects movement and sound levels being activated by either human voice or motion. The block diagram in figure-1 shows an example of the complete design. It will consist of two inputs microphone and PIR sensor circuits, PIC microcontroller as a control unit and LED or buzzer as output. This report will be a summary for the laboratory activities that been done during the first term, starting from designing simple amplifiers and filters, then moving to design the microphone and PIR sensor circuits. Figure-1: Block diagram example for the complete design. 2. Operational Amplifier Operational Amplifier, which is more commonly called Op-amp, is one of the basic building blocks of Analogue Electronic Circuits. It is linear devices that have all the necessary features for nearly ideal DC amplification. Op-amps are used widely in amplification, filtering, signal conditioning or to perform some mathematical operations. This part of the assignment was about designing an amplifier circuit using a standard 741 Op-amp with a sufficient gain bandwidth product up to 2.5MHz (500 gain and high bandwidth up to 5kHz). The purpose of this exercise was to be familiarized with using op-amps. It can be clearly shown in figure-2 that 741 op-amp has two inputs, inverting (-) at pin 2 and noninverting (+) at pin 3, and single output at pin 6. Op-amps can be used in two different ways. When the voltage applies into pin 2 then it is known as an Inverting Amplifier, and when the voltage applies into the non-inverting pin then the circuit becomes a Non-Inverting Amplifier. The following equations can be used to determine the gain, were Rf is the feedback resistor and Ri is the input resistor. 2.1 Amplifier design Since the inverting amplifier has a simpler equation, it has been selected in designing the amplifier circuit. Figure-2 shows a circuit for one sage inverting amplifier. The resistors values have been calculated using the inverting equation. For a gain of 500, Rf can be selected as 500kΩ and Ri is 1kΩ. However, the calculation result for this circuit has a small bandwidth and it dose not met the exercise requirements. The reason behind that is 741 op-amps family has a gain-bandwidth product of around one million. GBWP = Gain x BW, in this case 1000000 = 500 x BW, so BW = 2000Hz. Figure-2: One stage inverting amplifier circuit. 1

In order to achieve the exercise requirements, two stage inverting amplifier circuits on figure- 3 has been design. The first stage has a gain of 2.5and the second stage has a gain of 200. The total gain of the circuit is will equal Gain = A1 x A2 = 2.5 x 200 = 500, were the BW= 1000000 / (200+2.5) = 4934.27Hz, and GBWP = Gain x BW = 500 x 4934.27 = 2.47MHz. This circuit has been simulated using MULTISIM software. Then, the same circuit has been connected on bread-board and tested using function generator as an input. After that, the measurement for the inputs and outputs has been recorded using oscilloscope. 2.2 Amplifier Results The results for the amplifier circuits have been plotted in figure-4, which is contains the simulation results for one stage and two stage amplifier and the experiment results for two stage amplifier. It is possible to determine the cut-off frequency, which is equal to the bandwidth), by moving -3dB point from the maximum values for each plot. The following table has a summary of all the results from simulation and experiment. Figure-3: Two stage inverting amplifier circuit. Table-1: Summary for amplifier circuits results. The simulation and calculated results are the same. Both of them are not having the exact values for GBWP at 2.5MHz, but that is not important because it depends on the selected values for resistors. However, the experimental results for two stage amplifier are slightly different than the simulation results. There are many reasons for that, such as: difficulties in finding the appropriate resistors, resistors tolerance, small percentage errors on the used equipment, and human errors on taking reading and adjustment of the devises. 3. Active Filters Figure-4: Results for the amplifier circuits. Active filter is an analogue electronic filter that uses active components such as amplifier. Filters are used to modify, reshape and reject the unwanted frequency form an electric signal and pass or accept the wanted signals. This part of the assignment was about designing an active filter that will passes frequencies starting from 300Hz to 5kHZ and rejecting other frequencies. The purpose of this exercise was to be familiarized with designing active filter which will be needed to build later on for the microphone and PIR sensor circuit. There are three types of filters and they are named depending on the frequency range of signals that they allow to pass, while rejecting or attenuating the rest. 2

High Pass Filter: it is only passes high frequency signals from its cut-off frequency point and higher while attenuating lower frequencies below it. Low Pass Filter: it is only passes low frequency signals from 0Hz to its cut-off frequency point while attenuating higher frequencies above it. Band Pass Filter: it is passes signals with a certain frequency band setup between two points while attenuating both the higher and lower frequencies either side of the frequency band. First order filter Simple first order RC filter can be mad by connecting a single resistor in series with a capacitor to the op-amp. This single pole produces a roll-off slope of -20dB/decade. The angle of this slope may not be enough to remove some unwanted signals. Cut-off frequency can be calculated using the formula (R1=R2, C1=C2): Second order filter First order RC filter can be converted into second order type, simply by adding an extra RC network to the circuit. This double pole, which is known as Sallen-Key filter, produces a roll-off slope of -40dB/dacade. This slop has a better attenuation for the unwanted signals. Cut-off frequency can be calculated using the formula: 3.1 High Pass Filter Design The circuit of the first order high pass filter consists of an op-amp 741 and RC network, both connected on the following arrangement as figure-5 shows. The resistor and capacitor can be calculated using the above formula. In this exercise the cut-off frequency should equal 300Hz. The selected value for the capacitor was 100nF. By applying the formula, the resistor value equal 5.31kΩ. As it mentioned before, this circuit can be converted to second order high pass filter. Basically, adding an additional RC network to this circuit and calculated the new values for resistor using the other formula. The second order circuit can be found on right side of figure-9. The values C1 and C2 are the same 100nF, were R1 = 2.R2 = 2 x 3.7k = 7.5kΩ. Figure-5: First order high pass filter. After simulating both circuits on MULTISIM software, the results have been plotted on figure-6. It can be clearly seen that both graphs are having the same cut-off frequency at 300Hz. However, first order filter has produces a roll-off slope of -20 db/decade comparing to -40 db/decade on the second order filter. 3.2 Low Pass Filter Deign Figure-6: Simulation results for first and second order high pass filter. The circuit of the first order low pass filter can be shown in figure-7. It is the exact opposite to that of the previously seen high pass filter. The cut-off frequency required on this exercise is 5kHz. The first equation has been used to calculate the value of the resistor and capacitor (C=100nF and R=31.83kΩ). The second order circuit can be found on left side of figure-9. The values of R1 and R2 are the same 22kΩ, were C1 = 2.C2 = 2 x 1nF = 2nF. The simulation results for both second and first order low pass filter are having the 3

same cut-off frequency at 5kHz. The roll-off slop will be the same as high pass filter, first order is -20dB/ decade, and -40dB/ decade for second order. Figure-7: first order low pass filter. 3.3 Band Pass Filters Figure-8: Simulation results for first and second order low pass filter. In order to achieve the exercise requirement, a band pass filter has been design. It is combination of both circuits for low pass and high pass filters. First order band pass filter can be build using the pervious circuit for first order low pass and high pass filters. Moreover, the figure on the right hand side shows a circuit diagram for second order band pass filter (Sallen-key). It can be clearly seen that this circuit is consisting of two parts. The first part is a second order low pass filter with a cut-off frequency of 5kHz and the other is a second order high pass filter with a cut-off frequency of 300Hz. First and second order band pass filter has been simulated on MULTISIM software. Second order has a better rejecting for the unwanted signals. Therefore, only second order has been build and tested on bread board. Figure-9: Second order band pass filter. The band pass filter results has been recorded and plotted in figure-10. The following table summarises the results obtained from band pass filter circuits. Table-2: Summary for band pass filters results. Figure-10: Band pass filter results. The experimental results for second order band pass filter are slightly different than the simulation results. There were some difficulties in finding appropriate values for components, because there are no infinite numbers for resistor and capacitor. Therefore, some resistors have been replaced with two resistors in series to get the wanted values, which will increase the percentage errors and gives higher tolerance. Moreover, the differences in experiment and simulation results are also related on the human errors while setting and adjust the used equipments. 4

4. Microphone Circuit Design This part of the assignment is about designing a microphone circuit that will be capable of monitoring sound levels being activated by human voice. The block diagram for the required design can be shown in figure-11. It consists of an electret condenser microphone circuit to monitor the sound levels, followed by a suitable amplification and filter circuit that will remove the possible interference from non human voice sounds. 4.1 Condenser Microphone All microphones are transducers that convert sound pressure waves into an electrical signal. Microphone is similar to capacitor. It made of a dielectric material that holds a permanent charge. Vibrates effects will causes a change in the internal capacitance and an electrical signal will produced. The simple circuit in figure-12 has been connected to in order to pick up the sound signals. The circuit has a pull up resistor of 4.7kΩ to determine the output impedance on the microphone. Moreover, the output signal has filtering capacitor of 0.1uF which is responsible to block any DC voltage bias from the output. Figure-11: Block diagram for the microphone circuit. Figure-12: Condenser microphone circuit. 4.2 Human Sound Detection The microphone circuit has been connected on a brad-board and tested with fixed sounds (using sound generator application) of different frequency. Oscilloscope has been used to view the measurement for the output signal. The circuit was able to pick up the generated sound. When a fixed sound of 400Hz placed near to the microphone, the measured frequency was approximately 400Hz. Moreover, the circuit has been tested with different animal and human sounds, about four readings have been recorded for each voice. The bar chart in figure-13 shows all the recorded results for the tested sounds. From these results, the suitable values for the band pass filter to remove non human voice sounds have been selected to start from 500Hz to 1.5kHz. The output of the microphone circuit is very small. Therefore, an amplifier circuit has been design to amplify this signal. The amplified signal should have the correct voltage range for an ADC embedded on the PIC microcontroller (5v). The complete circuit for both amplifier and band pass filter can be shown in figure-14. Figure-13: Human and animal sounds results. Figure-14: Amplifier and band pass filter circuit for the microphone design. 5

The circuit in figure-14 has been connected on a bread-board and the ac power supply has been replaced with the microphone circuit. The circuit has been tested with fix audio sounds to make sure that it works well. According to the result from table-3, the circuit is work as expected. The gain is high for audio sounds of 500 and 800, while the lower and higher frequencies are having lower gain. In order to check that the circuit is able to detect human voice sound and ignore animal s sounds, the same test on the pervious microphone circuit has been applied to the complete circuit, but this test was about calculating the gain from the measured input and output voltages. The result has been recorded on table-4. It can be clearly shown that most of animal sounds are having a lower gain comparing to human sound. Therefore, the microphone circuit is successfully achieved detecting human voice. However, there was a problem in setting the right amplifier value. The gain value of the amplifier was 125. It calculated by playing sounds to the initial microphone circuit. The input voltage was hard to select because the sound keeps changing fast, therefore the estimated value was 40mv. Calculating the required amplifier gain has been done by dividing 5v/40mv, which is equal to 125. It can be clearly seen that the maximum value of the output voltage was 1.28v, which is not suitable to the PIC micro-controller. All the experimental result for the complete circuit was based on this gain value. The readings are still useful and can prove that the filter was able reject non-human voice. The problem has been solved by applying a fixed audio sound to the initial circuit and the input voltage was 12.5mv. The new gain has been calculated using the pervious method which is 400. The complete circuit has been modified by changing the value of the feedback resistor has been replaced with 400KΩ. The circuit has been tested and it was giving suitable values approximately 5v. Figure-15 shows the simulation result for the circuit. It is obvious that the readings are matching the simulation results with 125 gain. For example: human has a gain 40.2dB which is place on the wanted rage and animals are placed out of the range. The change on the circuit will not affect the frequency range but it will only increase the gain, so the 40.2dB for human is expected to be around 50dB. Table-3: Fixed sound results. Sound Freq. Vpp In Vpp out Gain Gain (HZ) (mv) (mv) (db) 320 4 40 10.0 20 500 2.5 125 50.0 34.0 800 6 560 93.3 39.4 2000 10 430 43.0 32.7 3200 6 200 33.3 30.5 Table-4: Human and animal sound results. Sound off Vpp In Vpp Out Gain Gain (mv) (mv) (db) Dog 6.2 336 54.2 34.7 3.4 72 21.2 26.5 Cat 11.8 456 38.6 31.7 9.2 480 52.2 34.3 Chicken 2.6 104 40.0 32.0 3.8 56 14.7 23.4 Sheep 10 288 28.8 29.2 7.6 192 25.3 28.0 Cow 11.2 600 53.6 34.6 Human 6.8 456 67.1 36.5 36.8 1280 34.8 30.8 4.3 440 102.3 40.2 Figure-15: simulation for the complete microphone circuit. Table-5: Summary for the simulation results Results of Freq. Range Max. Gain (Hz) (db) With amplifier 125 500-1500 41.93 With amplifier 400 500-1500 52.04 6

5. PIR Circuit Design This part of the assignment is about designing a circuit that will detect movement using PIR sensor. Passive Infrared Sensor is an electronic sensor that measures the change in temperature radiation form objects in its field of view. The PIR sensor has three terminals, input, output and ground. In order to test the sensor, the circuit in figure-16 has been connected on bread-board, and then the output was measured using oscilloscope. The DC-coupled test was giving a voltage of 1v, as it shown in figure-17, while the AC-coupled test was giving a voltage of 2mv. Figure-16: Block diagram for the microphone circuit. Figure-17: DC-coupled test. Figure-18: AC-coupled test. 5.1 Example Circuit The PIR example circuit is shown below. This circuit has been simulated and built on bread board. In order to simulate the circuit, the PIR sensor has been replaced with two power sources, a DC power source of 1v, which will represent the offset value for the sensor, and an AC power source of 2mv. After that, the simulation results has been recorded and plotted. In the experiment part, the sensor was not working well and it has been replaced with low frequency function generator. The lowest voltage available in this function generator is 10mv. It can be noticed from the simulation results that the circuit below has high gain up to 5.5k. The output of the function generator will multiply be 5.6k, which is equal to 10mv x 5.6K = 56v (+28 to -28), and it will exceeded the supply voltage, which is 30v (+15 and -15). Therefore, two resistors have been added to the input of the circuit to reduce input voltage to 5mv, which will provide a suitable voltage of 28v (+14 and -14). According to voltage divider rule, resistor needs to be equal. After that, the measurement was recorded starting from 0.2Hz up to 100Hz. The graph of the experiment results can be shown in figure-20. Figure-19: PIR example circuit. 7

Figure-20: All results for PIR example circuit. The experiment results are slightly different than the simulation results. The results were having slightly big deference at low frequency, but the results are getting better at higher frequency. The reasons behind that are because of the components and equipment tolerance and human errors such as adjusting equipment and reading values. 5.2 New Design Table-6: Summary for the PIR circuits. Result of fc1 (Hz) fc2(hz) Max. Gain Roll-off (db) (db/decade) Experiment 2 6 71-32 Full circuit 786.8m 5.82 75-38 First half 490.8m 8.2 46-20 Second half 612.4m 8.58 29-18.6 New design 780.83m 5.82 75-40 The PIR circuit has been divided into two parts. The first half of the circuit was having one stage amplifier of 200. Moreover, the second half of the circuit was having one stage amplifier of 30. From this result, it can be obtain that the circuit has a two stage of high amplification up to 6000. It can be determine from the plot shape and roll-off (-38 db/decade) that the circuit has a second order band pass filter with a range between 786.8mHz to 5.82Hz. Therefore, another circuit, which is shown in figure- 21, has been designed with the same specification. This circuit has been simulated on MULTISIM software and the results were nearly the same as the pervious circuit. Figure-21: The new PIR circuit design. 8

6. Conclusion The first part of the project has been completed. It starts with learning the basics of operational amplifier and using them to design amplifiers. These activities provides a huge background on amplifiers parameters, such as gain, bandwidth and gain bandwidth product, as well as understanding the deferent between one and two stages amplifier. Moreover, the second part of this assignment was about active filters. There are three types of filters, which are named depending on the frequency range of signals that they allow to pass (low pass, high pass and band pass). There are a first order and second order. The order of the filter can be determine from the circuit depending on the number on the RC networks or from the slope of the graph. Furthermore, the third task was about building a microphone circuit that capable to detect human voice and ignore non human sounds. It involves designing and selecting suitable values for amplification and filters. The last part of the assignment was about designing a PIR circuit that will detect human movement. However there were some problems with the PIR sensor. Therefore, the circuit has been designed and tested with out the PIR sensor. 9