Adding a Pressure Sensor
The Pi In The Sky boards include an onboard temperature sensor, but can be expanded by adding various external sensors. Many suitable devices are available at low cost from Sparkfun etc., allowing you to monitor external temperature, pressure, humidity, UV etc.
There are 2 expansion ports available:
- One Wire bus (for the DS18B20 temperature sensor)
- I2C (for a wide variety of sensors)
The supplied software supports the BMP085 and BMP180 pressure/temperature sensor but of course you can add any I2C device and write your own software to access it.. The BMP085 is obsolete now but the BMP180 is a slightly better and compatible device.
The BMP180 itself is a tiny surface-mount chip, commonly sold on a "breakout board" at low cost. Here is one example but all should work fine:
To connect to the Pi In The Sky board, you need to solder on 4 wires. We suggest that you use coloured wire like so:
- RED - Positive power - labelled "Vin" or "+" or "Vcc"
- BLACK - Negative power or Ground - labelled "GND" or "-" or "0V"
- WHITE - I2C Clock - SCL or CL
- YELLOW - I2C Data - SDA or DA
Using separate colours makes a mistake much, much less likely. Red and Black are standard colours for "+" and "-"; the others can be anything you have to hand.
This particular board has an extra "3V" connection which is not used.
All 4 wires connect to the Pi In The Sky board, and not the Pi itself:
So, solder those 4 wires to the I2C holes on the Pi board (bottom-right), as follows:
- RED (Vin) to VCC
- BLACK (GND) to GND
- WHITE (SCL) to SCL
- YELLOW (SDA) to SDA
So it's a very straightforward connection.
If you wish, rather than a permanent connection, you can place pin headers on the either or both boards and make up a cable with plugs to fit the headers. If you do, make sure that the connection is firm and cannot come loose during flight.
Finally, the software needs to be told to use the new sensor. To do this, add "enable_bmp085=Y" to the configuration file /boot/pisky.txt (see http://www.pi-in-the-sky.com/index.php?id=configuration for details).