Thursday, July 24, 2014

Weatherstation - Barometric Pressure Sensor

I ended up getting a BMP180 pressure sensor. I also made a major change to my weatherstation: I have decided to make the transmitter using a 430G2553 microprocessor. By using deep sleep mode and only taking readings every 30 s or so, I can run the weatherstation off of two D batteries for much longer than an Arduino.

Components

  1. TI launchpad w/MSP430G2553
  2. BMP180 breakout board

Connections

VCC --> Launchpad VCC
GND --> Launchpad GND
SCL --> P1.6
SDA --> P1.7


Remove the P1.6 LED jumper as well.

How It Works

I modified the code to give pressure readings in inHg and temperature in Fahrenheit. To get temperature readings in Celsius, instantiate the BMP085 library with the argument BMP085_C. Pressure is returned by default in hPa.

Interestingly, there are high precision modes, which can be activated when the BMP085 library is instantiated. I'm not using these, because I want to keep code size and power consumption low.

Before I setup my final weatherstation design, I'm considering going through the BMP085 library code and removing the temperature sensor functions, since I already have a dedicated temperature sensor. If not, I could just average both temperature sensor readings, so I'm not wasting  clock cycles on unused data.

Show Code

I used the BMP085 Template Library, which works fine with a BMP180. Here is some sample code that I've modified: