Giter VIP home page Giter VIP logo

bicycle-clinometer's Introduction

Bicycle clinometer

The MPU6050 has a sophisticated built-in Digital Motion Processor which takes care of most of the maths-intensive sensor data integration and spits out directly usable data over I2C to the Arduino. In this single-task application we basically only need to track the tilt of one of the axes, the accelerometer's z-axis, which means only a fraction of the chips full capacity is being utilised now. To get to know this rather remarkable sensor, you're adviced to spend some time studying it's datasheet!

With the rather superb MPU6050 library written by Jeff Rowberg it is easy to get a prototype clinometer working for bench testing. In real-life testing it is soon evident that even the smallest variation in pedalling speed is sufficient to fool the accelerometer into "believing" it is being tilted back and forth a few degrees.

To solve, or at least minimise, the influence of both cyclic and random forward/rearward acceleration forces, the number of samples was set to 10 per second (10Hz), which also means approximately 10 samples per pedal revolution, since a normal cadence when climbing with a fully loaded touring bike probably hovers around 60-75 rpm. The sum of the sampled values is finally divided by 10, which smooths the output values considerably, while still being reasonably responsive, given the self-imposed constraint of the 1Hz display update rate. In the present version the algorithm also takes into account the sensor output's y-axis (horisontal) acceleration values, in an attempt to better filter out the actual "tilt" value only.

I find the notion of percent more intuitive than either fractional ratios or angular degrees, so the Nokia 5510 type LCD presents the grade as the percentage of the rise over the run (to use the technical terms), and updates each second.

The sensor needs to be calibrated first when mounted to a vehicle. The compensation value obtained then can be stored in EEPROM and automatically retrieved at start-up.

Link to project description: http://xneb.org/mabe/xnebmisc/home/clinometer.html or https://sites.google.com/view/xneb-project-logs/home/clinometer

bicycle-clinometer's People

Contributors

moof-moof avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.