Flex Sensor Implementation #115

Open
opened 2026-04-05 17:51:52 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @gorbit99 on 3/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.

*Originally created by @gorbit99 on 3/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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/SlimeVR-Tracker-ESP#115