Monday, May 12, 2014

Atmospheric pressure using Arduino



Part of quarterly vibration inspections on mine fans for a client, they requested parametric pressure included in the vibration analysis report. Due to the fact that mine fans usually are spread within a good driving distance to any mine office, where you can find a barometer, I had to come up with a way to measure the pressure on each site while inspecting. One solution was to use phone application to provide barometric pressure reading. Unfortunately, not all sites we inspect are within phone coverage!

Since an Arduino microcontroller was available around me for a while now; why not use a pressure sensor and Arduino microcontroller to capture barometric pressure readings! As it turns out, this is not a very difficult thing to do. I ordered this sensor from here

Bosch BMP180 high-precision, low-power digital barometer



You can find it on adafruit or sparkfun website. Furthermore, these sellers usually provide libraries required to use their products and even provide example codes. Off course, you will need a display screen to display the pressure reading, a cheap black letter green backlight LCD should do the job. I have used this arduino shield it also includes push buttons which will proof valuable as you will find out in the end of the blog.


Making this project work was one thing and testing it was another thing. Since pressure is a measure of the force per unit area exerted by the weight of air on a surface, you will get less atmospheric mass as the elevation increases. This means best way to test my new gadget was to use it at different elevations. Well, West Virginia Mountains provide the perfect altitude change; I made a trip to Black Water Falls in West Virginian. My trip started at my current residence at an altitude of 900ft and ended at Black Water Falls at an altitude of 3600ft above sea level! Now, to test my barometer it should be compared to a correct reference reading. The phone application we talked about earlier did serve this purpose but phone application provides altitude compensated atmospheric pressure values. This meant my barometer had to provide an altitude compensated values also. Altitude value needs to be available while you are programming the microcontroller or user needs to enter the altitude as a variable while the program is running (online). This is where the buttons on the LCD shield could help; the buttons can be used to change the altitude value without the need to change them in the program. No need to add a keypad to the design; no need to add more cost and more size (Sorry, too much work). 


Instead of using buttons on the shield, a work around was to program the microcontroller with an average altitude between 900ft and 3600ft and I have chosen 1700ft. During the trip the pressure reading on the phone and on my LCD screen did come close but during the trip my phone application was giving message indicating that pressure reading may not be accurate due to the fact that I had no pressure sensor on my phone, What!!! You mean you made me drive three hours trip to tell me I need a pressure sensor. I am just kidding, we went to see the beautiful nature in West Virginia; see picture below
 



On the way back I passed through Okland city, Maryland. While enjoying the scene on a nearby lake, I decided to try my gadget one last time. Reprogrammed the microcontroller with the correct altitude and pulled up accu Weather webpage on my phone, now this has to be correct, turned on my microcontroller. See picture below.






Now, came the moment of truth. A client called asking for urgent vibration inspection on the fan location near the office. I went to collect vibration data on the fan and off course had to collect pressure reading, see picture below.




This is a link for the atmospheric pressure and temperature near this area on the day this picture was taken
 

No comments:

Post a Comment