Modifications

Sauter à la navigation Sauter à la recherche
Aucun changement de taille ,  17 février 2014 à 18:15
aucun résumé de modification
Ligne 59 : Ligne 59 :  
Then open up the serial monitor at 9600 baud. The sketch will continuously print out the pressure in hPa (hectoPascals). You can test that the sensor is measuring variations in pressure by placing your fingertip over the open port hole in the top of the sensor. The pressure will increase as you can see here:  
 
Then open up the serial monitor at 9600 baud. The sketch will continuously print out the pressure in hPa (hectoPascals). You can test that the sensor is measuring variations in pressure by placing your fingertip over the open port hole in the top of the sensor. The pressure will increase as you can see here:  
   −
{{ADFImage|BMP085-Utiliser-APIv2-01.jpg|640px}}
+
{{ADFImage|BMP085-Utiliser-APIv2-01.png|640px}}
    
== Evaluer l'altitude ==
 
== Evaluer l'altitude ==
Ligne 65 : Ligne 65 :  
Since we know that pressure drops as we gain altitude (that's why air is so thin on mountain-tops) we can compute the current altitude knowing the pressure and temperature. Again, there's a bit of hairy math involved, [http://en.wikipedia.org/wiki/Barometric_pressure you can read about the calculations on wikipedia (where this graph is from)].  
 
Since we know that pressure drops as we gain altitude (that's why air is so thin on mountain-tops) we can compute the current altitude knowing the pressure and temperature. Again, there's a bit of hairy math involved, [http://en.wikipedia.org/wiki/Barometric_pressure you can read about the calculations on wikipedia (where this graph is from)].  
   −
{{ADFImage|BMP085-Utiliser-APIv2-02.jpg|640px}}<small>Graphique de la '''Pression Atmosphérique (kPa) en fonction de l'altitude'''</small>
+
{{ADFImage|BMP085-Utiliser-APIv2-02.png|640px}}<small>Graphique de la '''Pression Atmosphérique (kPa) en fonction de l'altitude'''</small>
    
With the Arduino library, we take care of that for you! Simply update the ''' 'void loop()' function above with the code below to get the altitude based on the pressure and temperature''':
 
With the Arduino library, we take care of that for you! Simply update the ''' 'void loop()' function above with the code below to get the altitude based on the pressure and temperature''':
Ligne 124 : Ligne 124 :  
Run the sketch to see the calculated altitude.  
 
Run the sketch to see the calculated altitude.  
   −
{{ADFImage|BMP085-Utiliser-APIv2-03.jpg|640px}}
+
{{ADFImage|BMP085-Utiliser-APIv2-03.png|640px}}
    
The data above is reasonably close to what I'd expect at my location, but we can improve the accuracy by changing the reference sea level pressure, which will change depending on the weather conditions. '''Every 1 hPa that we are off on the sea level pressure equals about 8.5 m of error in the altitude calculations!'''
 
The data above is reasonably close to what I'd expect at my location, but we can improve the accuracy by changing the reference sea level pressure, which will change depending on the weather conditions. '''Every 1 hPa that we are off on the sea level pressure equals about 8.5 m of error in the altitude calculations!'''
Ligne 130 : Ligne 130 :  
Many weather sites, (particularly near major airports) will provide pressure readings. If you happened to be near Paris, France, for example, you might look up the [http://pt.weather-forecast.com/weather-stations/Charles-De-Gaulle-International-Airport current air pressure at Charles de Gaulle airport], which we can see is 1009 hPa (a meaningful difference from the generoc 1013.25 hPa value we are plugging in via the '''SENSORS_PRESSURE_SEALEVELHPA''' macro):  
 
Many weather sites, (particularly near major airports) will provide pressure readings. If you happened to be near Paris, France, for example, you might look up the [http://pt.weather-forecast.com/weather-stations/Charles-De-Gaulle-International-Airport current air pressure at Charles de Gaulle airport], which we can see is 1009 hPa (a meaningful difference from the generoc 1013.25 hPa value we are plugging in via the '''SENSORS_PRESSURE_SEALEVELHPA''' macro):  
   −
{{ADFImage|BMP085-Utiliser-APIv2-04.jpg|640px}}
+
{{ADFImage|BMP085-Utiliser-APIv2-04.png|640px}}
    
Updating the following line to 1009 will give us a more accurate altitude:  
 
Updating the following line to 1009 will give us a more accurate altitude:  
Ligne 140 : Ligne 140 :  
This now gives us the following results, which shows that calibrating for your local conditions is often worthwhile when working with low altitudes!  
 
This now gives us the following results, which shows that calibrating for your local conditions is often worthwhile when working with low altitudes!  
   −
{{ADFImage|BMP085-Utiliser-APIv2-05.jpg|640px}}
+
{{ADFImage|BMP085-Utiliser-APIv2-05.png|640px}}
    
Just be careful looking for local mean pressure at sea level values, since the functions in the driver are expecting hPa units, not one of the dozens of other values you may encounter, but you should be able to [http://www.engineeringtoolbox.com/pressure-units-converter-d_569.html convert anything you find to hPa] which is a standard SI unit.  
 
Just be careful looking for local mean pressure at sea level values, since the functions in the driver are expecting hPa units, not one of the dozens of other values you may encounter, but you should be able to [http://www.engineeringtoolbox.com/pressure-units-converter-d_569.html convert anything you find to hPa] which is a standard SI unit.  
    
{{BMP085-TRAILER}}
 
{{BMP085-TRAILER}}
29 917

modifications

Menu de navigation