Heart Monitor
Challenge Design a heart monitor that can measure regular and rapid pulses
Solution An analogue heart monitor that produces a beep and synchronized flash modulated by a heart beat ranging from 60 to 100 beats per minute
Logistics 3 weeks, 2 people
My role Use OrCad to design and simulate circuit
Build and debug linear and digital circuits
Design Process
Break up the circuit into small manageable blocks based on its functional requirements
1. The circuit first detects, amplifies and filter out the heartbeat from background noise. (Green)
2. In a regular heart beat there are two sounds for each beat (let's call them S1 - the "lub" and S2 - the "dub"). The circuit must detect only S1 and ignore S2. (Pink)
3. When S1 is detected a beep is emitted and an LED briefly turned on. (Blue)
4. The beep is emitted from a small loudspeaker with an external power supply which must be driven by the circuit. (Yellow)
Figure out the signals you need in and out of each block and build it in OrCAD
Below is the complete schematic of our circuit running on +-15V and 5V. The colours in brackets refer to the block diagram above, with more detailed descriptions below each diagram.
Preparing the Signal (Green) Integrator, Band Pass Filter and Non-inverting Amplifier - A PZT detects the heartbeat and outputs a signal that is a derivative of Vin. An integrator converts the output of the PZT to a signal that is proportional to Vin, k*Vin. The bandpass filters out unwanted background noise and the amplifier makes the value of k larger (around 100 to 1000) so that a signal with a larger amplitude passes through the rest of the circuit.
Ignoring S2 (Pink) Peak Detector, comparator and Edge Detector - A peak detector and a comparator are used to detect S1 and ignore S2. The time constant of the peak detector and the reference voltage at one pin of the comparator is set such that the output of the peak detector does not fall below the reference voltage between S1 and S2 so the comparator outputs a high at S1 through S2, effectively ignoring the second heart sound. The edge detector uses digital logic to output a sharp peak at the rising edge of the comparator output.
S1 Detection Sensor (Blue) Wien bridge oscillator, 555 timer, BJT switch and DC block circuit - The 555-timer responds to the sharp peak from the edge detector producing a pulse that lasts 200ms. The oscillator produces a sinusoid of 450Hz. The BJT switch ensures that when the 555-timer outputs a pulse, the switch is closed so that the sinusoidal output is combined with the 200ms pulse but when the pulse is over, the switch is open so the sinusoidal output does not interfere with the signal. And finally the DC blocking circuit, gets rid of the DC offset caused so that the signal is centered around 0V.
Class D Amplifier (Orange) - Sawtooth generator, comparator, break before make circuit, Power FETs, low pass filter and speaker - The class D amplifier is needed to run the loudspeaker, it allows the analogue input signal to be converted to a digital signal that now drives the power FET switched which turn on and off alternatively to provide 1A source and sink to the low impedance speaker. The break before make circuit is a safety measure to ensure that no current shoots through the power FET switches and that both switches are not on at the same time.
Grab a breadboard and BUILD, Debug and build again
Keeping the circuit and wires neat considerably assists the debugging process.
When a certain block does not produce the expected outcome first probe the outcome of each previous block using the oscilloscope, and then check the voltage level at each node with a voltage meter to see if it is as expected. This helps organize the debugging process
Break a big problem into small, manageable pieces, so you can test each block separately.
Take notes of changes you make to your circuit so you can always backtrack.