Shop OBEX P1 Docs P2 Docs Learn Events
Flexiforce Dilema — Parallax Forums

Flexiforce Dilema

UTEP StudentUTEP Student Posts: 6
edited 2006-09-28 22:36 in General Discussion
Im trying to get the flexiforce sensor to work properly and I've been having a problem with it. While doing the RCTIME example I noticed that I was getting different values depending on the PIN I have the circuit connected to on the microcontroller. Im using the BS2p40 and a development board from parallax.

Has anyone had this problem?

Do I need to assemble the excitation circuit?

Any help would be greatly appreciated


·

Comments

  • metron9metron9 Posts: 1,100
    edited 2006-09-28 05:47
    Different values, Hmmm...

    Perhaps the capacitor specs, resistor specs and of course some frame of reference as to the scale of "different values" would be helpful to make proper diagnosis.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
  • UTEP StudentUTEP Student Posts: 6
    edited 2006-09-28 16:46
    Heres the layout of the circuit and the resistive values im using along with the code:



    ' {$STAMP BS2p}
    ' {$PBASIC 2.5}
    ' {$PORT COM3}
    rawForce··· VAR·· Word
    sensorPIN·· CON·· 0
    Measure:
    · HIGH sensorPIN
    · PAUSE 2
    · RCTIME sensorPin, 1, rawforce
    · DEBUG HOME, "Flexiforce raw output = ",DEC rawForce, CR
    · GOTO Measure



    The only change I do to the circuit is moving the resistor from pin to pin.

    At pin 0 I get an initial value of 798 on the debug screen, and as I apply·a force·to it the value goes to down to as far as 700, and as·I remove the force the value goes back to 798

    When I move the resistor to any other pin (say pin 15), the debug screen shows a rawforce value of 0 when the program begins. After I apply·the·forece to it the value turns into a 5 digit number that can go all the way up to 20,000 and then stops when the preassure stabilizes, but it never goes back to zero when the sensor has no force·on it.



    Post Edited (UTEP Student) : 9/28/2006 4:50:08 PM GMT
    512 x 384 - 7K
  • steve_bsteve_b Posts: 1,563
    edited 2006-09-28 16:55
    Are you preloading the sensor?

    The datasheet describes how to preload the sensor in order to achieve repeatable measurements.
    This can be quite a pain when there's some time inbetween measurements as things come out of 'spec'.

    I think the idea of the preloading is to move the resisitve paste around in the capsule so that's it's more uniform.
    They also tell you to load it uniformly...so basically the surface area of the object you're measuring has to be the same or larger than the surface area of the sensor.

    I played with the flexiforce sensor trying to measure slipring brushes (electrical contacts in a rotating radar system). The brush surface area is just a bit smaller than the sensor, but if I preloaded it properly I could get repeatability to with +/-10%. And that was tricky! Long process.

    Are you at least able to get repeatability on one pin before you use other pins? I just used a regular ohm-meter to get it down. I was planning on automating the process afterwards with a stamp, but since it's a resistive device, the meter was fine to start with.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • metron9metron9 Posts: 1,100
    edited 2006-09-28 22:36
    Lets break it down a bit and remove some variables.

    Use an rc circuit with the capacitor you are using and a fixed resistor. Test that on the stamp pins, you should get the same readings on any pin I would think, unless the pin is not giving a 5V output or is not giving the same amount of current as your pin 0. Test the voltage of pin15 and pin 0 using an LED and a sutable resistor to give you 20ma (I think thats the maximum of a stamp pin) and see if you get the same voltage across the resistor using a voltage meter. If not, then you must have some damaged pins on your stamp. If all is well then its a connundrum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think outside the BOX!
Sign In or Register to comment.