PDA

View Full Version : reading resistance



TMills
06-07-2005, 06:23 AM
I have a pressure sender that I would like to read the resistance from and display on the screen. What is the best way of doing this? The sender goes from 240 ohm. to 34 ohm.
Thanks

Newzed
06-07-2005, 06:29 AM
Assuming the other end of the resistance from the sender goes to ground, you connect a .1uf capacitor from resistance connection to ground, then read the RC time. RC time is stored in a variable which you can easily display on the debug screen.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)

TMills
06-07-2005, 06:36 AM
how do you know what time corresponds with what resistance?

Newzed
06-07-2005, 07:03 AM
Study RCTime in the Editor Help section. You know the capacitance so you can calculate the resistance. I would use a10% capacitor such as Digikey BC1114CT. Better still, if you have a multimeter that will measure capacitance, you can find out exactly what the value is.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)

Tracy Allen
06-07-2005, 11:46 PM
That is quite a low range of resistance you have to work with (34 to 240 ohms). Is that right? It is hard to do that very well with RCTIME directly, because those low resistances take too much current from the Stamp pns. You could do something with an op-amp to convert the small resistance to either a proportional current for RCTIME or to a voltage for an analog to digital converter.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

Newzed
06-07-2005, 11:50 PM
Another thing you might be able to do is add a 1K resistor in series with your sender, so you would be looking 1034 to 1240 ohms. This would give you a larger value for RCTime and also reduce current thru the Stamp pin.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a bezel for your LCD?

Newzed@aol.com (mailto:Newzed@aol.com)

Sunflower
06-08-2005, 09:41 AM
i used a 220 ohm in series with such a sensor, plus a 220 ohm for pin protection. may need more charging time.