element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Bluetooth Unleashed Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Bluetooth Unleashed Design Challenge
  • More
  • Cancel
Bluetooth Unleashed Design Challenge
Blog Smart exercise bike computer. Part #2: Simple measurements
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: yuritikhonov
  • Date Created: 11 May 2018 8:50 AM Date Created
  • Views 1760 views
  • Likes 8 likes
  • Comments 8 comments
  • bluetooth
  • freedom_development_platform
  • bluetooth_unleashed
  • frdm
  • design_challenges
  • frdm-kw41z
  • nxp
  • bt_exercise_bike
  • sport
Related
Recommended

Smart exercise bike computer. Part #2: Simple measurements

yuritikhonov
yuritikhonov
11 May 2018

Good day!

 

This week I want to talk about simple measurements, namely about measuring the speed and distance traveled on an exercise bike, but let me first present to you my exercise bike.

image

 

This is the most common exercise bike manufactured by Atemi, which I used for many years as a clothes hanger, and only the last three years I have used it for its intended purpose – for sports, and as a result the device suffered minor damage:

  • saddle has sagged;
  • steering has broken (it was necessary to make a new fastening);
  • locks on the pedals have broken  (without them it only got better);
  • standard bicycle computer suffered little damage  (so I now have a reason to make a new one!)

 

Despite of the said "cosmetic" disadvantages, the exercise bike continues to perform its main function!

 

How the bicycle computer works?

 

Now let's focus on the bicycle computer and try to understand how it works. My bike has only two sensors connected to the computer:

  • pedal position sensor (green connector);
  • pulse sensor (red connector).

 

image

 

At the moment, we are most interested in the pedal position sensor. In order to better understand how it works, I dismantled the exercise bike and photographed the sensor.

 

image

 

It turned out that the sensor is a regular normally open reed switch, which has zero resistance when there is a sensor nearby, a magnetic field source and an infinite resistance in the absence of a magnetic field source (I was convinced of this experimentally using an ohmmeter).

 

There is only one magnet on the pedal assembly of the exercise bike, so the sensor generates one pulse per pedal cycle. OK, now we have the initial data to calculate the distance and speed.

 

Distance calculation

 

The most correct way of processing data from our sensor, in order to determine the distance traveled is, in my opinion, using the [discrete counting method], which in our case consists in counting the number of turns of pedals (i.e. the number of switches of the reed from the open state to the closed state or vise versa).

 

Suppose that we have done 120 turns of pedals, how can we interpret this information now? There are several approaches.

 

The first and simplest is the definition of distance (S1) that a person would walk by the usual step (do not run!) To do this, multiply the number of turns (N) of the pedals by the distance between the pedals (D1):

S1 = N * D1

 

I determined that the distance from the central axis of the pedal assembly to the axis of rotation of the pedal is 24cm, hence the distance between the pedals is 48cm.

 

image

 

Thus, if rider completes N = 120 turns, D1 = 0.48m, then the distance traveled by him will be:

S1 = N*D1 = 120 * 0,48m = 57,6m

 

Another way to evaluate the distance traveled is to compare the parameters of an exercise bike with a real bicycle. I found the following table in Wikipedia:

 

image

 

According to this table, the speed is directly dependent on the [transmission]. My exercise bike has 8 tension levels and I'm currently using the 6th. Suppose this is equivalent to High Gear in the table. The table shows the speed of rotation of the pedals in rpm and the speed of the bike in km/t. For 120rpm and High Gear, the bike speed is 57.9 km/h or 0.965 km/min. Thus, making 120 turns (N) of pedals on a bicycle, we would have passed 965m (S2).

 

From here it is easy to determine D2 – the distance the rider passes for one turn of the pedals:

D2 = S2 / N = 965m / 120 = 8,04m

 

Surely you are curious to know how a standard bicycle computer measures the speed? Let's try to calculate D3, by analogy with D1 and D2, knowing the following initial data I got experimentally: Having made 120 turns (N) on the exercise bike, I fixed the distance (S3) 800m. In this way:

D3 = S3 / N = 800m / 120 = 6,67m

 

As you can see, the difference is only 20% between D3 and D2, but it should be noted that the actual distance depends not only on the number of turns (N), but also on the tension (Te). It should also be noted that regardless of the position of the tension control knob, my old bicycle computer considers D3 = constant, which is not true at the root! However, we will not run ahead, I plan to devote an individual blog to this issue.

 

Calculation of speed

 

The most correct way of processing the data of our sensor, to determine the speed is, in my opinion, the use of the [wavelength measure method], in which the computer determines the time (T) for which a rider makes one turn of pedals.

 

Suppose that T = 0.5s. Then the number of turns can be determined by the formula:

V = 60 / T = 60 / 0,5 = 120 rpm

 

If you refer to the above table from Wikipedia, then it can be said that if it was not an exercise bike, but a real bicycle, the speed would be 57.9 km/h, provided that we go at High Gear.

 

The obtained data is enough to write the first program for my future bicycle computer but due to the"features of the post service in my country I have not received yet the parcel with my  FRDM-KW41ZFRDM-KW41Z board

 

Conclusion

 

Today's article might seem boring to you but I will not be able to do without mathematical calculations because speed and distance are the main parameters when practicing on an exercise bike We still have to make an energy calculation ahead of us but let's proceed as follows if my  FRDM-KW41ZFRDM-KW41Z board arrives in the next 2 days then I'll dedicate the next blog to it if the board does not arrive then I will have nothing left but to devote another one article of the theory

 

Thanks for reading and have a nice day!

  • Sign in to reply

Top Comments

  • neilk
    neilk over 7 years ago +2
    Nice development, Yuri Maybe I should take my exercise bike to pieces and understand the measurement methodology better. I have been playing with a Hall Effect switch and magnet, which probably gives a…
  • yuritikhonov
    yuritikhonov over 7 years ago in reply to neilk +2
    Thanks Neil! Of course Hall sensor is better, but I want to keep the maximum of original parts of my exercise bike.
  • neilk
    neilk over 7 years ago in reply to yuritikhonov +2
    Oh I agree entirely - I had been thinking of it as an extra, to compare it against the original computer on my bike.
Parents
  • genebren
    genebren over 7 years ago

    Great update on your project.  This is a great start to the sensing and monitoring parts of your project.  It seems that you now have a base to build the rest of your project on.  Good luck as you move forward!

    Gene

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • yuritikhonov
    yuritikhonov over 7 years ago in reply to genebren

    Thanks a lot Gene! And it's just a half of my calculations, I plane to post a second part on this week.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • yuritikhonov
    yuritikhonov over 7 years ago in reply to genebren

    Thanks a lot Gene! And it's just a half of my calculations, I plane to post a second part on this week.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube