Lab 7: Design and construct a burglar alarm

Sun May 10, 2020 09:48

The goal of this lab is to get familiar with comparators and the 555 timer chip, and to begin to design and construct more complicated circuits.


Outline: Prelab assignment, Burglar alarm, Buzzer, Oscillator

Prelab assignment

You will use the 2N7000 nMOSFET, the BPV11 photo-transistor, the LM311 comparator, and the 555 timer chips in this week's lab. Find the datasheets for these parts online. Save them in your ELOG, and put an image of the pinouts in your ELOG. This will help you have easy access to the pinout as you use it. (In particular, the BPV11 pinout may not match what you would assume.)

Note that there are a lot of different implementations of the 555 timer chip. They will typically have the same pin-out, but different performance specifications and power requirements.

To get an idea of the cost of these components, look them up on an electronics parts distributor's website. Commonly used distributors are Newark, Digikey, and Arrow.

Design and build a burglar alarm

Your "burglar alarm" will be a bit limited in applicability due to the constraints of our equipment, so you should just design a way to detect a shadow of something moving over a light sensor and cause a buzzer to play a sound when it does.

This is similar to the smoke detector design we discussed in class. For the sensor, you can use the photo-transistor. (You may also want to use a photo-resistor instead; it is up to you.) You will need to experiment with it to optimize the light sensitivity and decide where to place thresholds for your comparator. Changes in the ambient lighting will change that optimum, so it would be better to use an LED as a light source and detect something passing between the LED and the photosensor. If you have an LED, do it that way; if not, just use room light.

Make sure to build and test your circuit in stages. The stages are best placed away from each other on your breadboard, with jumper wires connecting the output of one stage to the input of the next. That will reduce the chance that working on one of them will disturb the others. You should also calculate, measure, and log the expected output for each stage. That will allow you to quickly retest the previous stages to make sure that they each still work as you add later stages. If you find problems after adding a stage, you might want to remove it from the circuit by disconnecting the wire connecting its input to the output of the previous stage and then retest the previous stage. That will allow you to make sure that the previous stages still work as expected. Then retest the previous stages with the new stage's input connected to make sure that the new stage is not unexpectedly loading the output of the previous stages.

Buzzer or speaker

Use either a buzzer or a speaker to play a sound for the alarm.

You can start by using the function generator to produce the oscillating signal to drive the speaker or buzzer, though making your own oscillator with a 555 timer is a second step discussed below.

Note that you will need to drive the speaker with a low output impedance source.

Oscillator

Use the 555 timer to produce your own square wave signal to drive the buzzer instead of using the function generator. Do this only after everything works well with the wavegen as a source, and then you can just swap the inputs.

We discussed in class the way to connect external components to the 555 timer to obtain oscillations, but you can also find this in the datasheet.