Pressure Sensor
I selected a pressure sensor from Freescale Semiconductor wide range. I picked up one with the following specifications: integrated, absolute measure, 0 to 250 kPa.
It comes in various form-factors, either small outline / surface mount package or unibody package, with or without a nose. The manufacturer provides an excellent application note Understanding Pressure and Pressure Measurement. The sensor provides a voltage linear to the pressure measured. So implementation is rather easy. After extensive testing with the Arduino board, I went into packing the sensor into a fischertechnik block so I could use it with my industrial models. |
Hardware
The sensor is powered by a fischertechnik battery. Signal is sent to A0 analog input.
When used, SD card is connected to TX → 1 pin. I guess the hardware has a consequence on the measures:
|
Software
Here are the measures with the SD-card and USB connection:
Serial speed to SD card = 19200 bps Measure rate = up to 115 Hz Reactivity = 9,8 kPa / two consecutive measures
USB serial speed to PC = 57600 bps Measure rate = up to 350 Hz Reactivity = 3,6 kPa / two consecutive measures Measures rate and reactivity are good enough for my fischertechnik industrial models! |
int sensorPin = A0;
float sensorValue = 0; double speed=19600; void setup() { Serial.begin(speed); Serial.print("\n\n\n\n***\n"); Serial.print("serial speed\t"); Serial.print(speed, 0); Serial.print("\n"); Serial.print("start us\t"); Serial.print(micros()); Serial.print("\n"); Serial.print("us\tV\tkPa\n"); } void loop() { sensorValue = float(analogRead(sensorPin))*5.0/1023.0; Serial.print(micros()); Serial.print("\t"); Serial.print(sensorValue); Serial.print("\t"); Serial.print((sensorValue/5.1+0.04)/0.004, 1); Serial.print("\n"); } |
Pressure Sensor Mathematical Model
I've built a very basic model based on the ideal gas law (reference).
I considered R and T as constants and took 1 atm close to 100 kPa. Actually, 1 atm = 101,33 kPa instead of 1 atm ≈ 100 kPA. I measured the volumes of the tank and the piston rods, with and without spring. |
PV = nRT
with
|
Measures
I conducted two series of measures:
Then I filled the model in with the measures I've recorded. As always, the model and the measures are provided below. It's always nice to see that Nature obeys physical laws! |
Results
The findings are:
|
Downloads
Please find the RoboPro project and Excel sheets discussed in this article.
|
|