physics 111a final project: ir burglar alarm

28
PHYSICS 111A Final Project: IR Burglar Alarm Yuzhou Chai SID 3034432730 Lab Partner: Junhao Yu UC Berkeley [email protected] December 15, 2018 Abstract In this last lab, we design and build an IR Burglar Alarm. After testing and integrating, our design functions well – the light flashes and the alarm beeps. Details are presented below. Contents 1 Introduction 2 1.1 General Introduction ............................. 2 1.2 Basic Function ................................ 2 1.3 Design Feature ................................ 2 2 Block Diagram 3 2.1 Framework .................................. 3 2.2 Control Signal ................................. 3 3 Circuit Diagram and Level of Functioning 4 3.1 Total Circuit .................................. 4 3.2 Input - Light Sensor .............................. 4 3.3 Control – AC to DC Converter ........................ 5 3.4 Control – Trigger ............................... 7 3.5 Output - Sound and Light Alarm ....................... 9 4 Testing and Measurements 13 4.1 Independent Tests ............................... 13 4.2 Multistage Tests ................................ 19 5 Trouble Shooting 26 6 Design Creativity 26 7 Conclusions and Further Improvements 27 7.1 Conclusions .................................. 27 7.2 Further Improvements ............................. 27 8 References 28 9 Acknowledgements 28 1

Upload: others

Post on 05-Nov-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PHYSICS 111A Final Project: IR Burglar Alarm

PHYSICS 111A Final Project: IR Burglar AlarmYuzhou Chai SID 3034432730

Lab Partner: Junhao Yu

UC [email protected]

December 15, 2018

Abstract

In this last lab, we design and build an IR Burglar Alarm. After testing and integrating, our designfunctions well – the light flashes and the alarm beeps. Details are presented below.

Contents

1 Introduction 21.1 General Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Basic Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Design Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Block Diagram 32.1 Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Control Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Circuit Diagram and Level of Functioning 43.1 Total Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.2 Input - Light Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.3 Control – AC to DC Converter . . . . . . . . . . . . . . . . . . . . . . . . 53.4 Control – Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.5 Output - Sound and Light Alarm . . . . . . . . . . . . . . . . . . . . . . . 9

4 Testing and Measurements 134.1 Independent Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 Multistage Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Trouble Shooting 26

6 Design Creativity 26

7 Conclusions and Further Improvements 277.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277.2 Further Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

8 References 28

9 Acknowledgements 28

1

Page 2: PHYSICS 111A Final Project: IR Burglar Alarm

1. Introduction

1.1. General IntroductionThe burglar alarm device is a traditional technique, the ancient ones can be animals

like watchdogs, geese and even pigs. In the modern "electronic" context, the fundamentalstructure of alarms remain still: a sensor (or more) to detect the intruders, and an alertingdevice to indicate the situation (intruded or not). With the knowledge we learned fromthe course, we can design and build an effective IR burglar alarm using simple circuitcomponents. The device is sensitive to changes in illumination, thus will be triggeredwhen intruders enter the secure area. Once triggered, it will keep producing LED light andSound signals until the user/operator resets it.

1.2. Basic FunctionThere are mainly three parts of our device: the sensor, the alarm control panel, the

alerting system. Connected together in sequence, the device has two status: standby (off)and alarming (on).

In the sensor module, an IR LED is generated by 20kHz AC signal to give out lightwhich is invisible to intruders. A detector receives the light signal.

In the control module, op amp circuits are used to make the system only sensitive tosignals at a short range around 20kHz. Once the IR signal is blocked or replaced by lowfrequency signals (including natural illumination and intended "cover-up" light by intrud-ers), the output of this module would be greatly differentiated compared with the standbystatus.

In the alerting module, the status of the system is characterized by the appearance ofa Red LED and a Speaker. In alarming status, the Red LED would produce flashing lightand the Speaker would give out sharp beeps.

1.3. Design FeatureOur design has following features:

(a) The whole device is powered by 12V/-12V DC voltage source. The IR LED isdriven by AC signals from the signal generator. Circuit components including a OP802SLbipolar phototransistor, LF356N op amps, 555 timers, logic gates are all from Donald A.Glaser Lab.

(b) The IR light signal, as the input and detected signal, is invisible to human eyes.Such design can avoid the exposure of the alarm to the intruders, and can work in differentenvironmental illumination (totally darkness or normal day light).

