Pressure sensor 3.3V on 5V analog input (help need)

Hello, I would like to connect a pressure sensor (0-50kPa) which has 0-3.3V output on analog input port.. I'am using Arduino UNO board.

I'am confused with A/D converter..

I have found that is possible to set up arduino to use 3.3V as reference voltage so the digital value of 3.3V is 1024?

Or If I use default "setup" the analog value of 5V is 1024 so 3.3V is about 689..

what is right aproach?

in my case 0V represent 0 Kpa and 3.3V represent 50kPa..

Can someone help me to convert "digital" value into pressure? (function is: Vout = VS (P x 0.018 + 0.04) ), VS = 3.3 V

for example: digital value of 689 = 50Kpa and digital value of 0 is 0 Kpa...

thank you!

Well, you need to decide first whether or not you're going to use the 5V or 3.3V reference. The 3.3V will give you more granularity in the data, but it may not juve with other things in your code.

Once you have that, the rest is algebra. Remember that class?

Vout = VS (P x 0.018 + 0.04) )

So

Vout / VS = P x 0.018 + 0.04

So

Vout / VS - 0.04 = P * 0.018

So

(Vout / VS -0.04) / 0.018 = P

I wan’t to use 3.3V as analog input… so 3.3V will be 1024 (I will get better resolution)

On some web page I have read that I must connect 3.3V pint with AREF pin…but If I do that… the board will not communicate over RS232 port…(I get exception that comm port does not exists)

image from the web

http://arduino.cc/en/Reference/analogReference