Heart Rate Monitor Schematics and Source Code for the ATExpo 2007 EASi Line
For the second year in a row, we have designed the give-away hardware for the EASi Line demonstration at ATexpo. We would like to share with you the design, source code and binaries, so that those of you who are interested can learn, make modifications, or come up with some other useful purpose for the give-away. Essentially, what you received is a 4 digit display controlled by an Atmel Tiny2313 processor. The board also contains a differential amplifier, power supply, and various other electronics to detect a person's heart beat.
The board is powered by a 9V battery and has an auto-off feature to power down after a conversion is complete.
If you like your pulse reader board, you decided to use our project files to make your own or derivative project, or just have a comment in general, please send us an e-mail and let us know!
Project Details
Board Specs
[Back to Top]
Here are the specifications for the LED Readerboard.
- Processor: Atmel ATTiny2313
- Power Supply: 9V Battery.
- Clock Speed: Internal 1 Mhz Oscillator
- Minimum Power Requirements: 6.4V
- Current Draw when On: ~ 120 mA
- Current Draw when Off: 0.0001 mA
- Programmable with Atmel AVR tools & AVR Studio 4.12 or higher
- 6 Pin Program Header, Not included
- Code: C Source Available
- 4 digit LED display
- Pushbutton On
- Auto-Off
- LM324 quad amplifier configured as a very sensitive differential amplifier
Design Considerations
[Back to Top]
The Heart Rate Monitor was designed to be a give-away at the Assembly Technology Expo, and therefore had to meet a number of requirements. The following is a short list of the project design goals:
- Low cost
- All components on one side of the board except the battery
- Support for in-system programming
- At least one or two through hole parts to demonstrate various equipment on the EASi Line
To keep the device even more useful, we added a few design contraints of our own:
- Must draw very little or no current when off to extend battery life when not in use
- With only one momentary push-button switch, system must be able to turn itself off after a period of time
- Use common parts to help facilitate quick prototyping, and make purchasing for the show simple
What we ended up with is the design you'll find here.
Heart Rate Monitor Schematics
[Back to Top]
Heart Rate Monitor PCB Layout
[Back to Top]
 |
 |
| Front | Back |
PCB Silk Screen
[Back to Top]
 |
