ANT+ Stride-based Speed and Distance Monitor (SDM) Profile


Living in the SDM Profile 

One of the minor frustrations when living inside the constraints imposed by existing solutions is that occasionally you get reminded of how you should be doing things:
A stride based speed and distance monitor (SDM) is a personal body-worn device that allows the wearer to measure the number of strides taken, the speed at which he or she is traveling and/or the distance he or she has covered based on stride measurements and calculations. Some examples of SDMs include the foot-worn pods that go on, or in, a shoe and reconstruct strides to compute speed and distance while walking or running. Similarly, pedometers that may be worn on the waist or elsewhere are also considered SDMs. There are other profiles that allow for the measurement of speed and distance obtained from sensors that are not stride based.
Such is life. The profile is supported natively on the watches so we're going to make it work. So what does that mean? Well, for one, the only required field on all the data pages for the SDM profile is the Stride Count field.

Stride Count

The stride count field doesn't appear to have any impact on the on the recorded activity, by itself anyway. I think it was ending up in the recorded activities as cadence (in some form) when I was populating the Time field at the same time. The strange cadences I observed disappeared after leaving the time field set to 0. I never went back to investigate this because I was just happy that strange cadences, that ended up creating a very incorrect stride length in the recorded activity, were gone after no longer updating the time field. It should also be noted that I misinterpreted the time field and was putting the time delta of the last calculation instead of the total elapsed time, so this could have had something to do with the bad cadences.

I tested leaving the stride count at 0 and saw no negative impact. In the end, I increment the stride count once per belt revolution to help with debugging.

Distance

The distance field represents the accumulated distance for the activity. Each time a mark is seen, the distance gets updated by the treadmill belt length.

Instantaneous Speed

The instantaneous speed field is expected to be a smoothed pace ready to be displayed to the user. Normally, we'd probably have to do some sort of smoothing on the data to come up with a steadier value. Since the resolution on the treadmill belt is only one mark per revolution just using the elapsed time between the last two marks to calculate a pace for the last 3 meters or so (belt length) works out well.

What about Cadence?

Real foot pods also broadcast cadence as well. Can we do that? Well... maybe. Data Page 2 (an optional page) contains data fields for cadence. The very quick answer is that just using the NRF52840 Dongle and IR Sensor provides no hardware for getting real cadence data from a user.

I initially hoped that by having the treadmill SDM not report cadence the watch would use its internal accelerometer to fill in the missing cadence. This was not the case. So that leaves activities recorded with just the Distance and Instantaneous Speed fields in with a cadence of 0 for the entire activity. I was fine with this as a solution, since I really don't ever analyze my cadence after the fact. So, I didn't attempt to integrate any cadence monitoring.

Another alternative is to just make the cadence up. You could always just use a constant cadence of 90 (cadence is one per every two foot strikes), for example. Or, use a known stride length and the belt length to calculate strides per belt length to estimate cadence.

While I was waiting for the NRF52840 Dongle to arrive I did some testing the GY-521 accelerometer/gyroscope development board and a Teensy LC (Arduino-like board). I placed the breadboard prototype on the back of the treadmill where I was planning on placing the treadmill SDM. I sampled the accelerometer and various frequencies and smoothed the data a little with a moving average. I found that even with all of the vibration caused by the treadmill the foot strikes appeared to stand out and that using an accelerometer sitting on the treadmill rails to determine cadence looked plausible. Maybe I'll build a version 2 of the treadmill SDM that attempts to add cadence.

Calories?

Can someone explain this one to me? Data Page 3 (also an optional page) gives the SDM a place to report calories back to the watch. If anyone has more info about why this was included, I'd love to know its background. It doesn't seem like this information can be more accurate than a calculation that can be performed on the watch where much more information is known about the user. Maybe this made more sense in 2009 when the Calories field was added to the profile.

Next Up

I'll take a very brief look at the Bluetooth Running Speed and Cadence Specification and how this project might be able to support Bluetooth.

Comments