Thread: Pressure Sensor
View Single Post
  #3   Spotlight this post!  
Unread 04-12-2012, 15:28
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,753
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pressure Sensor

I won't be much help, since I don't know the Java libraries well.
I do own several of these sensors though and have used them in competition.

This sensor connects to an Analog input and is read using the Java equivalent of Get Voltage.

The voltage (0-5v) will need to be converted to psi if you want a human readable value. To derive the equation you can start with a series of psi readings from a pressure gauge while noting the corresponding voltage reading (just dump the raw voltage to the screen or a print). Then to calculate a best curve fit you can use the LINEST function in Excel. For LINEST highlight two cells and SHIFT/CTRL+ENTER to get both the slope and the y-intercept.

psi = analog_reading *slope + y-intercept
The sensors have slight reading differences between them, but we used the following for our robot this past season:
psi = voltage *29.5433-10.4115 (this was for a different model, so the numbers will be different)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-12-2012 at 17:59.
Reply With Quote