(c) Each module/unit of the circuit can function independently, and can be applied toother usage. For instance, parts of the alerting module can serve as alarm signal generatorand parts of the control module have basic signal processing functions as filtering, time-averaging and so forth.

(d) The device can be used until the components age. For every new run, the user/operatorshould reset the system by simply switching the DC power.

(e) The whole system is designed to be energy saving, especially in standby status.Multi-functions are realized using small amount of circuit components.

2

Page 3: PHYSICS 111A Final Project: IR Burglar Alarm

2. Block Diagram

2.1. FrameworkThe first block diagram is the general framework for the whole project. The control

signal generator is the brain of the device, whether the modulated signal will pass theswitch depends on the given control signal.

The third block diagram is a brief illustration for level of functioning.

Figure 1: Block Diagram for the Project

Figure 2: Function Section Diagram

2.2. Control SignalThe second block diagram is the output for each stage of the control signal generator

at different status(on or off), which we will show in scope images in section 4.2 MutlstageTest.

Figure 3: Control Signal Section Diagram

3

Page 4: PHYSICS 111A Final Project: IR Burglar Alarm

3. Circuit Diagram and Level of Functioning

In this section, we describe our circuit part by part in the sense of multi-functioninganalysis.

3.1. Total CircuitMultisim is used to draw the circuit. Much alike the Function Section Diagram shown in

2.3, we first provide the full view of our circuit using the "subcircuit" function. Noting thatthe model number of few components might not match the real ones, like the 555 timer, wechoose LMC555CH among all the "555"s in Multisim.

Figure 4: Full Circuit

3.2. Input - Light SensorTo begin with, we need to collect the signal form IR LED and convert it into electric

signals.

• 1. Photo DetectorThe photo detector consists of an OP802SL bipolar phototransistor and a follower.

The structure of a phototransistor is very similar to a normal JFET transistor. Weleave the base unattached and connect only two of its leads. Such wiring increasesthe photransitor’s light sensitivity. The follower transforms the current signal fromthe OP802SL phototransistor into a voltage signal. If we drive the IR LED by an ACsignals, the output would also be an AC signal at the same frequency.

4

Page 5: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 5: Sensor Circuit

• 2. Inverting FollowerThe inverting follower reverses the signal from the photo detector. It is realized by

setting the gain of the inverting amplifier to -1. Such design avoids the desired signal(the 20kHz IR LED signal) from being eliminated by later circuits like the half-waverectificator.

3.3. Control – AC to DC ConverterThe difference between two status at the output of the sensor circuit is marked by the

frequency of the signal. However, both desired signal and undesired signal are AC signals.Since in the later part, the Schmitt Trigger prefers the shift in DC inputs, we have to convertAC signals into DC signals and keep the difference of the two status. Such function isachieved by filters, a rectifier and a time averager.

• 1. Multistage Active Bandpass FilterThe main function of our bandpass filter is to eliminate noise and disturbing

signals and pass through the target signal at certain frequencies (frequencies aroundthe driven frequency of the light signal – in our case – 20kHz). Thus the rest of thecircuits will only focus on the the amplitude change of signals at this frequency.

Especially, we need a high pass filter that rejects signals below its passband muchmore strongly than with a simple RC filter since we want to remove the effects ofthe natural or environmental illumination (like the indoor lightings) of which thephoto-signal frequency is quite low – almost can be treated as DC signals.

Thus, we build a multistage active bandpass filter. It consists of a two-stage activehigh pass filter and a simple low pass filter, between which we add an amplifier toenhance the passed signals. In order to solve the multistage loading problem, weinsert an op amp between two stages. The op amp acts as a follower by which wecan compare the performance of the isolated single-stage high pass filter and thetwo-stage high pass filter. The latter consists of two identical high pass filters, eachincluding a 10kΩ resistor and a 500pF capacitor. The expected roll-off point wouldbe around 30kHz. Though it is possible to design a single filter, it will be very

5

Page 6: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 6: Filter Circuit

long (containing many coefficients) and very costly (having many multiplicationsand additions per input sample). Multistage filters save us from the dilemma.

Between high pass filters and low pass filter, we add an amplifier of which the gainis 1000 because we will need higher amplitude of the signal in the rest of the circuit.

• 2. RectifierAfter the bandpass filter, we save desired signals (with amplification). We then

