how do I use the Schmitt Trigger in the basic stamp 2px as a threshold switch
Dear Group:
I want to use a flexiforce sensor by Tekscan as a force switch. The flexiforce sensor works by having high resistance when unloaded and increasing lower resistance when weight is placed on the sensor.
Can I use the Schmitt Trigger in the basic stamp 2px as a threshold switch. I don't know how to do this. I want the sensor·when loaded with 10 pounds or more,·to switch on. When the sensor is loaded with less than 10 pounds the switch goes off. Any help will be appreciated. I hope someone answers.· I got no answers for my last question.
·andrew777
I want to use a flexiforce sensor by Tekscan as a force switch. The flexiforce sensor works by having high resistance when unloaded and increasing lower resistance when weight is placed on the sensor.
Can I use the Schmitt Trigger in the basic stamp 2px as a threshold switch. I don't know how to do this. I want the sensor·when loaded with 10 pounds or more,·to switch on. When the sensor is loaded with less than 10 pounds the switch goes off. Any help will be appreciated. I hope someone answers.· I got no answers for my last question.
·andrew777
pdf
179K
Comments
The help file has good examples of the RCTime command if you are not already familiar with that command.
The Schmidt trigger funtion could also be used, but is probably not as easy as RCTime for this application. Essentially to use the schmidt trigger you would set up a voltage divider using a resistor and your flexiforce into the schmidt trigger input of your stamp.
I have a flexiforce sensor here. This weekend I can help if you need it.
Ken
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Now I feel like I'm a part of the group. I think that both ideas are good I would try them both. Should I use the output pin to power (5 V) the sensor or do I have to have a separate power supply. I am a novice at this. Do I need any resistors, if both of you can draw me a simple circuit that I can go by, it will be easier. I have the ideas but not electronic technical expertise. But I'm learning. But I thank you for what you already contributed. Ken any help that you can give I need.
Thank again,
andrew777
I will have some information for you later today...about 4 PM California time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
In any event, there are a few ways to interpret when the force on the sensor exceeds 10 lbs.
As Jon mentioned there is a comparitor function, or you can use RCTime, or you can configure the input pin for CMOS input and determine when the sensor output falls below 2.5 volts.
Using the comparitor function that Jon mentioned has the advantage that a seperate pin can be configured to reflect the state of the input, so it can directly turn on an LED, activate a relay (via a transistor). The disadvantage is that it consumes three Stamp pins.
The RCTime has the advantage of using only one Stamp pin (two if you will control some output based on the input). The disadvantage is that there is no "automatic" reaction to the input, the user must test the result obtained and control another output pin.
The pin configured as CMOS basically has the same advantage/disadvantage as the RCTime method. If you use the CMOS pin configuration method, put a variable resistor in series with the sensor, and with 10 lbs on the sensor adjust the resistor until you get 2.5 volts. Turn the power off, remove the resistor and replace it with a fixed value.
What should happen is when there is no weight on the sensor, the voltage going to the Stamp should be greater than 2.5 volts and you will read a logic 1 on the Stamp pin.
At 10 volts on the sensor the Stamp pin should read 2.5 volts.....any additional weight will cause the voltage to drop below 2.5 volts, then the stamp pin should return a logic 0.
See attached schematic, write back if more help is needed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
I finally found my sensor and did a little experiment.
With 10 lbs on the sensor I adjusted a series pot until the output (junction of pot and flexiforce sensor) was 2.5 volts. Removing the pot and measureing the resistance yeilds approximately 170 k ohms
Keep in mind the sensor is quite sensitive to the application of the load. As you can see from the attached pictures, when one of the weights was moved about 5mm, the reading from the sensor changed.
You can use the 5 volt output of the Stamp to power the circuit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Post Edited (KenM) : 7/4/2005 6:53:17 AM GMT
I thank you for all your help. Thanks for the schematics. I'm sure that your solution will work. This brings up another related subject. What kind of measurement instruments should I buy. To determine the electrical signals and properties the flexiforce sensor,pwm etc. I want to know what kind of measuring instruments I need to own to work with stamps. Oscope by parallax? etc. If I have the proper instruments I might be able to determine somethings myself or get a clear illustration of something you or someone demonstrated. I hope this makes sense.
Thanks,
andrew777
About equipment, I think it greatly depends on many different things, including your budget.
Perhaps an even more important factor to consider is how often will you use the equipement, and how serious are about this hobby, if it is a hobby. Are you in this for the long haul?
I have not used the Parallax o-scope, but I read good things about it in this forum. The big upside to the Parallax scope is price, and the ability to see signals in the time domain. It can be used as a simple volt meter also.
An o-scope is not needed to work with and understand the flexiforce sensor, but is almost a must to clearly see and understand PWM signals, momentary pulses and the like.
The downside to the Parallax o-scope is you need a PC to use it (I think), and it will not directly measure resistance (again, I think).
If the PC is not a problem, it seems you cannot go wrong with the Parallax o-scope, especially when you consider the professional support you get from Parallax. In my opinion that is priceless.
In addition to the scope, you can also get a cheapo voltmeter that will measure resistance, voltage, current for less than $10 at Harbor Freight.
For about $30 or more, another volt meter has a nice feature of a "diode checker"
Hope this helps more than it confuses
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Post Edited (KenM) : 7/4/2005 5:16:10 PM GMT
I considered Harbor Freight to buy a multimeter because we have a store near our neighborhood. I didn't know anything about diode checkers. When I went to RadioShack I purchased a 46 range digital multimeter with a PC interface for $69.·· It has a diode and transistor checker it can display PWM frequency. I think that this will be a substitute for oscope at least for a while. I don't know a lot about these kind of instruments but I will learn.
I just ordered the book Physical Computing by Dan O'Sullivan, it will give me ideas and a basic understanding of electronic relating to microcontroller. The reviews say that it is excellent for the beginner. I'm in it for the long-haul. You and Jon have given me a push for a lifelong avocation with help for my first major project.
Thanks again,
Andrew
That is a good book. I have it here. I bought mine from the smallest Barnes and Noble in Manhattan.
They don't consider the Basic Stamp a good candidate. They propose trying several others in addition tot he Stanp. Personally I believe they didn't try harder with the stamp. And of course the humor of it all is that they are NYC located.
Incidentally where did you buy your copy? And where? PM me if you want to let me know privately.
Oh and Ken, when will the company be at a trade show in NYC area, next time?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buck Rogers
www.gregg.levine.name
Andrew
Ryan