Altimeter Module

Altimeter Module MS5607 from Parallax Inc. (#29124)

Item code: 29124


What It Can Do

  • Built-in high resolution pressure and temperature sensors
  • Detects changes in pressure over a range of 10 to 1200 millibars

The Altimeter module combines highly sensitive pressure sensors with temperature sensors. While it’s called an Altimeter module, the sensor is useful for many additional applications. By correlating the data from these two sensors it’s possible to determine barometric pressure, altitude, changes in height, rate of climb and descent, and other useful information.

Applications include rocketry, unpiloted aircraft, remotely operated vehicles, robotics, weather stations, ballooning, and other uses involving calculating altitude, air pressure, height, or changes in temperature.

Important! The active sensor on the Altimeter module contains two small ports, which allow surrounding air to enter. Never block these ports, or the sensor may yield inaccurate result. Keep the ports free of dust, dirt, and moisture, as well as bright light sources. For best results, place the module in an opaque plastic enclosure. Drill one or two small holes in the enclosure to allow the free exchange of air.


Parts List

  • Altimeter module
  • Propeller BOE, Propeller QuickStart, or Arduino Uno microcontroller (with breadboard, as needed)
  • 22 gauge solid conductor hookup wire

Basic Wiring

Altimeter Module wiring diagram, data, clock, power

  • Power Requirements: 3.3 to 6.5 VDC
  • Communication Interface: I2C (up to 400 kHz) or SPI (20 MHz)
  • Dimensions: 0.85 X 0.80 in (2.16 X 2.03 cm)

Program KickStarts

The KickStart examples display altitude data, using the serial terminal or window.

Propeller BOE and Propeller QuickStart

Altimeter Module wiring diagram for Propeller BOE
Propeller BOE Wiring Diagram

 


Altimeter Module wiring diagram for Propeller QuickStart board
Propeller QuickStart Wiring Diagram

 

Download Propeller Spin code for the Altimeter Module

OBJ

  pst   : "Parallax Serial Terminal"
  alt   : "29124_altimeter"

CON

  ' Pin 4 SDA
  ' Pin 6 SCL

  _clkmode      = xtal1 + pll16x
  _xinfreq      = 5_000_000
  START_ALT     = 200             ' Your starting altitude in feet

PUB start | a
  pst.start(115200)	          ' Start serial terminal

  ' Start altimeter for QuickStart with background processing                                       
  alt.start(alt#QUICKSTART, alt#BACKGROUND)              
  
  ' Set to highest resolution
  alt.set_resolution(alt#HIGHEST)                        

  ' Set the starting altitude, based on average local pressure                  
  alt.set_altitude(alt.m_from_ft(START_ALT * 100))       
  repeat

    ' Get current altitude in cm, from new average local pressure
    a := alt.altitude(alt.average_press)                 
    pst.str(string(pst#HM, "Altitude:"))

     ' Print altitude in meters and feed
    pst.str(alt.formatn(a, alt#METERS | alt#CECR, 8))    
    pst.str(alt.formatn(a, alt#TO_FEET | alt#CECR, 17))  

    ' Respond to any key by clearing screen
    if (pst.rxcount)                                     
      pst.rxflush
      pst.char(pst#CS)

Important! This program uses the following object libraries, which are included in the download. To use this program you must include these libraries in the same folder as the program file.
• Parallax Serial Terminal.spin*
• 29124_altimeter.spin
* Also included with the Propeller Tool software download

To view the results of the demonstration, after uploading is complete run the Parallax Serial Terminal from the Run menu, or press F12. Click the Enable button, and then momentarily depress the Reset button on the Propeller QuickStart board to restart the program.

Arduino Uno

Altimeter Module wiring diagram for Arduino Uno

Download Arduino 1.0 Code for the Altimeter Module

Download Arduino Pre-release Version Code for the Altimeter Module

#include <Wire.h> 
#include "IntersemaBaro.h"

Intersema::BaroPressure_MS5607B baro(true);

void setup() { 
    Serial.begin(9600);
    baro.init();
}

void loop() {
  int alt = baro.getHeightCentiMeters();
  Serial.print("Centimeters: ");
  Serial.print((float)(alt));
  Serial.print(", Feet: ");
  Serial.println((float)(alt) / 30.48);
  delay(400);
}

Important! This program uses an additional code file, IntersemaBaro.h, which is included in the download. To use this program you must include IntersemaBaro.h in the same folder as the program file. Be sure to download the correct version for the Arduino IDE you are using.

To view the results of the demonstration, after uploading is complete click the Serial Monitor icon in the Arduino IDE. This displays the Serial Monitor window. Momentarily depress the Reset button on the Arduino board to restart the sketch.

This sketch is intended to show basic functionality of the altimeter module, such as measuring change in altitude. As it lacks a means for setting the current sea-level air pressure, the base altitude measurement may not be accurately represented.


For More Information


 

  • Copyright: Creative Commons 3.0 SA license