Skip to content

Conversation

@Braden2n
Copy link
Contributor

@Braden2n Braden2n commented Feb 5, 2025

Major Changes:

  • RPM is now calculated using a reciprocal method (time between pulses)
    • The last two pulses are tracked - the interval between them determines the RPM (with 2-step weighted average)
    • A detection of a magnet triggers the ISR (Interrupt Service Routine) which updates timestamps and a flag
    • RPM decays to 0 based on a dynamic rate that is clamped between 1.2x and 5.0x the last pulse interval
      • This lets the RPM decrease slowly and smoothly across all RPM ranges.

Minor Changes:

  • Pin setup changes to match behavior of actual sensors (trigger ISR on rising, pulldown instead of pullup)
  • Set pins to the value they will be on the PCBs
  • Fixed CAN buffer overflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants