PDA

View Full Version : Best way or ways?



Ramius
- 19th July 2013, 17:20
Hi All! :)
Soon I will receive my pressure sensor for measuring the pressure of water at different speeds. The plan is to place the sensor in a tub of water just under the surface and spin the sensor in a circle through the water at different speeds. The rotating arm will be about 8” long so that one revolution will be about 24” or 2’ of total travel. The motor that rotates the arm holding the sensor is connected to a switchable power supply. To determine speed you need to know how much time it takes to travel the 2’. There is a switch at the top which allows for a start/stop signal to trigger a timer in the PIC. I am not sure if I should use a counter and allow a start/stop of say 10 times to ensure an average in case there is a slight variance in pressure at each revolution and if I should allow the PIC program to continue to run and add a “Pause 100” and count the number of pause 100’s or simply activate some type of PIC timer? I welcome any and all ideas.

Thanks, Ed

Archangel
- 20th July 2013, 07:17
Hi Ed,
Point to consider, when that rotating arm generates a vortex around it, what's going to happen to the pressure?
These might be helpful . . .

www.freescale.com/files/sensors/doc/app_note/AN1536.pdf

www.v3instruments.com/trouble_shooting_guides/speedometer_pitot__ts.pdf (http://www.v3instruments.com/trouble_shooting_guides/speedometer_pitot_ts.pdf)

rsocor01
- 20th July 2013, 18:04
Point to consider, when that rotating arm generates a vortex around it, what's going to happen to the pressure?

Very good point!!!

I have seen several water pressure sensors for sale in mouser.com. I think that would be the way to go.

Robert

Ramius
- 21st July 2013, 14:01
Thanks Archangel and rsocor01!
I would imagine that if the sensor is about 2-3" in front of the arm that there should not be any vortex at the point of measurement. The biggest question is how to measure travel time.

Best, Ed

Demon
- 21st July 2013, 20:13
Unless you use a large pool, the water will ever so slowly gradually rotate. I would think you get a true reading on 1st rotation and then it would decrease slowly with each rotation.

Robert

Ramius
- 22nd July 2013, 00:45
Thank Robert!
I will certainly watch for this.

Best, Ed

rsocor01
- 22nd July 2013, 04:42
The biggest question is how to measure travel time.

Best, Ed
What about a water flow sensor?
http://futurlec.com/Flow_Sensor.shtml

Ramius
- 23rd July 2013, 22:18
Thanks Rsocor01!
If pressure does not work then this would be an excellent choice.

Ed

Art
- 31st July 2013, 07:12
Usually for counting pulses in time, such as speedometers/tachometers or the like,
you can either go for counting the number of pulses that occur over a constant defined duration,
or timing the space between each individual pulse with an interrupt.

The former is easier to implement from a BASIC point of view,
but when it gets to something like counting the number of pulses from your
transmission in one second, and calculating speed on that,
you end up with a display that can only be updated once per second,
and might find there aren't enough pulses to increase it's resolution.

There are some tricks to improve it such as using multiple intervals that
overlap each other, so a single pulse count might apply to a calculation
for multiple time intervals.

The former method, calculating based on the duration between each pulse
is more prone to error in some situations such as a heart rate monitor
where the hardware might throw in random pulses because our interface
to the Human heart isn't good, and although I haven't used one,
it sounds like a problem you might face with your sensor.

In that case I had the program look at a number of the previous times,
so that it could either average them out, or disqualify silly looking readings.
I was happy with that, although for a speedometer, it would mean that if
you crash it into a wall, the speedo would drop to zero over a number of readings.

I would be worried about the projects influence on the performance of the vessel,
but since you're the one doing it, I'm sure you've taken it into consideration.

Ramius
- 1st August 2013, 02:01
Hi Art!
Thank you and it all makes sense. When reading the pressure sensor there are several "pauses" in the software so that one idea isn't going to work. When the pressure sensor is installed in the sub there should not be any noticeable influence in performance as the sub is 8" in diameter and 6' long! So a 1/4" hole in the bow to read pressure should not be a problem. Thank you for everything you wrote you gave me a lot to think about!

Best, Ed