Professional Documents
Culture Documents
Bioelex Pr4
Bioelex Pr4
MICROCONTROLLERS IN
MEDICAL INSTRUMENTATION
Amit J. Nimunkar
153
154 3 MICROCONTROLLERS IN MEDICAL INSTRUMENTATION
Reset,
interrupt(s)
Power Vcc
CPU regulation GND
EEPROM
Clock/
Crystal ADC
timing
Timers/ DAC
counters
Cloud
computing
Wireless
Signal communication/
Amplification
system
conversion Internet
Physiological
parameters
Power Embedded
management system
Signal
Amplification Interfaces/
system conversion
display
Figure 3.2 General block diagram for embedded medical system. (Adapted
from Texas Instruments, HealthTech Applications Guide, HealthTech
Overview, 2013. Courtesy of Texas Instruments Incorporated.)
gain and filtering. Along with removing noise and amplifying the signal of
interest, the analog circuitry should offer long-term stability with regards
to offset drift and gain, over time, and temperature. Figure 3.2 shows forms
of embedded systems for data acquisition, processing, storage, display, trans-
mission, data analytics, and feedback.
The data acquisition and feedback are facilitated using an analog-to-digital
converter (ADC) and a digital-to-analog converter (DAC), respectively.
These converters should provide high precision and accuracy, wide dynamic
range, and appropriate resolution for the measurement under consideration.
The embedded system is the most important feature of the medical device
and could be considered as the brain of the device. It should not only provide
functions including data acquisition, mathematical calculations, signal proces-
sing, data storage, communication, and display, but it should also provide accu-
rate, reliable, responsive, and safe operation of the device. The embedded
system should incorporate multiple error detection, peripheral fault detection,
interrupts to handle faults, and critical operations (Predko, 1998). This allows
156 3 MICROCONTROLLERS IN MEDICAL INSTRUMENTATION
ECG
Microcontroller amplifier
circuit
Tx
Rx
SPI
SPI
Rx
Tx
Wireless Power
Storage Display
communication management
EXAMPLE 3.1 If lead I and lead II ECG signals are obtained using appro-
priate electrode connections as described above, show how lead III can be
calculated mathematically in the microcontroller. Similarly, show how the
augmented leads (aVR, aVL, and aVF) can be calculated mathematically.
ANSWER The Einthoven’s triangle relation for the three ECG leads is
expressed as:
The power management unit should satisfy the power requirements for
different components. The ECG amplifier circuit performs the necessary
amplification and filtering. Since the ECG signal contains both positive
and negative going waveforms, the circuit provides a level-shift of appropri-
ate dc offset such that the ECG signal is within the voltage range of the
microcontroller (0 to 5 V, 0 to 3.3 V, and such). The microcontroller allows
for display of useful parameters such as the heart rate or the signal itself
depending on the resolution of the display. Wireless communication in
the form of Bluetooth, Wi-Fi, ZigBee, and others facilitates transmission
of the ECG signal or relevant parameters to external terminal or handheld
devices such as cellphones or tablets. The information could also be locally
stored using a secure digital (SD) card for further processing.
We will use this simplified example to build a functioning single lead
ECG system and discuss some of the relevant components of an embedded
medical system.
EXAMPLE 3.2 In Figure 3.3, calculate appropriate gain for the ECG ampli-
fier circuit in order to amplify the ECG signal before feeding to the
microcontroller.
ANSWER The gain for the ECG amplifier circuit depends on the voltage
range for the ECG signal, which is 0.5 to 4 mV (Table 1.1) and the voltage
range for the microcontroller (0 to 5 V, 0 to 3.3 V, and such). Thus, if the
voltage range for the microcontroller is 0 to 5 V, the gain = 5 V/4 mV =
1025 for the above range of ECG signal.
158 3 MICROCONTROLLERS IN MEDICAL INSTRUMENTATION
Table 1.1 shows the ECG signal is in the voltage range of 0.5 to 4 mV and
frequency range of 0.01 to 250 Hz. Thus, the signal needs to be amplified
appropriately and filtered to minimize unwanted interference and maximize
the signal of interest. Section 6.3 provides more information about the details
to be taken into consideration in the design and application of commercial
ECG systems. Nevertheless, Figure 3.4 provides a simplified design example
of the analog circuitry for ECG amplification and filtering consisting of
instrumentation amplifier, active bandpass filter, level-shifter, microcontrol-
ler, and power supply unit.
For this particular example, we will use the mbed Nucleo F303K8 micro-
controller board (STM32 Nucleo-32 Board User Manual, 2016). However,
the example could be implemented by replacing it by a microcontroller
development board such as Arduino Mega ADK (2018), Tiva C Series
TM4C123G LaunchPad (2013), or other such quick prototyping microcon-
troller development board.
Vcc_USB
10μ GND FREQ×2
C– TC962 VOUT –V
C2
+
10μ L1
–3.3 V (DC–DC convertor) D1/TX VIN
D0/RX GND
RST RST
Rvar 1n GND 5V
GND_D
GND_A
NUCLEOF303K8
C4 R8 R7 D2 A7
500 D3 A6
U1 D4 A5
20k 10k
1.2Meg D5 A4 R9
Rg Rg
+V
D6 A3 Output
+V
R4 D7 A2 1k 1μ
Electrode_1 In– V+
D8 A1 C9
+V
+V
C3 R3 + U4
+ U3
R6 – D9 A0 GND_D
Electrode_2 In+ Out –
+ – TL072 D10 REF L2
47μ 68k + – TL072 20k R5 D11 3.3V
Right_Leg V– Ref
–V
D12 D13
–V
10k
+3.3_D
+3.3_A
LT1920
–V
Figure 3.4 A simplified example for Universal Serial Bus (USB) powered single-lead ECG
circuit consisting of instrumentation amplifier, bandpass filter, level shifter, and microcontroller.
The DC–DC converter provides −3.3 V for the amplifiers.
160 3 MICROCONTROLLERS IN MEDICAL INSTRUMENTATION
EXAMPLE 3.3 For the ECG circuit design shown in Figure 3.4, calculate
the overall gain and frequency response.
ANSWER For the ECG circuit design shown in Figure 3.4, Linear Technol-
ogy instrumentation amplifier LT1920 is implemented in the current design.
The gain (GIA) equation for LT1920 is (LT1920 Datasheet, 2019)
f L = 1 2π × 1 2 × 106 × 1 × 10 − 9 = 133 Hz
Thus, for this stage the gain (GIN) is 17.6 and pass band from 0.05 to 133
Hz. Carter and Mancini (2017) provide an overview for higher order filters
for better frequency response.
Finally, the level shifter is implemented as a differential amplifier
(Section 1.14) to provide a dc offset of 1.65 V for the microcontroller. The
gain for this stage is given as
GLS = V + − V BPF × 10 kΩ 20 kΩ
where V+ = 3.3 V and VBPF is output from the bandpass filter stage. Thus,
This preprocessed ECG signal is then fed into the microcontroller for
further processing. This could involve additional gain, digital filtering, signal
3.4 SELECTION OF A MICROCONTROLLER 161