Skip to content

Conversation

@gorbit99
Copy link
Contributor

@gorbit99 gorbit99 commented Mar 21, 2025

This PR continues the partial implementation of flex sensors into the firmware. This is done in 2 parts:

  1. For direct-to-pin sensors, it implements the remaining logic necessary.
  2. It implements the ADS1115 4 channel ADC multiplexer used by the V3 version of the SlimeVR glove.
  3. It implements a generic driver for parallel mux ICs, such as the 74hc4051 or 74hc4067.

In addition to the above changes, it refactors some of the logic behind ADC reading to make it more modular and make supporting future ICs easier.

Caveats:
The max reading rate of the ADS1115 ic is 680 reads per second, which is shared among the connected flex sensors, and it makes the microcontroller busywait for 1/680 seconds each read. Due to this I lowered down the max output rate of flex sensors to 60Hz to mitigate this issue. It might be wise to implement this limitation in the ADS1115 implementation instead if it turns out that 60Hz isn't nearly enough for these.

@gorbit99 gorbit99 requested a review from Eirenliel March 21, 2025 12:38
@gorbit99 gorbit99 changed the title Initial ADS111x implementation Flex Sensor Implementation Apr 5, 2025
@gorbit99 gorbit99 marked this pull request as ready for review April 5, 2025 00:39
@gorbit99 gorbit99 requested a review from loucass003 as a code owner April 5, 2025 00:39
Copy link
Member

@Eirenliel Eirenliel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be rebased

@gorbit99 gorbit99 marked this pull request as draft April 8, 2025 17:54
@gorbit99
Copy link
Contributor Author

gorbit99 commented Apr 8, 2025

Converting this to a draft, so I can implement parallel muxes first

@gorbit99 gorbit99 marked this pull request as ready for review April 22, 2025 16:29
@gorbit99 gorbit99 requested a review from Eirenliel April 22, 2025 16:29
@gorbit99
Copy link
Contributor Author

I'll update this after other PRs are merged

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.

3 participants