| Front |
Mechanical Layout
[Back to Top]
Parts List / Bill of Materials
[Back to Top]
|
35 Resistors
|
|
|
|
|
Quantity:
|
|
References
|
|
Value
|
|
Value2
|
|
Package
|
|
PartNum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
0603
|
|
ECJ-1VC1H471J
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11
|
|
C2, C3,
C8, C9, C13, C14, C17-C21
|
|
.1uf
|
|
50V
|
|
0603
|
|
C1608X7R1H104K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6
|
|
C4-C7,
C10, C11
|
|
10uf
|
|
25V
|
|
1210
|
|
GRM32DR61E106KA12L
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
C12
|
|
1uf
|
|
16V
|
|
0603
|
|
EMK107BJ105KA-TR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2
|
|
C15, C16
|
|
18pf
|
|
50V
|
|
0603
|
|
ECJ-1VC1H180J
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 Integrated Circuits
|
|
|
|
|
Quantity:
|
|
References
|
|
Value
|
|
Value2
|
|
Package
|
|
PartNum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
U1
|
|
LM324DR
|
|
|
|
SO14
|
|
LM324DR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
U2
|
|
ATTINY2313-20SU
|
|
|
|
SOP20.375
|
|
ATTINY2313-20SU
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
U3
|
|
LM317LDR2
|
|
|
|
SO8
|
|
LM317LDR2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 Transistors
|
|
|
|
|
Quantity:
|
|
References
|
|
Value
|
|
Value2
|
|
Package
|
|
PartNum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
Q1
|
|
MMBT3904
|
|
|
|
SOT23_MMBT3904
|
|
MMBT3904DICT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
Q2
|
|
MMBT3906
|
|
|
|
SOT23_MMBT3906
|
|
MMBT3906DICT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4
|
|
Q3-Q6
|
|
MMBT3906
|
|
|
|
SOT23_MMBT3906
|
|
MMBT3906DICT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 Miscellaneous
|
|
|
|
|
Quantity:
|
|
References
|
|
Value
|
|
Value2
|
|
Package
|
|
PartNum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2
|
|
DISP1,
DISP2
|
|
DISP_A-562G
|
|
|
|
DISP_A-562G
|
|
DISP_A-562G
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
J1
|
|
9V-CLIP
|
|
|
|
CONN PCB
9V
|
|
9V_CLIP
(special order)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
J2
|
|
AVR PGM
|
|
|
|
CONN-DIL6
|
|
Not
stuffed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
J3
|
|
CONN-H10
|
|
|
|
10 PIN
EDGE CARD
|
|
PCB
feature
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
SW1
|
|
SPST
|
|
|
|
B3FS-1002P
|
|
B3FS-1002P
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4
|
|
TP1-TP4
|
|
TEST_POINT
|
|
|
|
TEST_POINT
|
|
Not
stuffed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
|
|
X1
|
|
1.8432mhz
|
|
|
|
SMT_CSM7
|
|
Not
stuffed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instructions on using the Heart Rate Monitor
[Back to Top]
To being, press the Start button on the bottom left corner of the unit
The Display will now show the word "Hold".
Next place your thumbs from each hand on the metal contacts in the upper left and right sides of the unit. Place your index fingers on the back side and grasp the unit with even pressure. You do not need to squeeze firmly, but a constant pressure is needed to get a good reading. Make sure you are not touching any other traces or electronics on the unit. This will cause a bad reading. Also to improve accuracy, make sure right index finger is touching the pad on the back side of the unit. Also putting as much of your thumb on the pad as possible, will maximize your heart rate detection.
After a short period of time, the word hold will disappear, and a dash will appear on the display. This dash should pulse on and off with each heart beat detected. Remain still during this time.
The amount of time it takes to detect your heart rate varies depending on how strong the signal is. After the conversion is complete, the abbreviated word "pulse" will appear on the display followed by your heart rate. After this alternating message has been displayed several times, the unit powers down. You can press start switch again to check your heart rate again.
Heart Rate Monitor Source Code / Pulse Monitor Source Code
[Back to Top]
C Source:
Main.c
Binaries:
C Binary
Reprogramming the Atmel ATTiny2313 AVR Processor
[Back to Top]
In order to reprogram the board, you'll need to purchase an appropriate programmer and you'll need to use either the AVR Studio assembler or appropriate C compiler. Assembling or compiling the source is beyond the scope of this document. Your output should be in Intel hex format. We recommend the Atmel JTAG ICE mk-II debugger/programmer, with which you can use Atmel's AVR Studio software to reprogram the board. Reprogramming the board once you have this device is easy.
First, attach the 6 pin program header to the 10 pin header attached to the mk-II device. Pin one is the pin on the 6 pin header marked with an arrow.
Solder on a six pin header block to the PGRM labeled J2 through hole connections on the device. Pin 1 is the bottom right hand pin.
Match this up with the pin one from the header (arrow) and attach the mk-II to the board.
Power the board with a 9V battery. Continue to hold the button down to provide power to the board. Do not use a power supply as the floating grounds may blow your mk-II board.
Launch AVR Studio and connect to the mk-II device through the Tools->Program menu.
Click the Program tab. Choose the ATTiny2313 device.
Choose the Board tab and select an ISP frequency of 125 kHz. Write this value to the programmer.
Click the Advanced tab and read the Signature Bytes. You should get 0x1E 0x91 0x0A
Click the Fuses tab and read the fuses. You should get 0xFF 0xDF 0x64. Do not attempt to reprogram unless
this information is accurate.
Choose the Program tab again and set the device to Erase Device before programming. Choose your hex file with the "..." browse button.
Click "Program" to reprogram your board.
Further Resources & Disclaimer
[Back to Top]
Assembly Technology Expo
Disclaimer: This is not a medical device. This educational device has touch plates that directly come in contact with the human body. A nine volt battery is used as a power supply to operate this circuit. Modifications to the power supply, connecting probes that can enter the blood stream, or attaching this device to other powered equipment, can create a hazardous condition resulting in death or bodily injury. If you plan on experimenting with this device with the purpose of connecting to a human body, take time to educate yourself on safety issues related to this. Also, those individuals with known medical issues relating to the heart or circulation system should not be experimented on by non-medical individuals. Use and modify this device at your own risk. CPU Ready Consulting makes no claim this device is safe either before or after modification.
|