have to convert this AC signal to DC output. The expected results would be turningIR LED light signal into a DC signal and environmental light signal (or "cover-up"signal made by the intruders) into zero contribution. Once the IR LED signal isblocked by intruder, the original DC signal will shift to zero.

Figure 7: Rectifier and Time Averager Circuit

The rectifier consists of a half-wave rectifier and a time averager. The half-waverectifier takes the advantage of the directional response of 1N4007 diode. Only whenforward-biased will there be appreciable current flowing through the branch. Thusthe negative amplitude of the AC signal is reduced to nearly zero.

6

Page 7: PHYSICS 111A Final Project: IR Burglar Alarm

As for the time averager, it’s an application of the op amp integrator. The integrat-ing formula for repetitive signals:

< A >=− 1Tf −Ti

∫ Tf

Ti

A(t)dt (1)

Ti and Tf has to satisfy the relation Tf −Ti = n×2πCF RF .

Within the allowed frequency range, the time averager turns the half-wave ACinput into an inverted DC output (negative in this case). The integration operationoccurs for frequencies in the range [ fa, fb], where fa = 1

2πRFCFand fb = 1

2πR1CF.

However, when tested, we find that the integrator doesn’t work well in the givenrange of frequency. Actually, we want it to integrate signals at around 20kHz, orgenerally, at frequency to the order of 10kHz. The effective choice of resistors andcapacitors turns out to be R1 = RF = 10kΩ, CF = 1µF .

3.4. Control – TriggerNow the two status of the system is marked by a DC signal ("standby") and zero signal

("alarming"). In this part, we take the advantage of Schmitt Trigger to produce the finalcontrol signal.

Figure 8: Trigger Circuit

• 1. Non-inverting AmplifierGiven the output from the time averager in the previous section, we would have a

negative DC signal in the standby status. In order to run the Schmitt Trigger, we haveto amplify the output DC signal from time averager. A basic non-inverting amplifiershould be applied. We use two resistors, one of 10kΩ and the other of 50kΩ to setthe gain as G = 1+ 50kΩ

10kΩ= 6.

7

Page 8: PHYSICS 111A Final Project: IR Burglar Alarm

• 2. OffsetThis is the final step to match the characterized effective input of our Schmitt

Trigger. The only signal that can "activate" the Schmitt Trigger would be the signalof the alarming status. In other words, the Schmitt Trigger is at rest when the IRLED signal is not blocked or replaced (the standby status). As our measurements insection 4.2 show, after the non-inverting amplifier, the standby status would give usa -12V DC signal, and the alarming status would give us zero signal. By adding anoffest of 10V, we shift each to -2V and 10V.

• 3. Schmitt TriggerSchmitt Trigger would be the central part of our circuit. All the previous com-

ponents serve for Schmitt Trigger and all the rest parts act correspond to the outputfrom Schmitt Trigger.

Figure 9: Schmitt Trigger Model

Our design of Schmitt Trigger is implemented by a non-inverting comparator withthe help of two resistors – one of 10kΩ and the other of 20kΩ. It takes the advantageof positive feedback. According to the superposition theorem, the output voltage V+

of the resistive summer would be:

V+ =R2

R1 +R2Vin +

R1

R1 +R2Vs (2)

where Vs is the positive power supply, in our case, ±12V .

The comparator will switch when V+ = 0, thus the threshold is given by

VT =R1

R2Vs = 6V (3)

Given the initial standby status of Vin =−2V , Vin must exceeds 6V to get the outputto switch. This design matches the input 10V in the alarming status. In conclusion,the output of the Schmitt Trigger remains to be -12V in the standby status. Oncethe IR LED signal is blocked or replaced, the input switches to 10V and the outputjumps to 12V. One can only reset the whole circuit to get it back to -12V. We willshow this hysteresis behavior in section 4.1.

8

Page 9: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 10: Typical Transfer Function of Schmitt Trigger

• 4. Voltage DividerGiven the output of 12V/-12V from Schmitt Trigger, we again have to scale it in

order to match the desired input of later comparator. According to our measurent insection 4.1, the timer signal oscillates between 0V and 3.5V. Thus we decide to scale12V/-12V to be around 1V/-1V. It is achieved by a simple voltage divider includinga 10kΩ and a 1kΩ resistor.

3.5. Output - Sound and Light AlarmNow that we get the control DC signal of -1V/1V, which represents the standby status and

