ECG SmartApp Assembly Manual Ver3
ECG SmartApp Assembly Manual Ver3
ECG SmartApp Assembly Manual Ver3
Contents
Contents ............................................................................................................................... 1
Introduction ......................................................................................................................... 1
Warnings and safety issues .................................................................................................. 2
Hardware description and how to build it ............................................................................ 3
Hardware specifications ..................................................................................................... 10
Components ....................................................................................................................... 11
Software Description .......................................................................................................... 12
Introduction
Hardware
The ECG device can be built easily (in less than 1 hour) and only a very basic electronics skills
are needed.
The simple circuit design and layout are a good compromise for having both a low cost and
good performance. It is based on few boards to be connected together:
• ECG module AD8232 (Module Single-Lead, Heart Rate Monitor Front End)
• Arduino Nano board
• HC-05 (or HC-06) Bluetooth module
Software
No software programming knowledge is required since all you need is to install the App by
opening the apk file from an Android smartphone and to upload the provided Arduino sketch
on the Arduino board (this can be done easily by using the Arduino Software IDE and one of
the many tutorials available on the web). However, source files are available to modify or
personalize the App (Android programming skills needed) and/or Arduino program (Arduino
programming skills needed).
By excluding the Smartphone and disposable parts (electrodes and batteries), the device whole
cost is between 20 and 25 Euros (25-30 US dollars).
The authors cannot be responsible for any harm caused by using any of the circuits or
procedures described on this manual. The authors do not claim any of the circuits or procedures
are safe. Use at your own risk. It is imperative that anyone who wants to build this device have
a good understanding of using electricity in a safe and controlled manner.
The ECG device is electrically connected to a person and only low voltage batteries must be
used for safety precautions and to prevent damage to the device.
DO NOT use any AC power supply, any transformer or any other voltage supply to avoid
serious injury and electrical shock to yourself or others. DO NOT connect any AC-line powered
instrumentation or device to the ECG device here proposed.
Placement of the electrodes on the body, provides an excellent path for current flow. When the
body is connected to any electronic device, you must be very careful since it can cause a serious
and even fatal electric shock.
AD8232 uses a Right Leg Driver (RLD) to reduce common-mode interference. As specified in
the AD8232 component datasheet, “Note that when using this amplifier to drive an electrode,
there should be a resistor in series with the output to limit the current to be always less than
10uA even in fault conditions”. Off the shelf AD8232 modules usually uses a 360 kOhm
resistor in series with the RLD output since its supply is 3.3V. To power the Arduino Nano
board at least a 6V battery is needed (7V is the value recommended by Arduino), so to keep
the RLD current limit lower than 10 uA, a higher resistor is needed. See following paragraphs
for more details.
Hardware description and how to build it
Device hardware can be easily obtained by assembling the three needed modules (ECG module
AD8232, Arduino Nano board and HC-05 or HC-06 Bluetooth module) as shown in figure 1.
Connections can be made by soldering wires directly to the boards or using connector cables
with female headers (figures 2 and 3).
The battery supplies the Arduino board; HC-06 (or HC-05) module is supplied by the Arduino
5 V voltage output while AD8232 module is supplied by the Arduino 3.3 V voltage output.
Beside the main connection scheme of figure 1, detailed steps are here described:
For safety issue, RLD output is connected to the electrode through a protection resistor. Off
the shelf AD8232 modules usually uses a 360 kOhm resistor (fig. 4) in series with the RLD
output since its supply is 3.3V. Even if the AD8232 module is powered by the Arduino at 3.3
V, in the worst-case failure, the battery voltage value should be considered. So, if a 6V battery
is used, to keep the RLD current limit lower than 10 uA, a resistor higher than 600 kOhm is
needed (current = voltage / resistance) like a 680 kOhm resistor. So, the 360 kOhm resistor
needs to be replaced by a 680 kOhm resistor (fig. 4). In case of a 9V battery a resistor of
1MOhm can replace the 360 kOhm resistor. This operation is the only one requiring some
soldering skill since such resistors (SMD) are very small.
An alternative to replacing the RLD resistor on the AD8232 board could be adding in series a
common through hole resistor (e.g. 330 kOhm in case of 6V battery of 680 kOhm in case of a
9V battery) to the SMD 360 kOhm resistor of the AD8232 board (the sum will be 690 kOhm
for 6V battery or 1040 kOhm for 9V battery). An easy way to achieve this is placing such
resistor between the RL pin of the AD8232 board and the RL electrode (fig. 5 shows a possible
easy solution); however, in this case it is not possible to use the AD8232 plug-in connector,
but it is needed to use the electrodes pins.
Figure 5: An alternative to replacing the RLD resistor; here a 680 kOhm resistor is used as
an additional resistor in series to the RLD resistor
Off the shelf AD8232 modules usually includes the electrodes cable that can be plugged in the
boards directly through the dedicated connector (fig. 7).
Figure 7: AD8232 electrodes cable
a) b)
c) d)
Since the Arduino Nano board has only 2 ground (GND) pins, one can connected to the
battery negative terminal and the other one can be connected to both GND pin of AD8232
and GND pin of HC-06. To avoid direct soldering on the boards, it is needed to find a
solution like the one in fig. 9 to use connector cables.
Figure 9: AD8232 GND pin and HC-06 GND pin connections in case of no soldering option
A switch can be placed through the battery cable (positive terminal) to turn on/off the device.
Instead of using an additional LED to check if the device is turned on, it is possible to use the
LED of the HC-06 module (or the other boards) that is ON when the board is powered. Some
holes are needed on the box: one for the switch, one for the electrodes cable and one for the
LED.
Figure 10: an example of device box with 9V battery holder included and a switch
Figure 11: ECG hardware
The device must be powered only by batteries and the voltage value must be between 6 and 9
V. The minimum voltage supply recommended for the Arduino nano is 7 V however if the
batteries are full charged, the device is able to work fine at 6 V (e.g. 4 x 1.5 V AA batteries full
charged or 5 x 1.2 V AA rechargeable batteries full charged). If operating at 6 V, the acquired
ECG signal may become quite noisy when the batteries becomes to discharge. Using voltage
value higher than 6 V (e.g. a 9 V battery) can avoid this issue.
The ECG device can work also with different Arduino boards. Arduino Nano and Arduino
UNO were tested. Other boards can be used (such as Arduino Micro, Arduino Mega, ect.)
however the provided Arduino sketch file needs modifications according to the board features.
The ECG device can work also with the HC-05 module instead of HC-06 one.
Hardware specifications
Through the electrodes, the ECG signal is amplified by the AD8232 modules.
AD8232 modules available on the market usually have a configuration of resistors and
capacitors that give a frequency band between 0.5 and 40 Hz. If the frequency bandwidth is
not specified in the documentation supplied by the vendor, it can be check by the component
values (they are usually present in the schematics supplied by the vendor) and the information
taken from the AD8232 component datasheet (available on the manufacturer Analod Device
website) where the calculation of the -3 dB cut off frequencies (for both low and high pass
filtering) are reported.
AD8232 modules usually have a overall gain of 1100 (100 for the instrumentation amplifier
and 11 for a second amplifying stage). Such Gain value can be specified in the variable “Gain”
inside the “Setting” page of the app (see “User Manual” file) to have the right ECG amplitude
value in mV.
Please refer to the AD8232 datasheet for further information (e.g. CMRR, RLD, noise
reduction, etc.).
After amplified and filtered by the AD8232 stage, the ECG signal (still analog signal) is
digitalized by the Arduino board (A0 input channel @ 600 Hz and 10 bits resolution) and then
transmitted to the HC-06 module by the serial communication pins; finally the data are sent to
the smartphone by Bluetooth.
Components
By excluding the Smartphone and disposable parts (electrodes and batteries), the device whole
cost is between 20 and 25 Euros (25-30 US dollars). Here all the components needed:
• ECG module AD8232 (Module Single-Lead, Heart Rate Monitor Front End) +
electrodes cable (usually already included in the off the shelf module)
• Arduino Nano board
• HC-05 (or HC-06) Bluetooth module
• Battery holder/clip
• Switch
• Box
• Connector cables / wires
Needed tools: tester, clippers, soldering iron and tin, screwdriver, pliers.
Software Description
No software programming knowledge is required. EcgSmartApp is available only for Android
(at least Android 6 or higher).
• Arduino Programming: Arduino sketch files can be uploaded on the Arduino board
easily by installing the Arduino Software IDE (free download from the Arduino official
web site) and following the tutorial available on Arduino official web site. A single
sketch file (“ECG_SmartApp_skecht_arduino.ino”) for both Arduino Nano and
Arduino UNO is provided (the sketch was tested with both the boards). The same sketch
should work also with Arduino Micro (this board was not tested). For other Arduino
board the sketch file may need changes.
• Installing the ECG SmartApp: To install the App, copy the provided apk file
“ECG_SmartApp.apk” on the smartphone memory, open it and follow the instruction
by accepting the permissions. Before installing, it may be needed to change the
smartphone setting by allowing installation of app from unknown sources (tick the box
of “Unknown sources” option of the “Security” menu). To connect the ECG device
with the HC-06 (or HC-05) Bluetooth Module, pairing code or password may be asked
in case of the first Bluetooth connection with the module: enter “1234”. If the App does
not find the Bluetooth Module, try to pair the smartphone with the HC-06 (or HC-05)
Bluetooth Module by using the smartphone Bluetooth Setting (pairing code “1234”);
this operation is needed only once (first connection)