0

I want to use MCU and BMA250E 3-Axis Acceleration for count bike wheel revolution. and I can read the x-axis datas without vibrate. enter image description here

and I want to ask how to analysis sine wave datas

  • 1
    Your zero point seems to be at around 1015. Every time the signal crosses 1015, that is half of a revolution (180 degrees). So count zero crossings, then divide by two. Or count every two crossings as one revolution. Whatever seems easier to you. – user57037 Aug 16 '16 at 06:58
  • You want your device to rotate with the wheel? – JimmyB Aug 16 '16 at 19:32

1 Answers1

1

If you want to just count revolutions, you do not need to analyze sine wave. Just count peaks of that signal.

UPDATE:

Of course, with some hysteresis. I take it as natural thing.

I would do max(v(n), v(n-1)) for every sample, until v(n) is like 10% below that current max value, a then start over again for min value.

This is the way I would count high peaks and low peaks. Then it is easy to calculate RPM.

Chupacabras
  • 5,394
  • 2
  • 23
  • 50
  • 1
    ... with a little bit of Schmitt trigger or hysteresis to avoid double-counts. – Transistor Aug 16 '16 at 06:28
  • 1
    And with a little reasoning, you could estimate that the amplitude of the acceleration is about 2*9.81m/s/s under most driving conditions, so with a hysteresis of about 1G you should be good to go. – JimmyB Aug 16 '16 at 19:37