Putting It All Together

Let's Wrap This Up 

Up to this point we've talked about the parts needed, how to hook them up, and even dove deep into the software required to turn some relatively inexpensive off-the-shelf parts into a treadmill Stride-based Speed and Distance Monitor (SDM). The time from random distracting thought while riding on the bike trainer, through prototype, to final assembled example was about three weeks working on the project in little bits of free time. 

One Last Step

We need to program the NRF52840 Dongle with the S212 SoftDevice and Treadmill SDM Application. Nordic has made this very easy to do with the nRF Connect application. Simply follow the steps to Program application using nRF Connect Programmer. You'll need to write the S212 SoftDevice (ANT_s212_nrf52810_nrf52832_6.1.1.hex as of this writing). Then write the treadmill_sdm_s212 application onto the board. At this point you need to specify the SoftDevice ID. We've seen this ID before, in this case it's 0xBC. 

How Has it Performed?

It's been great! Each time I run indoors, I plug in the treadmill SDM into a wall outlet. Within a few seconds, certainly much less time than the treadmill takes to boot, the watch finds the "Foot Pod" and the run begins. The first long run with the Treadmill SDM I actually didn't mind the fact that I was running indoors on the treadmill. And now my left arm is free to do things like grab water bottles or stay still to view alerts without messing up the run distance and pace.

Occasionally, maybe up to once per run, I see what looks like a double-count of the white mark on the belt where the pace gets reported about twice as fast as what it should be. It happens so infrequently that I haven't dug into why it happens. Some guesses are either the optical sensor debounce timeout isn't quite long enough sometimes or that a bead of sweat gets on the belt and causing an extra read.

Another thing that I've noticed is that my treadmill belt speed seems to get faster over time. That is, the variation between the treadmill's displayed speed and the calculated belt speed gets bigger by a few seconds. I haven't figured out if this is caused by my running stride getting more efficient as I get warmed up therefore causing less of a slowdown to the belt or if the belt has less resistance on the rollers as it gets warmer.
Pace with Treadmill SDM
Pace without Treadmill SDM (Different Run)

Is it Accurate?

This one is a little bit tricker to answer. The speed and distance are certainly closer to the treadmill's display than the watches' accelerometers consistently achieve, but the treadmill SDM reports a faster belt speed than the treadmill's display does. I believe this faster belt speed is correct and some not-very-scientific counting of the belt revolutions and napkin math came up with the same speed and distance that was reported by the treadmill SDM. Overall, my treadmill seems to match up to roughly 3 miles per hour. Beyond that I see a 4-5% difference with the treadmill display slower than the recorded actual belt speed. To me, the actual belt speed feels closer to what I feel when running outdoors.

A small note from the future: After modifying the code to to keep track of the total distance and scale that distance value into sixteenths of a meter instead of adding the scaled belt length, I saw values on the watch that were closer to the treadmill's display. On the surface, the change should have at least lessened the difference by 1%. I have to do more runs on the treadmill to see if the 4-5% difference still holds.

A second note from the future: With the distance rounding error fixed I expected to see a distance that at least appeared to be treading closer to the treadmill display. This was not the case. For the latest long (7 miles) test run I saw about a 4.5% difference, in line with the difference I've seen on all my other test runs. I believe the watch is prioritizing instantaneous speed over reported distance and calculating its own distance using the reported "foot pod" speed. I modified the code at one point to report a speed of 0 and the correct distance and the watch was not happy with that. It never showed the distance incrementing and as I sat here writing this paragraph up I modified it to report only speed, no distance. In this case the watch displayed both pace and an incrementing distance further supporting the thought that it really only cares about the speed.

Thanks for Following Along

If you made it this far, good on you. Things got pretty nerdy along the way but I'm glad you made it here and I hope at least of part of this writeup helped in some way. Feel free to share this information or code with any of the fitness nerds in your life. I've got some future ideas so check back occasionally.










Comments

  1. I would definitely think that this methodology to be more reliable than the treadmill display, and it's a fun project, to boot. Thanks for sharing.

    Next you'll need to figure out a way to see how far your feet actually travel relative to the the deck, as opposed to the belt, to avoid any issues related the belt speeding up/slowing down while unloaded/loaded.

    ReplyDelete
    Replies
    1. Thanks for checking it out!

      I have a post coming on Saturday that looks into how the belt reacts with my feet on it using Garmin's Running Dynamics ground contact data.

      Delete
  2. You should definitely sell this ! I would buy it in an instant and I know a lot of people would buy it too ! There is nothing on the market that can do it and absolutely 0 treadmill with and+ capability

    ReplyDelete
    Replies
    1. Thanks snowfree52. I'm a little late to circling back on these comments but if you haven't already seen the North Pole Engineering Runn, it's essentially a real polished product that brings together a lot of what I talked about in this project.

      Delete

Post a Comment