Flexiforce/motor control
stratocaster
Posts: 3
Hi,
I am a new basic stamp user and I am trying to write a program·to control a motor using a flexiforce sensor.·Here is what I am trying to program with my BASIC Stamp 2.
·
I am using a Flexiforce sensor to read the force (say 10lbs) on a cable that is tightened or loosened by a geared 9VDC motor. The goal is to read the sensor with the microprocessor and if
the force changes either plus or minus from 10lbs have the microprocessor (program) tell the motor to either tighten or loosen to bring the force back to 10lbs.
·
The action to read the sensor and command the motor plus or minus as required will only be done when a mechanical button is pushed so it does not have to run constantly.
·
The only other thing that is necessary is that I will need to “set” the target force (10lbs in this example). That is, mechanically bring the cable to 10lbs then press a button to “set” that as the desired force. This required force may change from time to time so it is necessary to be able to “set” a new force.
·
·
What ever help you can give me would be appreciated. An example of a program that uses the proper commands would really help.
Thanks
I am a new basic stamp user and I am trying to write a program·to control a motor using a flexiforce sensor.·Here is what I am trying to program with my BASIC Stamp 2.
·
I am using a Flexiforce sensor to read the force (say 10lbs) on a cable that is tightened or loosened by a geared 9VDC motor. The goal is to read the sensor with the microprocessor and if
the force changes either plus or minus from 10lbs have the microprocessor (program) tell the motor to either tighten or loosen to bring the force back to 10lbs.
·
The action to read the sensor and command the motor plus or minus as required will only be done when a mechanical button is pushed so it does not have to run constantly.
·
The only other thing that is necessary is that I will need to “set” the target force (10lbs in this example). That is, mechanically bring the cable to 10lbs then press a button to “set” that as the desired force. This required force may change from time to time so it is necessary to be able to “set” a new force.
·
·
What ever help you can give me would be appreciated. An example of a program that uses the proper commands would really help.
Thanks
Comments
Make sure you've worked through something like the "What's a Microcontroller?" tutorial and perhaps the "Basic Analog and Digital" tutorial, all downloadable from the Parallax website.
I tend to learn faster if I have an example to go by that's why I was looking for that. If you're new to a program it's more just knowing what command does what. I can search command by command but if I see a similar program laid out it makes it a lot easier for me.
I STILL haven't gotten through them all, but what I have gone through has helped a lot.
My experiences with the flexiforce have not been great. Yes, it's a force sensor...it's resistive! As pressure is exerted on it, its resistance changes....however, I didn't find it repeatable.
Go through the "prep" of the flexiforce from the datasheet. You have to "pre-load" the sensor (IMO its just putting an even force across it to distribute the gel)....I'm guessing if you are not able to preload it the same way each time, your readings won't be repeatable. Basically...your mileage may vary!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<FONT>Steve
What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
Lee Travino after the second time being hit by lightning!