OpenPlotter – Sensors_b


In a previous post (Ref.1) we examined how to connect and detect a sensor module such as the GY-91 which is referenced in OpenPlotter documentation. This module has two ICs: an MPU-9250 motion detector IC and a BMP280 pressure/temperature IC. This gives us 11 variables: 3 x accelerometer, 3 x gyroscope, 3 x Magnetometer, 1 x air pressure, 1 x air temperature. In this post we will examine the properties of these variables.

GY-91 Sensor Module

The GY-91 sensor board contains a BMP280 pressure/temperature IC (Ref.2) and an MPU9250 accelerometer, gyroscope and magnetometer IC (Ref.3). These are commonly referenced with OpenPlotter. Figure 1 shows the board layout and pinouts. The MPU is the dark square IC and the BMP is the silvery rectangular IC with small air hole on top. Figure 2 shows the interconnection to the RPi GPIO.

Fig.1 GY-91 Sensor Module
FIg.2 RPi to GY-91 Connection

BMP280 Pressure/Temperature

The BMP280 measures air pressure and temperature:

Air Pressure: 300 to 1100hPa = +9000m (above sea level) to -50m (below sea level)
Accuracy: +/-1hPa
Air Temperature: -40degC to +85degC
Air pressure at mean seal level is typically 1013.25hPa and is known as a standard atmosphere.
Common units are: 1 Standard Atmosphere = 1013.25hPa = 1013.25mbar = 760mmHg = 29.9212inchesHg

Air pressure varies with the height above sea level at about -10hPa for every 100m. It also varies with weather conditions which is of most concern to sailors. Figure 3 shows a typical BMP280 reading and a comparison with a Thommen mountaineering altimeter. The difference of 3mbar is less than 1%. I ordered 2 x BMPs, one on Amazon and one on EBay. The Amazon one had a problem with the pressure being pegged at 300hPa. I suspect the unit got damaged in shipment, there is a tiny hole on top which is probably sensitive to force. The EBay one worked 100%. Considering the low cost and what is on the board, this is not a problem. I remember using a Scintrex Magnetometer in 1969 that weighed at least 10lbs and cost over 10K$!.

Fig.3 BMP280 Readings on SignalK Instrument Panel
Fig.4 Thommen Altimeter Comparison P = 998hPa = 998mbar

MPU9250 Acc/Gyro & Mag

The MPU9250 integrates two dies into a QFN package of 3x3x1mm. The first die has an accelerometer and gyroscope, the second has a AK8963 magnetometer. The acc/gyro/mag have variable ranges and are sampled with 16bit ADCs. There is a built in DMP digital motion processor and I2C interface. Figure 5 from the data sheet shows the block diagram. Hard to believe so much is in such a small package! Figure 6 shows the orientation of the x,y,z axes for the acc/gyro and mag. Note the different directions of y,z for the mag (right hand rule x to y then z). Figure 7 shows the pin 1 location dot on the GY-91 board.

Fig.5 MPU9250 Block Diagram Data Sheet (Ref.5/p.21)
Fig.6 MPU9250 Axes Orientation (Ref.5/p.38)
Fig.7 GY-91 Pin 1 & x Axis

PyPilot Calibration

In the previous post we detected the MPU9250 in PyPilot. Open PyPilot, ensure the GY-91 is in a horizontal plane and select the calibration menu item as shown in Figure 8. Once the GY-91 is level, press the “Boat is Level” button in the lower left corner. This will calibrate the MCU9250. Twisting the board around the vertical axis will generate Yaw, around the Y axis will generate Pitch and around the X axis Roll (see Fig. 11 YouTube movie). Once the calibration is done, you can see the results in the SignalK Instrument Panel Fig.10.

Fig.8 PyPilot Menu
Fig.9 GY-91 Level in Horizontal Plane
Fig.10 SignalK Instrument Panel
Fig.11 YouTube Video OpenPlotter – Sensors_b

Please send your comments, questions and suggestions to:

YouTube Channel
YouTube Channel


#1. – “OpenPlotter – Sensors_a”

#2. – “BMP-280 Digital Pressure Sensor”, Bosch Data Sheet

#3. – “MPU-9250 Motion Tracking Device”, TDK Invasense Data Sheet

#4. – “OpenPlotter – AIS+”

#5. – “OpenPlotter – RTL-SDR for VHF/AIS”

#6. – “OpenPlotter – AIS Connection”

#7. – “OpenPlotter – GPS Connection”

#8. -“OpenPlotter – Naviagtion System on RPi”

By Jeremy Clark

Jeremy Clark is a Senior Telecommunications Engineer and Advanced Amateur Radio Operator VE3PKC. He is the author of E-Books on Telecommunications, Navigation & Electronics.