Hello folks, I am using G1/4 Pressure Transmitter Sensor 0-1.2 MPa sensor can you guide for programming part.The conversion from bar to pascal or bar to Mpa or pascal to psi.Though I am new to it. Plz guide me .
I'm assuming you mean that you want to pull a voltage number off of an input pin and convert it to a meaningful number.
To do this find the range of the incoming voltage.
Find the range of the sensor.
After that you need to split the voltage up to show what parts of the range convert to how much psi.
Here is an example of a temperature gauge that has the same principle.
One thing that I would add to this is that if you need good accuracy you may want to apply a voltage equal to your full scale output to the AREF pin. The value on AREF does not have to be equal to the full range of the sensor – just to the maximum value you will get – if you will never see readings at the extremes of the sensor's range you can set your AREF below the maximum value and get higher resolution.
Tronixstuff has a good tutorial on the AREF pin that goes into considerable detail about how to configure the pin and use the