Monday, October 22, 2012

Heart Rate Monitor Project – Phase 1: Software

Over the weekend I developed some initial code to work with the hardware setups posted last week. The code was developed in Arduino 1.0.1.

Ant+ Heart Rate Monitor Code for Arduino

Sunday, October 14, 2012

Heart Rate Monitor Project – Phase 1: ANT + Arduino Hardware Setup

As outlined in a previous post I am working on a project to interface an ANT+ Garmin Hear Rate Monitor Strap to an Android tablet.  The first phase is to get heart rate statistics sent via ANT from the heart rate monitor to an Arduino.

I am working on solutions with two ANT modules: Sparkfun’s USB ANT Stick and Dynastream Innovations ANT11TS33M4IB Module

Sparkfun USB ANT Stick Hardware Setup

Both modules run at 3.3V so I wired up an 8Mhz breadboard Arduino running at 3.3V.  Connecting the Sparkfun USB ANT Stick was easy.  All that was required was soldering four pins into the holes located on the board.  If you look at the insert of the board in the picture below you will see the four pins.


Once the pins were connected the board was plugged into the breadboard with power connected to the power rail running at 3.3v, ground to the ground rail, receive to D7 and transmit to D8 on the Arduino.

Dynastream Innovations ANT11TS33M4IB Module Hardware Setup

Connecting the Dynastream module was a bit more of a challenge than the Sparkfun module.  The Dynastream module is a square board that measures roughtly 0.75” of an inch. On two sides of the board there are 7 holes / pads and on a third there are 3. Given the spacing of the holes and their locations the module isn’t breadboard friendly.

I found that the individual wires in a Cat5 LAN cable were the right size to fit into the holes. I cut a section of Cat5 cable, extracted the individual wires and soldered them to the board and then plugged them into the breadboard.


Additional pictures from the sides showing the connections:


The following pin out was used.

Module Pin Pin Name Connected To
2 /RESET 3.3v
3 Vcc 3.3v
6 /SUSPEND 3.3v
10 BR2 GND
11 TXD0 D7
12 RXD0 D8
13 BR1 GND
14 BR3 GND
17 RTS D12 w/1Mohm to 3.3v

The 1M ohm pull up resister on pin 17 is key. If you don't have it the board goes into sensRcore mode and will not respond to async communications.

Next Steps

With the hardware all setup the next step will be to program the Arduino and test communications from the heart rate monitor strap through the ANT module to the Arduino.  This will be the subject of the next post.

Heart Rate Monitor Project

As the summer drew to a close I decided that monitoring my hear rate as part of my indoor training regime would make for an interesting project and might make cycling indoors a bit more interesting. To do this I decided to interface the heart rate monitor with my Android tablet.


After doing some research I decided that there were three approaches I could take.

  1. Get a bluetooth heart rate band and interface with the tablet via bluetooth.
  2. Get an ANT capable heart rate band and interface with the tablet using ANT and the android open accessory protocol.
  3. Get a heart rate band from Polar and interface with the tablet using a Polar wireless interface board and the android open accessory protocol.

I decided to go with the ANT approach. This was partly because of cost but also due to the fact that there are other sensors including ones that measure cadence and speed that make use of ANT.

What is ANT?

ANT is a 2.4GHz wireless networking protocol and embedded system solution designed for low power wireless sensor networks. It has a focus on sensors for measuring various aspects of exercise and while it isn’t restricted to this it does seem to be a popular us case.

For the most part ANT sensors are used in combination with GPSes which provide readout and recording of the sensors. There are also a few smart phones that are ANT capable.

Heart Rate Belt

An ANT heart rate monitor consists of the sensors for picking up your heart beat and a small lower power transmitter attached to a belt or strap that is worn across the chest. The sensor picks up the heart beats and then broadcasts them so they can be picked up by an ANT receiver.

For my project I chose the Garmin Soft Strap model HRM2-SS which I found on Amazon for $44.

ANT Modules

I started by purchasing Sparkfun’s USB ANT Stick.  This was a very nice module because it got me both a USB interface that could be plugged into a PC.  Also the board broke out power, ground, transmit and receive which facilitated connecting them to a microprocessor.  Unfortunately, shortly after I purchase this from Sparkfun they discontinued the product with no replacement.

I also ordered a Dynastream Innovations ANT11TS33M4IB Module as I felt the form factor of this module would work better in the final design.  The Dynastream module is I purchased is the module on the ANT website that is recommended for prototyping. It can be purchased from several sources. I purchased mine from Digikey.

Next Steps

My plan for moving forward is to start by interfacing the ANT modules with an Arduino.  Once I have done this I plan to leverage the Circuits@Home USB Host Shield that I purchased and tested out last spring to interface with Android.

Time Flies – June through September 2012

I was on a roll the first part of 2012 with 14 posts.  Over the summer I got busy with other things and see that I haven’t posted anything since May.  Now with the days getting shorter I have time again for a projects and some new ideas.