Skip to content

Arduino Library for sampling position and force from a force-sensing linear potentiometer and with FIR LP filter

Notifications You must be signed in to change notification settings

jeffleo/FSLP-Sensor-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

FSLP-Sensor-Library

Arduino Library for abstracting position and force sampling from a force-sensing linear potentiometer with customizable low pass filter for sensor pressure and position and gain for pressure.

Library comes with an example Arduino sketch that uses the serial plotter to view sensor response.

Setup

To use library, put FSLP folder in your arduino Libraries folder. Alternatively, use the Arduino IDE: navigate to Sketch > Include Library > Add .ZIP Library. Restart IDE.

Initialize a FSLP sensor class for each sensor as:

FSLP fslp(int fslpSenseLine, 
          int fslpDriveLine2, 
          int fslpDriveLine1, 
          int fslpBotR0,
          int Presgain,
          int filterTailTrim_Pres,
          int filterTailTrim_Pos);
int fslpSensor[2];                // Analog read storage array for fslp pressure and position
  • fslpSenseLine, fslpDriveLine2, fslpDriveLine1, fslpBotR0 correspond to the sensor and resistor input pins to the microcontroller respectively. See figures for reference
  • Presgain varies sensor force/pressure sensitivity (gain needed varies by sensor and bias resistor)
  • filterTailTrim_Pres is proportional to the amount of sensor pressure filtering
  • filterTailTrim_Pos is proportional to the amount of sensor position filtering

Class methods:

fslp.GetPosition();               // returns integer position [0, 1023]
fslp.GetPressure(fslpSensor);     // stores filtered pressure in fslpSensor[0]
fslp.GetData(fslpSensor);         // stores filtered pressure in fslpSensor[0] and position in fslpSensor[1]

alt text alt text

About

Arduino Library for sampling position and force from a force-sensing linear potentiometer and with FIR LP filter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages