Code Monkey home page Code Monkey logo

Comments (15)

ATATC avatar ATATC commented on August 19, 2024

OK, this is not working properly at all. It is being triggered multiple times during one cycle. We need a new algorithm.

from leads.

ATATC avatar ATATC commented on August 19, 2024

Bringing angular acceleration into consideration may be the solution. By limiting the angular acceleration we might be able to dynamically adjust the bounce time.

from leads.

qmascarenhas avatar qmascarenhas commented on August 19, 2024

I haven't had a chance to look at the code but maybe we can discuss this before the 3pm team meeting today.

from leads.

ATATC avatar ATATC commented on August 19, 2024

Another possible solution is to add an acceleration sensor as a reference.

from leads.

qmascarenhas avatar qmascarenhas commented on August 19, 2024

Yes, might not be a bad idea to add an accelerometer ... could be useful for other purposes.

from leads.

ATATC avatar ATATC commented on August 19, 2024

This looks promising but seems to be hard to implement on Arduino: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3871922/

from leads.

ATATC avatar ATATC commented on August 19, 2024

Bounce time turns out to be an ineffective way to pop up the noise.
If the input is plotted in relation to time, it looks like this:

.....          .....         ....        ...       ..     ..

We determine the exit of the magnet by checking if the dots are consecutive.

from leads.

qmascarenhas avatar qmascarenhas commented on August 19, 2024
  1. Does the 5 dot sequence at the left represent the peak of the magnet entry and exit?
  2. Is this pattern repeatable (or somewhat repeatable) for each entry and exit of the magnet?

from leads.

ATATC avatar ATATC commented on August 19, 2024

The pattern shows that every time the magnet is close enough to the sensor, the sensor will be consecutively triggered for a period of time, and the period ends as it departs farther enough. The sensor reads at a variable rate, yet, in the triggering period, every time it reads it is triggered. We recognize this pattern as the entry and the exit, which means we have a bounce time that is equivalent to the sensor's detection interval.
If the wheel is running fast enough that it is meant to trigger the sensor constantly, the algorithm will fail to validate that input and interpret it as 0 RPM.

from leads.

ATATC avatar ATATC commented on August 19, 2024

The pattern shows that every time the magnet is close enough to the sensor, the sensor will be consecutively triggered for a period of time, and the period ends as it departs farther enough. The sensor reads at a variable rate, yet, in the triggering period, every time it reads it is triggered. We recognize this pattern as the entry and the exit, which means we have a bounce time that is equivalent to the sensor's detection interval. If the wheel is running fast enough that it is meant to trigger the sensor constantly, the algorithm will fail to validate that input and interpret it as 0 RPM.

This has been proved effective.

from leads.

qmascarenhas avatar qmascarenhas commented on August 19, 2024

Can run an experiment on different diameter wheels to pin down a linear distance during which the sensor is triggered while in the field of the magnet? Our target wheel is 20". We would want to find the optimal distance away from the axle to mount the magnet and specify a mechanical mount for the sensor.

from leads.

ATATC avatar ATATC commented on August 19, 2024

It's about less than 2 cm by visual inspection.

from leads.

ATATC avatar ATATC commented on August 19, 2024

It looks just fine now except for two drawbacks.

  1. The feedback rate depends on the speed of the wheel
  2. Cannot determine zero speed

from leads.

ATATC avatar ATATC commented on August 19, 2024

Btw I've completed the adapter that provides the connection between the Raspberry Pi (I'm using a laptop instead for debugging purposes, but it should work just the same on the Raspberry Pi) and the Arduino.

from leads.

ATATC avatar ATATC commented on August 19, 2024

Zero speed determination algorithm will be discussed in a separate issue (#48).

from leads.

Related Issues (20)

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.