Analogue_circuit

advertisement
Electronics Design Project
Building a lively display of pulse rate
Analogue design
Goals: In this lab, you will become familiar with the infrared (IR) light-emitting diode and
phototransistor that are integrated into the optical that will be used in the project. You will also
design and prototype the operational amplifier-based filter.
Design Objective: You will design and prototype the analogue side of the electronic project and
document the circuit diagram.
Deliverables:





A schematic of the analogue section of the pulse rate circuit comprising the sensor and the
amplifier circuit;
A functional block diagram that shows how the signals move from one block to the next;
A simulation of the operation of the circuit
A bill of materials that lists all of the resistor and capacitor (nominal values and tolerances
along with any additional information such as type of capacitor – electrolytic, film, ceramic)
An image from the oscilloscope of signal traces showing the sensor output and the amplified
and filtered output that will then be used as an input to the microprocessor. Information
One Design Specification:

Voltage supply is 3.3V and ground. 3.3 V is the maximum voltage that can be output by the
mbed microcontroller.
Biasing and Testing the Optical Sensor:
The design choices for the sensor are the resistor values required to get it to operate appropriately.
The IR LED is just a normal LED with a slightly lower turn-on voltage than the green, yellow, and red
LEDs. The forward voltage for it can be read from the data sheet and the typical current is also
shown in the datasheet. The light emitted by the IR LED cannot be seen by your eye.
The photo transistor biasing is a bit more obscure. Basically the bipolar junction transistor (BJT)
switches off when there is no infrared light that is shining on its surface. It will switch fully on when
there is a lot of light reflected into the base of the transistor.
Our need lies in between but to get maximum voltage swing on the collector, we proceed as follows:
1. The typical collector current IC for the transistor when the transistor is biased in saturation,
which is found on the data sheet.
2. To calculate the current-limiting resistor given the voltage supply that will be used in the
circuit. Assume that the voltage from collector to emitter is nil (VCE = 0 V).
Hence, we get
I C sat RC  Vsupply
Use this equation to calculate a value for RC, which will limit the maximum current from the
phototransistor when it is biased in saturation.
3. Choose the nearest standard value to RC from stockroom and wire it between the supply
voltage and the collector pin on the transistor in the optical sensor package. Use the bench
power supply and adjust to 3.3V. Testing the sensor to measure the range in collectoremitter voltage VCE, which will change when the collector current IC changes before and after
you place your finger on the optical sensor.
4. Use an oscilloscope to examine the sensor output (at the collector pin of the sensor). You
will need to adjust the scope to its most sensitive setting. You will likely have to fiddle your
finger around on the surface of the sensor to align a blood vessel over the sensor (trial-anderror). When you detect a pulse – a time-varying voltage when your finger is stationary on
the sensor – record it for your lab books and for your submission. [What time scale should
you set the oscilloscope sweep so that you see 1-2 pulses on the oscilloscope display?]
Designing and Testing the Amplifier and Filter:
1. After you determine the amplitude of your signal from the optical sensor, decide on the gain
that will be used with the operational amplifier. Record your calculations for the gain in
your notebook.
2. A passive or active filter can be used to remove noise from the signal. The electrical noise
can be 50 Hz that is a result of inadequate optical filtering of the light from the light fixtures
in the room, d.c. that is a result of sunlight reaching the optical sensor, and RF noise picked
up from the wires in your circuit. Determine the likely range in frequencies of the pulses.
The corner frequencies of your low-pass filter should be a factor of 10 smaller than the
minimum frequency of the pulses and the corner frequency of your high-pass filter should
be a factor of 10 higher than the maximum of the pulses. Record these corner frequencies
in your notebook and the range in pulses that you expect to measure.
3. Choose the resistors and capacitors for the amplification and filtering. Selecting these
components can be a bit circular – the value of each component can depend on the other
components in the circuit. However, I suggest you do the following:
a. Determine the ratio of the input and feedback resistors in the amplifier.
b. Design the input filter (high pass). You need to think of the corner frequency you
want for this filter and then, using the formula, determine the C and R values.
HOWEVER, the challenge is that the R has not to be too big because the other
resistor has to be so many times larger. The smaller the R is the larger the C has to
be and large capacitors are annoyingly clumsy.
c. Design the low pass filter. The input resistor determines the feedback resistor via
the required gain. The C value for the capacitor can then now be calculated once you
have decided on the corner frequency.
d. Determine the reference voltage for the positive input terminal for the op amp. This
helps limit the number of false pulses that will be measured. This is simple – a
voltage divider with two resistors where the voltage supply is 3.3 V. The values of
the resistor are not critical, but they should not allow too much current to pass (a
waste). However, they cannot be too big or the current that flows into the
operational amplifier (ideally 0 mA, but nothing is ideal) will affect the voltage at
positive input terminal of the operational amplifier. To determine what is too big,
find the value of the differential input resistance of the operational amplifier. Also
note that there is noise generated by the resistors themselves, which increases as
the value of the resistor increases, known as thermal or Johnson noise.
e. You also need to add in the bypass capacitor to prevent noise from the voltage
supply from affecting the output of the operational amplifier. This should be
biggish, say 0.1uF, or 1uF. It can be a polarised electrolytic capacitor if you want
biggest values.
f. Simulate the operation of the amplifier. Verify that the gain and corner frequencies
are as you had expected.
g. You will likely have to go round your design cycle several times to settle on values.
Record all attempts in your notebook – the calculations along with the results from
the simulation.
4. Once done, use the prototype board and wire your circuit up. Test your design using a
known time-varying signal input and the oscilloscope to compare the input signal with the
output of your amplifier and filter. Record the operation in your notebook.
5. Once your amp is running as designed, connect the optical sensor’s output as the input
signal to the amplifier and filter circuit. Collect images from the oscilloscope of your pulse as
measured by the optical sensor and then filtered and amplified.
Download