The Story So Far...:

In the previous section to this project, I had completed a working trial of my graphical heart rate monitor. It successfully collected data from my Polar WearLink strap, displayed a neat little graph on my 2.8" Adafruit TFT LCD screen and stored the data to a file on a miniSD card.

There were however a few limitations and issues with the initial design, these being:

  • Size/form factor - device not really suitable for having "on-person"
  • Power consumption - I need a better battery option, or to reduce the power consumption of the Arduino
  • Durability - I need to build a suitable case for the device so it doesn't get shaken/broken apart while in use
  • Usability - I had no method of input or control, as I hadn't implemented any of the hardware supported resistive touchscreen functions

 

Phase Two:

I've decided to leave the hardware build alone for the moment, mainly because sourcing another RMCM01 module seems to be second to impossible, along with the difficulty of designing, fabricating and building a suitable new board while I really have no idea what the final product may look like or how it may behave. Due to the size of the device, I am now thinking it would be best suited to mounting on the front of pushbike handlebars... This opens up a whole new can of worms regarding sensor inputs (such as wheel speeds, selected gears, GPS location, gradients/angles of ascent or descent, etc). While it would be nice to cover all of these here, I'm planning to keep things as simple as possible for now.

 

Life, The Universe, Everything!:

Circumstance and life has a lovely way of messing up the most carefully designed plans. For me, this project was originally started while I was between jobs and had a lot more time to dedicate to thinking things through and writing and testing code. Sadly (or happily, as my bank balance sees it), I have since been employed fulltime and have no longer got nearly as much time to dedicate to my projects. This doesn't mean I have in any way abandoned it, just that future developments will be more likely to be weeks/months away, rather than days.

 

Current Progress:

So far I have started re-working my code to try and improve the usability of the device. This has however come at a cost, adding in support for the touchscreen I/O and some extra displays has drastically cut the amount of available flash for program code.

As a result, I've decided to try and push as much of the complex graphical aspects of the device off into the miniSD card as bitmap drawings. Large bitmaps don't load particularly quickly on the display, but in the case of the splash screen, this is a non-issue. For smaller graphical elements, such as a Y axis for displaying with BPM values, the bitmap is sufficiently small that reading it from the SD card and drawing it only takes a few milliseconds each time.

The added benefit of this is that changing the scale for BPM is trivial, as a new scale bitmap can be copied to the SD card from a computer. As there is so much free space to work with on the SD card, I moved some of the hardcoded values from the Arduino flash into a configuration file for easy modification. This doesn't save much space, but it does make it a lot easier to tweak settings without reloading the entire sketch each time, and opens the possibility of altering settings directly through the device.

 

I Dub Thee.... Heart-uino!:

First and foremost, apologies to all Italians out there, and anyone else who loathes portmanteaus! After a bit of thinking (and drinking), it was agreed to call the heart rate monitor "Heart-uino", based on the fact it monitors heart rate and is made from an Arduino. This was cemented with the creation of a little splash screen that now loads when the device is first powered up.

I have changed parts of the logic in the sketch, so interrupts and readings from the RMCM01 module are no longer enabled immediately from power-up. Instead, the splash screen is displayed and configuration settings are loaded, and the device awaits user intervention via a touch on the screen. The first touch then enables the interrupts and starts the timer that handles sampling, while clearing the screen and drawing the contents of a bitmap defined in the configuration file as the selected axes. Data being written to the miniSD card is recorded as millis() - start time, which gives a more accurate set of heart rate data for later analysis, as lag from loading configuration settings and the splash screen aren't included.

 

So, Where's The Code?:

To be completely honest, I simply have not yet had the time to upload it or the bitmaps to go with it... I'll upload it eventually when I have properly tested the changes, in particular those relating to the touchscreen.

 

More to come....

Comments:

Leave a Reply



(Your email will not be publicly displayed.)