Today the first release of finger flex sensor code was completed. This is exciting since it means we have a large portion of our finger tracking figured out! The flex sensors have a variable resistance that changes as the strip is bent. This resistance can then be interpreted as a voltage signal generated from a simple voltage divider circuit.
High input impedance is essential for ensuring accurate voltage measurements. Luckily the microcontroller analog input is greater than 1 Mohm which is the value of a unity gain buffer. As such no additional isolation circuitry is needed.
So far the code has the following features:
Normalized readings incrementing finger bends from 0-100
A calibration sequence that allows measurement normalization regardless of the electrical or mechanical setup
Readings are filtered through a low pass filter to remove analog reading noise
Sample frequency is limited to avoid unnecessary computations
Each finger can be calibrated, read, and filtered separately
Code is separated into a distinct .ino file so that it can easily be concatenated with later code without edits
Comentários