the alarming. We need a module that independently produce "alarm-like" signals (flashingin terms of light and beeping in terms of sound) which we will finally input into our alertingdevices – the Red LED and the Speaker.

• 1. Timer Signal Generator

Figure 11: Full Timer Circuit

In this module, we use 555 timer chips and logic gates to produce signal 1, 2 and3 and add them together as a complete timer signal.

9

Page 10: PHYSICS 111A Final Project: IR Burglar Alarm

(a) Logic GateTwo AND gates are used to add up the timer signals. A schematic diagram is

given below to show the function of the AND gates.

Figure 12: Functions of AND Gates

(b) Signal ModulatingAs for each timer signal, we use 555 timer chip. In the astable mode, the frequency

and the amplitude of the pulse signal depend on resister Ra, Rb and capacitor C. Wehave the following formula:

f =1

(ln2)×C(Ra +2Rb)(11)

Vhigh = ln2×C(Ra +Rb) (12)

Vlow = ln2×C×Rb (13)

With different sets of resistors and capacitor, we can generate pulses at differentfrequencies.

We briefly show the circuits for each signal, the frequencies and the amplitudeswill be discussed in section 4.1 as we actually measure them on the scope.

Figure 13: Timer Signal-1 Circuit

10

Page 11: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 14: Timer Signal-2 Circuit

Figure 15: Timer Signal-3 Circuit

• 2. Comparator (fig.16)

From the output of trigger circuit we have control DC signal of -1V/1V and fromthe timer circuit we have the modulated timer signal. This comparator serves asa "switch" which decide whether to pass the timer signal or not. (Noting that themeasurements in section 4.1 yield that the timer signal oscillates between 3.5V and0V .) We put the -1V/1V control signal into V+ and the timer signal into V−. Inthe case of V+ = −1V (standby status), we always have V− > V+, thus the outputwill remain at the level of -12V. In the case of V+ = 1V (alarming status) instead,the output will oscillates between ± 12V. Thus we get either zero or an "amplified"timer signal.

• 3. Speaker and/or LEDFinally, we come to the end of our circuit. As for the light alarm circuit, the

LED itself serves as a diode. Thus in the standby status the input -12V DC signalcan’t pass through while in the alarming status the input ± 12V will produce flashingred light. As for the sound alarm circuit, we add a capacitor to the speaker, whichabsorbs the DC signal. Likewise, in the standby status the input -12V DC signal isabsorbed while in the alarming status the input ± 12V will produce beeping sound.

Both alerting signals in the alarming status will inform of the intrusion.

11

Page 12: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 16: Comparator Circuit

Figure 17: Light Alarm Circuit

Figure 18: Sound Alarm Circuit

12

Page 13: PHYSICS 111A Final Project: IR Burglar Alarm

4. Testing and Measurements

4.1. Independent TestsIn this part, we test several modules independently to see if they work as expected.

• 1. Bandpass Filter

Figure 19: Filter Circuit

By testing signals at varied frequencies, we conclude that our filter works prettywell on eliminating low frequency signals which is our main requirement for thismodule.

(a) Bode Plot

Figure 20: Filter Bode Plot

13

Page 14: PHYSICS 111A Final Project: IR Burglar Alarm

(b) Filter DataThe cut-off frequencies are found to be 14kHz and 45kHz.

Figure 21: Filter Data Table

(c) AC SweepThe AC sweep on scope also shows that our filter functions as a "firm wall" to

block low frequency signals.

Figure 22: Filter AC Sweep

14

Page 15: PHYSICS 111A Final Project: IR Burglar Alarm

• 2. Schmitt Trigger Hysteresis

Figure 23: Schmitt Trigger Circuit

Independently, we test the hysteresis behavior of the Schmitt Trigger to verify thatfor the next run, the user/operator has to reset the whole circuit after it’s triggered tothe alarming status. Also, we check the real output with our expectation.

Channel 1: Input

Channel 2: Output

Channel 3: Scaled Output (after the voltage divider)

(a) Input -2V (Initial Standby)The output is -11.6V. (≈−12V as expected) The scaled output is -1.03V (≈−1V

as expected).

Figure 24: Initial Standby Status

15

Page 16: PHYSICS 111A Final Project: IR Burglar Alarm

