Forum 2005-2010 (read only)
(Read 2421 times)
Jun 26, 2010, 01:49 pm
: Jun 26, 2010, 03:36 pm by Things
Hi, I am trying to have an Arduino read the pressure in hectopascals (hPa) from a MPX4115A pressure sensor. The datasheet has a formula saying: Vout = Vs*(.009*P-.095)+/- Error
EDIT: OK, I now have the sensor reading in hPa
P = (analogValue/1023.0 + 0.095) / 0.009;
P2 = P * 10;
So, I guess now:
Also, since this is atmospheric pressure, is there any way to make the sensor more sensitive to a certain pressure range? I only need to measure between like 950 and 1040hPa, which is about a .6V voltage range on the sensors output, but using it like this is wasting ADC steps. SO if I can somehow get that .6V range to "stretch" between 0 and 1V, I can use the ATMega's internal 1V reference, for much better sensitivity between that range. Just not sure on how to do that, though
Jun 27, 2010, 02:09 am
: Jun 27, 2010, 02:10 am by mrmeval
You can use an op-amp to extend the range.
First you use a voltage follower then a scaler.
You can try this separately and add the voltage follower buffer if you need it.