This article applies to:

Chronos

Detail**Warning: Improper use of Chronos may void your warranty.**

A Webinar covering Analog Input can be found here: E-Prime 3.0 Webinar: Analog In Using Chronos.

This article references a FSR (__https://www.phidgets.com/?tier=3&catid=6&pcid=4&prodid=209__) wired with a Voltage Divider (__https://www.phidgets.com/?tier=3&catid=49&pcid=42&prodid=92__). It was powered by +5V on Chronos to Analog Input 1.

To verify the FSR worked in general, we ran RawLiveDataForFSR. This experiment displays the scaled and raw data. Once we knew we got valid data, we examined our readings.

To get a baseline reading, RecordAnalogIn1For5Seconds was run. During the run, presses and releases were made. The experiment is set to sample Analog In 1 at 5000Hz on a scale of 0 to 1. Upon completion, the resulting data was plotted to find the "press" and "release" thresholds.

Based on the data, we considered a "Press" above 55% (or .55) and a "Release" below 45%. PressAndRelease_Mod was then run to verify Presses and Releases were recorded correctly along with some additional data (e.g., .Value, .ValueFloat, and .ValueInteger).

After finishing our test run, the highest value of the press per trial was examined. This is logged as Value, ValueFloat, and ValueInteger. The samples are logged as ValueFloat in the recorded text file. Based on the FSR datasheet, Phidgets states that the formula for converting the samples into Newtons follow a logarithmic trend line. To get this, we would need to collect a series of samples of known mass/Newtons.

For example (the following numbers are purely theoretical), a 1kb weight is placed on the FSR. Read the Chronos sensor and then in a spreadsheet application put the Chronos values in the left column and 1 kg * 9.81 m/s^2 = 9.81 N in the right column. Then, place a 500g weight on the FSR, and put that value in the left column, with 4.9N in the right column. A 250g weight is about 2.45N. Any mass values can be used. We recommend going up or down by a factor of roughly 2. After the values are recorded, highlight both columns and plot it as a XY Scatter > add trend line > logarithmic > show equation, and the resulting formula for using it in E-Prime.

Based on our results, we determined we need a piecewise function that interpolates for better accuracy. For example, "if the voltage is below 2V use this formula, if above 2V use a different formula".

if < 2V Newtons = 0.1502*exp(1.2469*x)

if > 2V Newtons = 0.0022*exp(3.3485*x)

Multiply Newtons by 101.97 to get Grams.

Multiply Sample by 3.3 to get Voltage.

Note that these values are approximate. Phidget says +/- 10% error, so 2N could be anywhere from 1.8N to 2.2N

**See Also**:

Using Chronos Analog Input with our Slider Accessory [34381]

INFO: Chronos and Triggers [24492]

DEVICE: Chronos as a Response Device [24491]

E-STUDIO: Configuring Task Events [24789]

AnalogIn Live Drawing [29930]

INFO: Powering Devices With Chronos [29142]

## Comments

0 comments

Please sign in to leave a comment.