(b) Input 10V (Alarming)The output is 11.5V. (≈ 12V as expected) The scaled output is 1.07V (≈ 1V as

expected).

Figure 25: Alarming Status

(c) "THEN" Input -2V (Fake Standby Status)The output is still 11.4V. (≈ 12V as expected) The scaled output is still 1.05V

(≈ 1V as expected).

Figure 26: Need Reset

We can see that once it’s triggered, the output will stay at around +11.6V, evenif we change the input signal. So we need to reset the whole system.

16

Page 17: PHYSICS 111A Final Project: IR Burglar Alarm

• 3. Timer Signal GeneratorIndependently testing timer signals (see fig.11 for circuits), We present all of them

on the scope. The final output will determine the scaling factor of the voltage dividerafter the Schmitt Trigger.

Channel 1: Signal 1

Channel 2: Signal 2

Channel 3: Signal 3

Channel 4: Output Timer Signal

Figure 27: Timer Signals

Now we look closely into each signal. First start with the final output signal.

(a) Output Timer SignalThe frequency of the signal is 480.7Hz, same with that of signal 3. But it takes

the form of Signal 4 (the addition of Signal 1 and 2, which is not included). It lookslike filling Signal 4 with Signal 3, which verifies the function of the AND gate. Theaudio effect of this output would be periodic beeping as the usual alarm we hear.

Most importantly, Vmax = 3.56V , Vmin = 0.00V . Based on this data, we decide toscale the original output of Schmitt Trigger from -12V/12V to -1V/1V.

Figure 28: Final Output Timer Signal

17

Page 18: PHYSICS 111A Final Project: IR Burglar Alarm

(b) Signal 1f = 4.701Hz; Vmax = 12.2V , Vmin = 200mV .

Figure 29: Timer Signal 1

(c) Signal 2f = 0.75Hz; Vmax = 12.6V , Vmin = 600mV .

Figure 30: Timer Signal 2

(d) Signal 3f = 480.7Hz; Vmax = 12.5V , Vmin = 300mV .

Figure 31: Timer Signal 3

18

Page 19: PHYSICS 111A Final Project: IR Burglar Alarm

4.2. Multistage Tests• 1. Sensor Test

The IR LED is driven by sine wave from signal generator, of which the frequencyis 20kHz and the amplitude is 8.5V. (See fig.5 for circuit)

(a) Detected IR SignalWe test the signal going through R4 resistor – it’s a sinusoidal-type wave:

f = 20kHz; Vpp = 8.80V , Vmean =−8.83V , Vmax =−3.60V , Vmin =−12.4V

Figure 32: IR Signal

(b) Inverted SignalAfter the inverting follower, the signal is reversed. Other features remain still.

Figure 33: Inverted IR Signal

• 2. Control Signal Test(I) IR Signal - Standby

We first test how the control signal generator module behaves in standby status. Toevaluate the module in a stable situation, instead of using the light sensor signal, wedirectly input simulated signals generated from the signal generator. Starting fromthe filter, the signal passes through the rectifier and time averager, the trigger partand finally goes into the comparator.

19

Page 20: PHYSICS 111A Final Project: IR Burglar Alarm

In the following images, we have at most four channels on the scope.

Channel 1: Simulated Input Signal

Channel 2: Filtered Signal

Channel 3: Half-Wave Rectification

Channel 4: Averaged Signal

Figure 34: From IR Signal to Averaged Signal

Now we look closely into each channel.

(Ia) Simulated Input Signalf=20kHz; Vpp = 8.40V , Vmax = 10.2V , Vmin = 1.80V . The modulated signal

has the same frequency with the IR signal and amplitude parameters close to the IRsignal.

Figure 35: Simulated Input Signal

(Ib) Filtered Signal, Rectified Signal, Averaged SignalThe high frequency signal "survives" the filter. And we also notice that it is

amplified as expected. After the rectifier, the negative part of the signal is eliminated.Then the rectified AC signal is successfully converted into a DC output at -2.03V bythe time averager.

20

Page 21: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 36: Filtered Signal

Figure 37: Rectified Signal

Figure 38: Averaged Signal

21

Page 22: PHYSICS 111A Final Project: IR Burglar Alarm

(Ie) TriggerWe then feed this -2V DC signal into the trigger module to evaluate its perfor-

mance.

Figure 39: Trigger Circuit

Reset the channels:

Channel 1: Output from Time Averager (Vin in the circuit above)

