MOD-EKG development board
User's manual
All boards produced by Olimex are ROHS compliant
Document revision B, December 2016
Page 1 of 17
INTRODUCTION:
MOD-EKG is an implementation of the hardware design proposed by Texas Instruments in their document “Heart-Rate and EKG Monitor Using the MSP430FG439”
(document name “slaa280a”). MOD-EKG is an open-hardware, open-software project.
The user places his index fingers and thumbs at the metallic pads of the board and the
heartbeat rate per minute gets displayed on the LCD. In addition, the application outputs
a digital data stream to a serial data interface which allows you to display EKG waveform on a PC. The serial interface is available at the UEXT connector. Using our serial
↔ USB adapter. A connection between the PC and MOD-EKG can be achieved by using our adapter – MOD-USB-RS232 that converts the serial interface to USB, and vice
versa.
An electrocardiogram (ECG), also called an EKG, is a graphic showing the
voltage generated by the heart muscle during a heartbeat. In this application, the EKG
waveform is used by the MCU to measure the heartbeat rate. Because heartbeat calculation is the major focus the electrodes are simplified to two points for collecting data, one
for the right hand and the other for the left hand.
BOARD FEATURES:
Microcontroller: MSP430FG439
EKG amplifiers with INA321EA
14-pin 0.1” step JTAG connector for direct microcontroller access via
MSP430 debugger to debug the software or to power the board
UEXT connector that allows easier connection to other boards
Custom LCD display
3V CR2032 Lithium coin battery holder
Extension rows of pinholes for all microcontroller ports – with no plastic
connectors placed
No additional electrodes required! Right and left hand contact boardmounted electrodes – HR1 and HR2
Two status LEDs
Two user buttons
A switch to alternate between “battery” and “UEXT” power supply
Based on Texas Instruments application note SLAA280a
FR-4, 1.5 mm, red soldermask, white component print
Dimensions: (3.0 x 2.8)" ~ (76 x 71)mm
Page 2 of 17
ELECTROSTATIC WARNING:
The MOD-EKG board is shipped in protective anti-static packaging. The board must
not be subject to high electrostatic potentials. General practice for working with static
sensitive devices should be applied when working with this board.
BOARD USE REQUIREMENTS:
In order to set up the PIC32-RETROBSD board optimally one or more additional items
may be needed. They might be generally placed in two categories: Required – items
that are needed in order to achieve minimum functionality; Recommended – items that
is good to have in order to be able to interact with the most important of the features of
the board.
a) Required items:
- A source of power; preferably a battery. MOD-EKG can take power from a number
sources:
1) +3V CR2032 Lithium battery placed in the battery connector at the back –
when switch BAT/UEXT is in position BAT.
2) JTAG deubgger placed in the JTAG connector – when jumper P_IN is closed
and P_OUT is opened.
3) Pins #1 (3.3V) and #2 (GND) of the UEXT connector – when switch
BAT/UEXT is in position UEXT; you can also supply 3V from a battery to these
pins
The power supply source gets selected by changing jumpers P_IN and P_OUT
and using the BAT/UEXT switch.
IMPORTANT: MOD-EKG is a sensitive board and glitches or noises in the power
supply lines might affect the readings. Even if the USB ports and the power supply unit
are of good quality, there is still parasitic capacitance between the human body and
mains power line, which affects the readings. Be sure to test with a 3V battery – either
insert a good CR2302 coin battery directly in the connector at the back of MOD-EKG
or attach a 3V battery to the UEXT. If you wish to power the board from the JTAG or
external power supply make sure there is galvanic isolation or good filtering between
the power supply and the MOD-EKG board. For example, if you want to isolate your
JTAG debugger from the mains power influence you can use our USB-ISO product
(between the computer's USB port and the JTAG debugger).
b) Recommended items:
- serial to USB adapter board – to connect to a personal computer; you can use a
number of our low cost solutions, for example, BB-340CH or MOD-USB-RS232; note
that the examples for computer connection use MOD-USB-RS232
- MSP430-compatible debugger with 14-pin (2 x 7) 0.1” step connector; if you want a
compatible low-cost Olimex product consider MSP430-JTAG-TINY-V2 or MSP430JTAG-ISO-MK2
Page 3 of 17
PROCESSOR FEATURES:
MOD-EKG board uses ultralow power microcontroller MSP430FG439 from Texas
Instruments with the following features:
Low Supply-Voltage Range, 1.8 V to 3.6 V
Ultralow-Power Consumption:
Active Mode: 300 μA at 1 MHz, 2.2 V
Standby Mode: 1.1 μA
Off Mode (RAM Retention): 0.1 μA
Five Power Saving Modes
Wake-Up From Standby Mode in Less Than 6 μs
16-Bit RISC Architecture, 125-ns Instruction Cycle Time
Single-Channel Internal DMA
12-Bit A/D Converter With Internal Reference, Sample-and-Hold and Autoscan
Feature
Three Configurable Operational Amplifiers
Dual 12-Bit D/A Converters With Synchronization
16-Bit Timer_A With Three Capture/Compare Registers
16-Bit Timer_B With Three Capture/Compare-With-Shadow Registers
On-Chip Comparator
Serial Communication Interface (USART), Select Asynchronous UART or
Synchronous SPI by Software
Brownout Detector
Supply Voltage Supervisor/Monitor With Programmable Level Detection
Bootstrap Loader
Serial Onboard Programming, No External Programming Voltage Needed
Programmable Code Protection by Security Fuse
Integrated LCD Driver for Up to 128 Segments
60KB+256B Flash Memory
2KB RAM
Page 4 of 17
BLOCK DIAGRAM:
MEMORY ORGANIZATION:
Page 6 of 17
1
2
10nF
2
4
6
8
10
12
14
BH14S
JTAG
1
3
5
7
9
11
13
JTAG
RST
TDO
TDI
TMS
TCK
4
5
6
4
1
1
5
2
2
6
3
3
3V-LI_BAT+ -BC-2001
+
Page 7 of 17
NA
GN D
NA
10uF/6.3V
C10
GND
TDO
TDI
TMS
TCK
RST
P6.0
P6.1
P6.2
GND
GND
VCC
P1.6/CA0
P1.5/TACLK/ACLK
P1.4/TBCLK/SMCLK
P1.3/TBOUTH/SVSOUT
P1.2/TA1
P1.1/TA0/MCLK
P1.0/TA0
XT2OUT
XT2IN
TDO/TDI
TDI
TMS
TCK
RST/NMI
P6.0/A0/OA0I0
P6.1/A1/OA0O
P6.2/A2/OA0I1
AVSS
DVSS1
AVCC
C9
2
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
32768Hz/6pF
P1.6
P1.5
P1.4
P1.3
P1.2
P1.1
P1.0
P3.3/UCLK0/S28
P3.4/S27
P3.5/S26
P3.6/S25/DMAE0
P3.7/S24
S23
S22
S21
S20
P2.6/CAOUT/S19
P2.7/ADC12CLK/S18
S17
S16
S15
S14
S13
S12
S11
S10
P4.0/S9
NA
1
2
3
4
VEREF+
VREF+
VEREF-
NA
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
10uF/6.3V
NA(0R)
C12
0R
R30
P2.3
VCC
REF
R31
680k
150k
R11
R26
R10
680k
1
Q1
2
680k
3
R9
R33
R13
COM2
S0
P3.7
P3.5
UCLK0
SIMO0
4
100nF
5
45
C11
6
44
8
6
4
2
8
6
4
2
8
6
4
2
7
43
P1.7
P1.5
P1.3
P1.1
7
5
3
1
NA(HN2X4)
PORT5
NA(HN2X4)
R23
COM3
COM1
S1
8
6
4
2
8
6
4
2
7
5
3
1
7
5
3
1
NA(HN2X4)
PORT6
NA(HN2X4)
7
5
3
1
UCLK0
P3.4
P3.5
P3.6
P3.7
S23
S22
S21
S20
S19
S18
S17
S16
S15
S14
S13
S12
S11
S10
S9
P6.6
P6.4
P6.2
P6.0
S3
S5
S7
S9
http://www.olimex.com/dev
COPYRIGHT(C) 2011, OLIMEX Ltd.
Rev. B
d
g
a
S19
UTXD0
P2.2
P2.0
MOD-EKG
P6.7
P6.5
P6.3
P6.1
S2
S4
S6
S8
PORT2
PORT4
7
5
3
1
P3.6
P3.4
SOMI0
P3.0
8
6
4
2
NA(HN2X4)
S18
URXD0
P2.3
P2.1
PORT3
P1.6
P1.4
P1.2
P1.0
Extensions
7
5
3
1
e
OLIMEX
NA(HN2X4)
PORT1
9
100k
100k
10
S23
P3.7
P3.6
P3.5
P3.4
R7
R8
8
42
S21
S22
C8
100nF
P1.7
P2.0
P2.1
P2.2
P2.3
UTXD0
URXD0
GND
VCC
R33
R23
R13
R03
COM3
COM2
COM1
COM0
P3.0
SIMO0
SOMI0
41
S19
S20
MSP430FG439
60
59
58
57
56
55
54
53
52
51
50
49
48
47
46
45
44
43
42
41
0R
S16
S17
S18
U1
P1.7/CA1
P2.0/TA2
P2.1/TB0
P2.2/TB1
P2.3/TB2
P2.4/UTXD0
P2.5/URXD0
DVSS2
DVCC2
P5.7/R33
P5.6/R23
P5.5/R13
R03
P5.4/COM3
P5.3/COM2
P5.2/COM1
COM0
P3.0/STE0/S31
P3.1/SIMO0/S30
P3.2/SOMI0/S29
11
DVCC1
P6.3/A3/OA1I1/OA1O
P6.4/A4/OA1I0
P6.5/A5/OA2I1/OA2O
P6.6/A6/DAC0/OA2I0
P6.7/A7/DAC1/SVSIN
VREF+
XIN
XOUT
VEREF+/DAC0
VREF-/VEREFP5.1/S0/A12/DAC1
P5.0/S1/A13
P4.7/S2/A14
P4.6/S3/A15
P4.5/S4
P4.4/S5
P4.3/S6
P4.2/S7
P4.1/S8
12
S14
S15
C7
100nF
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
37
NA(0R) 38
R28
39
NA(0R) 40
18
LCD
13
R29
4.7k
36
19
SW2
LCD
14
f
15
35
20
OLIMEX_LTD
NA(0R)
0R
R22
34
S11
S3
S2
21
T1107A(6x3.8x2.5mm)
VCC
NA
P6.6
P6.1
16
22
T1107A(6x3.8x2.5mm)
SW1
C16
R24 1M NA
24
C6
100nF
VCC
P6.3
P6.4
P6.5
P6.6
P6.7
VREF+
XIN
XOUT
VEREF+
VEREFS0
S1
S2
S3
S4
S5
S6
S7
S8
1k
umHF
1.5nF
R21
C15
17
33
NA
VCC
P6.5
P6.0
32
R25
R23 10k NA
P1.3 R18
NA
R20
31
S9
S10
23
C5
100nF
R6
1k
100nF
1
8
4
6
S7
S8
IS-1390(Default: UEXT is closed)
GYX-SD-TC0805SURK(RED)
R5
P6.2
A3
VOUT
RG
SHUTDOWN
V-
A2
1 60 k
48
10nF
NA
C13
4 0k
47
LED2
C17
VCC
A1
4 0k
46
GYX-SD-TC0805SURK(RED)
LED1
P6.7
ECG amplifiers
HR2
HR4
VINVIN+
V+
1 60 k
1M
28
30
100nF
3
2
3
7
REF
R19
INA321EA
S4
S5
S6
29
C3
C4
J2
P1.4
P1.5
SOMI0
SIMO0
UCLK0
P3.0
1
1-2:Open; 2-3:Close
100k/1%
100k/1%
2.2M/1%
2.2M/1%
820R
1M
5
P6.4
26
27
C2
VCC
3
R12
R13
R14
R15
R16
R17
P6.3
U2
100nF
R27
S0
S1
BAT/UEXT
J1
HR3
HR1
C14
S13
S12
0R
VCC
1
1-2:Open; 2-3:Close
UTXD0
URXD0
UEXT
25
3.3V_UEXT
BH10S
R4
4.7k
VCC VCC
R3
4.7k
3.3V_UEXT
UEXT-1
UEXT-2
UEXT-3
UEXT-4
UEXT-5
UEXT-6
UEXT-7
UEXT-8
UEXT-9
UEXT-10
10k
R2
VCC
2
C1
R1
100k
VCC
COM0
COM1
COM2
COM3
POWER SUPPLY
HN1x2(Close)
2
1
P_OUT
HN1x2(Open)
P_IN
c
b
P6.6
P1.6
SCHEMATIC:
BOARD LAYOUT:
Page 8 of 17
POWER SUPPLY CIRCUIT:
MOD-EKG can take power from:
1) +3V CR2032 Lithium battery placed in the battery connector at the back –
when switch BAT/UEXT is in position BAT.
2) JTAG deubgger placed in the JTAG connector – when jumper P_IN is closed
and P_OUT is opened.
3) Pins #1 (3.3V) and #2 (GND) of the UEXT connector – when switch
BAT/UEXT is in position UEXT; you can also supply 3V from a battery to these
pins
The power supply source gets selected by changing jumpers P_IN and P_OUT
and using the BAT/UEXT switch.
RESET CIRCUIT:
MOD-EKG reset circuit includes R1 (100k), C1(10nF), JTAG pin 11 and
MSP430FG439 pin 74 (RST/NMI).
CLOCK CIRCUIT:
Quartz crystal (Q1) 32.768 kHz is connected to MSP430FG439 pin 8 (XIN) and pin 9
(XOUT).
JUMPER DESCRIPTION:
P_IN
When this jumper is closed, the board is power supplied by the
standard JTAG pin 2. This is only possible when the
consumption of the board is not very high which is typically the
case with MSP430 microcontrollers. If this jumper is open the
board should be power supplied by another external source.
This jumper and P_OUT should always be reversely
open/closed, i.e. if P_IN is closed, P_OUT should be open and
vice versa.
Default state is opened.
P_OUT
When this jumper is closed, the board is power supplied not by
the JTAG but from external source. Then the JTAG has to
synchronize with the working voltages which is done through
this line. This is especially important when debugging with
JTAG. This jumper and P_IN should always be reversely
Page 9 of 17
open/closed, i.e. if P_OUT is closed, P_IN should be open and
vice versa.
Default state is closed.
J1
When jumper J1 is shorted in position 1-2, UEXT pin 3 is
connected to MSP430FG439 pin 55 (P2.4/UTXD0) – signal
“UTXD0”. When jumper J1 is shorted in position 2-3, UEXT
pin 3 is connected to MSP430FG439 pin 54 (P2.5/URXD0) –
signal “URXD0”.
Default state is shorted in position 2-3.
J2
When jumper J2 is shorted in position 1-2, UEXT pin 4 is
connected to MSP430FG439 pin 54 (P2.5/URXD0) – signal
“URXD0”. When jumper
J2 is shorted in position 2-3,
UEXT pin 4 is connected to MSP430FG439 pin 55
(P2.4/UTXD0) – signal “UTXD0”.
Default state is shorted in position 2-3.
Depending on jumpers J1 and J2 configuration, the board can work in host, or in device
mode. The default state of J1 and J2 is for device mode (shorted in position 2-3).
INPUT/OUTPUT:
LED1 (red) connected to MSP430FG439 pin 67 (P1.0/TA0).
LED2 (red) connected to MSP430FG439 pin 65 (P1.2/TA1).
User button with name SW1 connected to MSP430FG439 pin 59 (P2.0/TA2).
User button with name SW2 connected to MSP430FG439 pin 58 (P2.1/TB0).
Power supply switch with name BAT/UEXT – when in position BAT – the board is
power supplied via +3V lithium battery, when is in position UEXT – the board is
connected to other board with UEXT and is power supplied by the other board via
UEXT connector.
LCD custom display.
Page 10 of 17
EXTERNAL CONNECTORS DESCRIPTION:
UEXT:
Pin #
Signal Name
1
VDD
2
GND
3
TX
4
RX
5
P1.4
6
P1.5
7
SOMI0
8
SIMO0
9
UCLK0
10
P3.0
Page 11 of 17
JTAG:
Pin #
Signal Name
Pin #
Signal Name
1
TDO
2
Via P_IN to VCC
3
TDI
4
Via P_OUT to VCC
5
TMS
6
Not Connected
7
TCK
8
Not Connected
9
GND
10
Not Connected
11
RST
12
Not Connected
13
Not Connected
14
Not Connected
PORT1:
Pin #
Signal Name
Pin #
Signal Name
1
P1.0
2
P1.1
3
P1.2
4
P1.3
5
P1.4
6
P1.5
7
P1.6
8
P1.7
Page 12 of 17
PORT2:
Pin #
Signal Name
Pin #
Signal Name
1
P2.0
2
P2.1
3
P2.2
4
P2.3
5
UTXD0
6
URXD0
7
S19
8
S18
PORT3:
Pin #
Signal Name
Pin #
Signal Name
1
P3.0
2
SIMO0
3
SOMI0
4
UCLK0
5
P3.4
6
P3.5
7
P3.6
8
P3.7
PORT4:
Pin #
Signal Name
Pin #
Signal Name
1
S9
2
S8
3
S7
4
S6
5
S5
6
S4
7
S3
8
S2
Page 13 of 17
PORT5:
Pin #
Signal Name
Pin #
Signal Name
1
S1
2
S0
3
COM1
4
COM2
5
COM3
6
R13
7
R23
8
R33
PORT6:
Pin #
Signal Name
Pin #
Signal Name
1
P6.0
2
P6.1
3
P6.2
4
P6.3
5
P6.4
6
P6.5
7
P6.6
8
P6.7
REF:
Pin #
Signal Name
Pin #
Signal Name
1
VEREF+
2
VREF+
3
VEREF-
4
GND
Page 14 of 17
MECHANICAL DIMENSIONS:
Page 15 of 17
AVAILABLE DEMO SOFTWARE:
1. Example that demonstrates heart rate measuring, using MSP430FG439
microcontroller, requires IAR EW and JTAG tool. Available for download here: LINK
2. Instructions on connecting MOD-EKG to PC computer with the help of MOD-USBRS232, available here: LINK
For more information visit the web-page of the product:
https://www.olimex.com/Products/Modules/Biofeedback/MOD-EKG/
ORDER CODE:
MOD-EKG – assembled and tested board
HOW TO ORDER?
You can order directly from our web-shop! Please visit our web www.olimex.com for
more information.
REVISION HISTORY:
Hardware revision:
Rev. B, April 2011
Document revision:
Rev. Initial, June 2011
Rev. B, December 2016 – added important note about the main
power supply influence over the readings; improved warranty and
support information
Page 16 of 17
For product support, hardware information and error reports mail to: support@olimex.com.
All document or hardware feedback is welcome. Note that we are primarily a hardware
company and our software support is limited. Please consider reading the paragraph below
about the warranty of Olimex products.
All goods are checked before they are sent out. In the unlikely event that goods are
faulty, they must be returned, to OLIMEX at the address listed on your order invoice.
OLIMEX will not accept goods that have clearly been used more than the amount needed to
evaluate their functionality.
If the goods are found to be in working condition, and the lack of functionality is a
result of lack of knowledge on the customers part, no refund will be made, but the goods
will be returned to the user at their expense.
All
returns
must
be
authorized
by
an
RMA
Number.
Email
support@olimex.com
for
authorization number before shipping back any merchandise. Please include your name,
phone number and order number in your email request.
Returns for any unaffected development board, programmer, tools, and cables permitted
within 7 days from the date of receipt of merchandise. After such time, all sales are
considered final.
Returns of incorrect ordered items are allowed subject to a 10% restocking fee. What is
unaffected? If you hooked it to power, you affected it. To be clear, this includes items
that have been soldered to, or have had their firmware changed. Because of the nature of
the products we deal with (prototyping electronic tools) we cannot allow returns of items
that have been programmed, powered up, or otherwise changed post shipment from our
warehouse.
All returned merchandise must be in its original mint and clean condition. Returns on
damaged, scratched, programmed, burnt, or otherwise 'played with' merchandise will not be
accepted.
All returns must include all the factory accessories which come with the item. This
includes any In-Circuit-Serial-Programming cables, anti-static packing, boxes, etc.
With your return, enclose your PO#. Also include a brief letter of explanation of why the
merchandise is being returned and state your request for either a refund or an exchange.
Include the authorization number on this letter, and on the outside of the shipping box.
Please note: It is your responsibility to ensure that returned goods reach us. Please use
a reliable form of shipping. If we do not receive your package we will not be held
liable.
Shipping and handling charges are not refundable. We are not responsible for any shipping
charges of merchandise being returned to us or returning working items to you.
The full text might be found at https://www.olimex.com/wiki/GTC#Warranty for future reference.
Page 17 of 17