Channel 2: Non-inverting amplified

Channel 3: Offset

Channel 4: Output from Schmitt Trigger

The output of the Schmitt Trigger is -11.8V (≈ -12V as expected)

Figure 40: Trigger in Standby Status

Reset the channels again, we show the final scaled output of the control signal.

Channel 1: Output from Schmitt Trigger

Channel 2: Scaled Output / Control Signal (Standby)

Figure 41: Control Signal in Standby Status

22

Page 23: PHYSICS 111A Final Project: IR Burglar Alarm

Thus, the measurements verify that the final output control signal is -1V inthe standby status.

(II) Blocked / Environmental Signal - AlarmingNext, we test how the module works in alarming status. We use a 20Hz signal to

simulate this "Blocked / Environmental Signal".

The testing process is just as what we did in (I) for standby status.

(IIa) From Filter to RectifierFor simplification, we only show Channel 1 to 3. We see that the signal is totally

eliminated by the filter. Given zero input, the time averager will also output zero (ifthere is Ch4).

Channel 1: Simulated Input Signal

Channel 2: Filtered Signal

Channel 3: Half-Wave Rectification

Figure 42: From "Blocked" Signal to Rectified Signal

(IIb) TriggerAfter time averaged, we show its performance in the next few steps till the scaled

output of the Schmitt Trigger.

Channel 1: Output from Time Averager

Channel 2: Non-inverting amplified

Channel 3: Offset

Channel 4: Output from Schmitt Trigger

The output of the Schmitt Trigger is 11.5V (≈ 12V as expected). And it is sacledto be around 1V.

Thus our tests of the two status above verify that the Control Signal switchesbetween +1V(On) and -1V(Off).

• 3. Alarm TestFinally, We input the control signal ("standby": -1V; "alarming": 1V) into the

comparator together with the timer signal.

Channel 3(i): Control Signal

23

Page 24: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 43: Trigger in Alarming Status

Figure 44: Control Signal in Alarming Status

Channel 2(ii): Timer Signal

Channel 2(i): Alarm signal (Comparator Output)

(Noting that we accidentally messed up the channels for this single test. But theactual appearance was showed to Prof. Reinsch in our presentation, in the standbystatus, there was no output.)

(I) IR Signal - StandbyThe output of the comparator is at steady -11.6V, which will not trigger either the

Red LED or the speaker.

Figure 45: Control Signal in Standby Status (i)

24

Page 25: PHYSICS 111A Final Project: IR Burglar Alarm

Figure 46: Control Signal in Standby Status (ii)

(II) Blocked / Environmental Signal - AlarmingChannel 1: Control signal

Channel 2: Timer signal

Channel 4: Alarm signal (Comparator Output)

The timer signal is sent into the Red LED and the speaker. Alarms are switchedon!

Figure 47: Final Output in Alarming Status

Figure 48: Presentation

25

Page 26: PHYSICS 111A Final Project: IR Burglar Alarm

5. Trouble Shooting

In this section, we illustrate main problems encountered in the testing process and thesolution we find to tackle them down.

(a) Unstable Light SignalInitially we tried to test the circuit in standby status directly by the IR LED signal,

yet we found that the phototransistor was sensitive only to light from certain angles, andthe signal it produced was also not stable.

Our Solution: We copy the usual behavior of the IR signal and use signal generatorto simulate this signal instead.

(b) Difficulty Matching the Threshold of Schmitt TriggerThe output of averaged signal in standby status was found to be -2V while in alarming

status it was 0V. This difference was far from the threshold of our Schmitt Trigger (± 6V)and can’t be scaled within one step – we have to shift the zero voltage and increase thedifference between the two status.

Our Solution: We take two steps. First amplified the signal from -2V to -12V andthen added an offset of 10V.

(c) Failure on JFET SwitchThe initial design of the switch part connecting the control signal and the timer

signal was using a JFET, like the phototransistor. However, the nonlinear behavior of IDSagainst VGS added the difficulty. Though the JFET could serve as a switch, it was actuallyoverloaded.

Our Solution: We use a comparator instead, which has been discussed in section 3.5.(d) Unexpected Time Averager

When tested, we find that the integrator doesn’t work well in the given range offrequency. This deviation from the theory implies that the circuit we use is not a completeversion of practical op amp integrator. For instance, practical op-amps have a finite open-loop gain, an input offset voltage and input bias currents IB.

Our Solution: We find the effective set of resistor and capacitor by experiments andleave the debugging for future improvement.

6. Design Creativity

In this section we list the strength of our device.

(a) Invisible IR LED LightWe use IR LED light signal to test the intrusion, which is invisible to human eyes.

Such design enhances the security and covertness.(b) Effective Bandpass Filter and Other Module

As it is shown in section 4.1, our filter functions pretty well in eliminating the lowfrequency signals. It greatly reduces the probability of false alarms. Also, with this merit,the filter itself can be used into other necessary situations or as an example of the multistageactive bandpass filter design.

Likewise, as mentioned before, some other modules also functions well and can betaken out independently and put into other usage, such as the timer signal generator.

26

Page 27: PHYSICS 111A Final Project: IR Burglar Alarm

(c) Keep AlertingThe alarm will keep "warning" the user/operator of the intrusion until the device is

reset which means that the intruder could probably be taken down.(d) Two Output Signals

Since different people are sensitive to different types of alerting signals. We use bothflashing RED light signals and loud beeping sound signals. Such detailed design improvesthe actual affect of the alarm.

(e) DC Power OnlyApart from the IR LED, the other part of the device is powered only by ± 12V DC

voltage, which means it will work merely with several batteries.(f) Energy-saving

The circuit components we use are all simple and won’t cost much energy, especiallywhen the device is in standby status.

7. Conclusions and Further Improvements

7.1. ConclusionsWe successfully designed and built a IR burglar alarm device which realized all its ex-

pected functions according to our tests and measurements. The alarm will be triggeredonce the IR light is blocked or replaced by other "cover-up" light signals at low frequency(<10kHz). Independently, we made an effective bandpass filter which is good at clearinglow frequency signals. We also triumphantly produce a timer signal which can really betaken as alarms in real life. What’s more, the other functioning modules are built by inte-grating circuits learned from the previous labs, which means that we are able to creativelyapply knowledge into practice.

All in all, this was a very rewarding final project that we not only learned about a greatdeal of circuitry, but also had good fun making the circuit.

7.2. Further ImprovementsAs it always will be, our circuit still remains some points to be improved.(a) A More Advanced Light Sensor

We need a better light sensor which is sensitive to incoming light from arbitrarydirections, we also need it to be stable in producing current/voltage signals.

(b) A Perfect Bandpass FilterAs it is shown in section 4.1, though our filter works pretty well in eliminating low

frequency signals, it is not that powerful for blocking high frequency signals. In order tobuild a perfect bandpass filter, we might have to refer to Chebyshev Sallen-Key filter whichis more complicated and demanding.

(c) An Automatic Reset DesignAs mentioned several times, our device need to be reset manually for the next run.

There should exist a new design that would automatically reset the circuit after certain timeperiod. One possible way to realize this ambition is to use programs like LabView.

(d) An Industrialized VersionIn a more industrialized context, our circuit can be welded onto chips by CAD design

and PCB printing. The final outcomes are predicted to be small and exquisite.

27

Page 28: PHYSICS 111A Final Project: IR Burglar Alarm

8. References

• Physics 111A Lab Websites (3,4,6,7,8,12; only list the link of 3 as an example):

http://instrumentationlab.berkeley.edu/Lab3

• Filter Design:

1. Learning about Electronics,

http://www.learningaboutelectronics.com/Articles/Active-op-amp-bandpass-filter

-circuit.php

2. Electronics Tutorials,

https://www.electronics-tutorials.ws/filter/filter-7.html

• Time Averager Design:

1. https://en.wikipedia.org/wiki/Op-amp-integrator

2. Electronics Tutorials,

https://www.electronics-tutorial.net/analog-integrated-circuits/op-amp-integrato

-r/index.html

• Schmitt Trigger Design:

https://en.wikipedia.org/wiki/Schmitt-trigger

• Timer:

https://en.wikipedia.org/wiki/555-timer-IC

9. Acknowledgements

We would like to thank Prof. Matthias Reinsch for providing us with inspiring advice forthis final project, such as the comparator and the timer circuits, and with help throughoutthe semester. We would also like to thank the GSIs for helping us with understanding thetheories and the operation of the various circuits we dealt with in the lab, and answering allour questions with additional insights.

Figure 49: Nerd Begins!

28