Silicon ChipEl Cheapo Modules 11: Pressure/Temperature Sensors - December 2017 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australia's strength in manufacturing
  4. Feature: Rail Guns and Electromagnetic Launchers by Dr David Maddison
  5. Project: Touchscreen Altimeter and Weather station by Jim Rowe
  6. Feature: Interfacing with the Raspberry Pi – for Beginners by Andrew Pullin
  7. Project: The Arduino MegaBox from Altronics by Bao Smith
  8. Product Showcase
  9. Review: Music Hall mmf-1.3 Belt-Driven Turntable by Leo Simpson
  10. Serviceman's Log: Video trials and tribulations by Dave Thompson
  11. Project: Build your own Super-7 AM Radio Receiver – Part 2 by John Clarke
  12. Feature: El Cheapo Modules 11: Pressure/Temperature Sensors by Jim Rowe
  13. Subscriptions
  14. Project: Part 3: Finishing our new 6GHz+ Digital Frequency Meter by Nicholas Vinen
  15. PartShop
  16. Vintage Radio: Roberts R66 4-valve 2-band portable by Marc Chick
  17. Market Centre
  18. Notes & Errata: 50A Charger Controller, Nov16; Deluxe Touchscreen eFuse, Jul17; Universal Battery Valve Power Supply, Aug17; 3-way Active Crossover, Sept & Oct17; Kelvin the Cricket, Oct17; Circuit Notebook: Modifications to Universal Battery Valve Power Supply, Oct17; 6GHz+ Touchscreen Frequency Meter, Oct-Dec17; Super-7 AM Radio, Nov17
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the December 2017 issue of Silicon Chip.

You can view 38 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Touchscreen Altimeter and Weather station":
  • PIC32MX170F256B-50I/SP programmed for the Touchscreen Altimeter/Weather Station (Programmed Microcontroller, AUD $15.00)
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • DHT22/AM2302 Compatible Temperature and Humidity sensor module (Component, AUD $9.00)
  • Elecrow 1A/500mA Li-ion/LiPo charger board with USB power pass-through (Component, AUD $25.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • Firmware (HEX) and BASIC source code for the Touchscreen Altimeter/Weather Station (Software, Free)
  • Altimeter/Weather Station front panel artwork (PDF download) (Free)
Items relevant to "The Arduino MegaBox from Altronics":
  • Firmware (Arduino sketch) for the LC Meter (Mega Box) (Software, Free)
  • Firmware (Arduino sketch) for the VS1053 Music Player (Mega Box) (Software, Free)
Articles in this series:
  • The Arduino MegaBox from Altronics (December 2017)
  • The Arduino MegaBox from Altronics (December 2017)
  • Arduino LC Meter Shield Kit (January 2018)
  • Arduino LC Meter Shield Kit (January 2018)
  • The Arduino Mega Box Music Player revisited (February 2018)
  • The Arduino Mega Box Music Player revisited (February 2018)
  • Altronics New MegaBox V2 Arduino prototyping system (December 2019)
  • Altronics New MegaBox V2 Arduino prototyping system (December 2019)
Items relevant to "Build your own Super-7 AM Radio Receiver – Part 2":
  • Super-7 AM Radio PCB [06111171] (AUD $25.00)
  • Case pieces for the Super-7 AM Radio (PCB, AUD $25.00)
Articles in this series:
  • Build the Super-7 – a single-board AM radio receiver (November 2017)
  • Build the Super-7 – a single-board AM radio receiver (November 2017)
  • Build your own Super-7 AM Radio Receiver – Part 2 (December 2017)
  • Build your own Super-7 AM Radio Receiver – Part 2 (December 2017)
Items relevant to "El Cheapo Modules 11: Pressure/Temperature Sensors":
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • GY-BM BMP280 module (Component, AUD $5.00)
  • GY-BME280 Barometric Pressure/Altitude/Temperature/Humidity I²C Sensor breakout board (Component, AUD $12.50)
  • GY-BME280 module (6-pin/3.3V version) (Component, AUD $10.00)
  • Software for El Cheapo Modules: GY-68 (BMP180) (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Part 3: Finishing our new 6GHz+ Digital Frequency Meter":
  • 6GHz+ Touchscreen Frequency Counter PCB [04110171] (AUD $10.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Case pieces for the 6GHz+ Frequency Counter (PCB, AUD $15.00)
  • Software for the 6GHz+ Touchscreen Frequency Counter (v1.01) (Free)
Articles in this series:
  • 0.01Hz - 6+GHz touchscreen frequency meter, Part 1 (October 2017)
  • 0.01Hz - 6+GHz touchscreen frequency meter, Part 1 (October 2017)
  • Touch-screen 6GHz+ Frequency Counter, part II (November 2017)
  • Touch-screen 6GHz+ Frequency Counter, part II (November 2017)
  • Part 3: Finishing our new 6GHz+ Digital Frequency Meter (December 2017)
  • Part 3: Finishing our new 6GHz+ Digital Frequency Meter (December 2017)

Purchase a printed copy of this issue for $10.00.

Using Cheap Asian Electronic Modules Part 11: by Jim Rowe Elecrow GY-68 & GY-BM Barometer/Temperature Sensor Modules This month, we’re looking at two very tiny modules which sense barometric pressure and air temperature. One uses the Bosch BMP180 digital pressure sensor, while the other uses the newer BMP280 sensor. Both can send their readings to virtually any micro via a standard I2C serial interface, while the BMP280-based module also offers an SPI interface. T he first thing you notice about the Elecrow GY-68 digital barometer module is its tiny physical size. It measures only 13 x 10 x 2.5mm, making it by far the smallest module we’ve looked at so far in these articles. The BMP180 sensor IC which forms the functional heart of the module is much smaller again, measuring only 3.6 x 3.8 x 0.93mm. The BMP180 has what is described as ultra-low power consumption, drawing less than 10µA when taking readings once per second and less than 1µA in standby mode. Clearly, it’s very suitable for use in compact portable devices like smartphones. It’s also a low-cost device. The Elecrow GY-68 module we’re looking at here is available from the Silicon Chip online shop for just $5 plus postage (catalog code SC4343). The BMP180 sensor This is made by Bosch Sensortec, a division of the large German firm Robert Bosch GmbH (www.boschsensortec.com). The BMP180 is based on piezo-resistive MEMS technology, where MEMS stands for “MicroElectroMechanical Systems”. In other words, it uses a tiny sensor element which flexes mechanically in response to changes in atmospheric 78 Silicon Chip pressure and the flexing is sensed by measuring changes in the element’s resistance. The BMP180’s 3.6 x 3.8 x 0.93mm metal package has a tiny vent hole (about 0.5mm diameter) in the top to allow the sensor element access to the outside air. And apart from the sensor element, there are three other functional blocks inside the device. As shown in Fig.1, the three blocks comprise an ADC (analog to digital converter) to make the measurements, a control unit which also provides the I2C serial interface for communicating with an external micro and an EEPROM which has 22 bytes of storage for the device’s 11 x 16-bit calibration parameters. Every individual BMP180 device is calibrated during manufacture, after which the calibration parameters are saved in its EEPROM. An external micro can read these parameters and use them to correct that sensor’s readings for offset, temperature dependence and other factors. So with suitable software, the BMP180 can provide very high accuracy measurements of both barometric pressure and temperature. The relative accuracy for pressure is quoted as ±0.12hPa from 950-1050hPa at 25°C, while the absolute accuracy is quotCelebrating 30 Years ed as -4 to +2hPa over the range from 300-1100hPa and for temperatures of 0-65°C. Impressive! With the right software, it’s also fairly easy to use the BMP180 as an altimeter, capable of indicating your current altitude above mean sea level (MSL). So its applications are not limited to being used as a barometer and thermometer. By the way, although the BMP180 normally comes with the I2C serial interface, a variant is also available with an SPI interface. Presumably, this would be for large orders from equipment manufacturers. By the way, if you’re unfamiliar with barometers and the various units used for atmospheric or barometric pressure, you might like to refer to the panel headed “Barometric Pressure and Units”. Elecrow’s GY-68 module As you can see from the photo of the Elecrow module, there are few components apart from the BMP180 sensor itself: just an SOT-23 low-dropout (LDO) voltage regulator, three surfacemount capacitors and two resistors. Fig.2 shows its complete circuit. REG1 is the MCP1700 3.3V LDO regulator, used to ensure that the supply voltage for the BMP180 is kept within siliconchip.com.au Fig.1: block diagram of the BMP180 (the small metal package located on the module). It contains 22 bytes of EEPROM for storing calibration values. its ratings (3.6V max). It also ensures that the two pull-up resistors on the I2C interface’s SDA and SCL are returned to the same safe voltage level. The three capacitors are for supply rail bypassing. CON1 is the 4-pin connector used both to supply the module with its power and also to connect to an external micro via the I2C interface. Since the module draws less than 10µA from the supply when it’s taking one measurement per second, there’s no problem in powering it from an Arduino or a Micromite module or from a power bank using a 3.7V Li-ion cell. Fig.2: complete circuit for the GY-68 module. CON1 provides power and I2C interfacing for the module, which draws less than 10µA when taking readings, and 1µA in standby mode. to the libraries in your Arduino IDE by clicking on Sketch → Include Library → Add .ZIP Library and then directing it to the folder into which the zip file was downloaded. On the Silicon Chip website, you can find a small sketch for running the GY-68/BMP180 with an Arduino, called “SFE_BMP180_barometer_ sketch.ino”. I have adapted it from a sample sketch provided by Elecrow. It’s pretty straightforward, first initialising the BMP180 (ie, extracting the calibration parameters from its EEPROM) and then taking a measurement of temperature and barometric pressure every five seconds. Each time it takes a measurement, it crunches the data and displays the results on the Arduino IDE’s Serial Monitor. A sample of this is shown in the screen grab of Fig.5. Since the BMP180 only measures the temperature and absolute air pressure, the sketch needs to know your current altitude above sea level in order to calculate the corresponding MSL pressure. Connecting it to a micro Fig.3 shows a simple way of connecting the GY-68 barometer module to an Arduino. The SCL and SDA lines of the GY-68 connect to the SCL/ A5 and SDA/A4 pins of the Arduino, while the VIN and GND lines connect to the +5V and GND pins respectively. That’s all there is to it. It’s equally simple to connect the module to a Micromite, as you can see from Fig.4. Here the SCL and SDA lines connect to pins 17 and 18 of the Micromite respectively, while as before, the VIN and GND lines go to +5V and GND. Programming it It’s relatively easy to get the GY68 module working happily with an Arduino, although this does involve the use of a matching software library called SFE_BMP180.zip. This can be downloaded from the Elecrow website at https://github.com/sparkfun/ BMP180_Breakout After downloading, it can be added siliconchip.com.au The Elecrow GY-68 module is shown here at three times actual size, as it is only 13 x 10mm. The metal package BMP180 sensor (3.6 x 3.8mm) is based on piezoresistive MEMS technology. Celebrating 30 Years December 2017  79 Fig.3 (top): the pin connections for the GY-68 to an Arduino are fairly straightforward. Fig.4 (upper right): pin connections for the GY-68 to a Micromite module. Fig.5 (bottom left): example data from the GY-68 sensor module when connected to an Arduino. Fig.6 (right): example data from the module when connected to a Micromite. Fig.7 (bottom right): when running the Micromite sample software, if there is a screen attached, it will also show the readings on the display. 80 Silicon Chip Celebrating 30 Years siliconchip.com.au This information is fed to it in this line, located very close to the start of the sketch: #define ALTITUDE 55.0 This sets the altitude to 55 metres, which is a rough estimate of my workbench’s altitude above MSL. However, as the comment on the right of this line explains, you can easily substitute your own altitude if you want maximum accuracy. You’ll note from Fig.5 that the sketch repeats this altitude figure in the first line of each set of measurements, giving it in both metres and feet. It also shows the temperature reading in both degrees Celsius and degrees Fahrenheit as well as the absolute and MSLrelative pressures in both millibars and inHg (inch of mercury; reflecting its origin in the USA). Finally, it repeats the altitude figures again, but this time describes them as “computed altitude”. This sketch is a good way to see what the GY-68 module can do. It’s not quite so easy to get the GY68 module working with a Micromite because there is no pre-existing or built-in library designed to communicate with it and do the calculations to provide the corrected temperature and pressures. However, I have written an MMBasic program to do the job and you can download it (“BMP180 barometer check prog. bas”) from the Silicon Chip website. This program expects a GY-68/ BMP180 to be connected to the Micromite as shown in Fig.4 so once you do this and upload the program, it should spring into life. If you have the Micromite still connected to your PC and have Micromite Chat open, you’ll see that it produces temperature and pressure measurements every second, as shown in the screen grab of Fig.6. Just as with the Arduino sketch, this program also needs to know your current altitude/elevation in order to work out the equivalent barometric pressure at MSL. As before, you need to substitute your elevation in this line, which you’ll find near the start of the program and in about the middle of the declaration of the program’s variables: DIM AS INTEGER Alt = 50 Simply substitute your own altitude/elevation above MSL (in metres) instead of the “50” in this line, then upload the program to the Micromite and get it going (by clicking on the little “gearwheel” button in the Micromite Chat toolbar). It will then show the current mean-sea-level pressure (MSLP) as the last item in each line. If your Micromite is hooked up to an LCD touchscreen, it will also give you an on-screen display of the temperature and pressure readings as shown in the screen shot of Fig.7. Like the measurements sent back to your PC, the display is updated every second. Incidentally, I compared the temperature and pressure readings achieved using this program with the figures shown on the Australian Government Bureau of Meteorology website (which updates every 10 minutes in the Sydney area), and they compared surprisingly well. The temperature was within 0.2°C and the MSL pressure within 0.5hPa; not bad at all for such a small device! If you want to make your own comparisons, you’ll find the Bureau of Meteorology website at www.bom. gov.au You just have to select your state, then Observations, then select your area in the state. Barometric Pressure and Units You’ll find quite a few units in use for measuring atmospheric or barometric pressure: Pascals (Pa) and hectoPascals (hPa), bars (B) and millibars (mB), millimetres of Mercury (mmHg) and inches of Mercury (inHg). Basically, atmospheric pressure is due to the weight of air immediately above you and it corresponds to a force per unit area. The primary SI unit for pressure is the Pascal (Pa), which is equivalent to a force of 1 Newton per square metre. That is, 1Pa = 1N/m2. It turns out that a column of air one square centimetre in cross section, measured from sea level to the top of the Earth’s atmosphere, has a mass of about 1.03kg and a weight of 10.1325N. This corresponds to a pressure of 101,132N/m2, or 101,325Pa (= 101.325kPa = 1013.25hPa, since 1hPa = 100Pa). So the standard atmosphere is defined as 101,325Pa or 1013.25hPa. The actual barometric pressure at any particular location depends upon its elevation or altitude with respect to mean sea level (MSL), because the higher the elevation, the lower the weight of air directly above you and the lower the pressure. For low altitudes, it can be estimated as falling by about 10hPa for every 100m rise above MSL. For higher altitudes, the pressure at any elevation/altitude can be found by a standard expression known as the Barometric Formula. The first barometers (invented in 1643 by Italian physicist Evangelista Torricelli) used to measure atmospheric pressure used a column of mercury in a vertical glass tube and as a result, they were calibrated in terms of the height of the mercury column, measured in either millimetres or inches. So that’s where the “mmHg” and “inHg” units of pressure came from. In fact, “inHg” is still used in the United States, Canada and Colombia. For the record, one standard atmosphere of 1013.25hPa is equivalent to 760mmHg or 29.92inHg. So where do the bar and the millibar units fit in? Well, the bar was a unit of weight used in the metric system before about 1800. Then around 1890, it was used as a unit of atmospheric pressure by Norwegian physicist and pioneering meteorologist Vilhelm Bjerknes. Since then, it has been used sporadically as a unit of atmospheric pressure, although nowadays it is frowned upon and not regarded as part of the SI system of metric units. For the record, 1 bar is regarded as equal to 100kPa or 1000hPa and 1mbar equal to 1hPa or 100Pa. Thus, a standard atmosphere corresponds to 1013.25mbar or 1.01325bar. For more information, see https://en.wikipedia.org/wiki/ Atmospheric_pressure siliconchip.com.au Celebrating 30 Years December 2017  81 The GY-BM module shown above, close to actual size. Fig.8: complete circuit diagram for the GY-BM module. Compared to the GY-68's circuit shown in Fig.2, this device is quite a bit simpler in design, removing the need for an external regulator. You’ll then see a list of observation stations in that area and then when you click on a station near you, you’ll see a list of the weather data for that day, including temperature and MSLP. The new GY-BM module Elecrow have recently added a second digital Barometer/Temperature module to their range: the GY-BM module, based on Bosch Sensortec’s new BMP280 digital sensor IC. The new module is only slightly larger than the GY-68, but it is still very small – measuring only 15 x 11 x 3mm. On the other hand, the BMP280 sensor IC itself is even smaller than the BMP180, measuring only 2.0 x 2.5 x 0.95mm. Despite this tiny size the BMP280 offers some advantages over the BMP180. These include a dual-mode SPI interface (modes “00” or “11”) in addition to the I2C interface, higher measurement resolution for both pressure (0.16Pa vs 1Pa) and temperature (0.01°C vs 0.1°C), lower current consumption (2.7µA vs 12µA) and an internal software configurable IIR filter to allow minimisation of short-term air pressure disturbances. In terms of absolute accuracy, the BMP280 is essentially identical to the BMP180. Pressure accuracy is ±1hPa from 0-65°C, while the temperature accuracy is ±0.5°C at 25°C and ±1.0°C from 0-65°C. The internals of the BMP280 appear to be very similar to those of the BMP180 shown in Fig.1, apart from it being provided with an SPI The new GY-BM module is a tad larger than the previous GY-68 model and the BMP280 has near identical performance to the BMP180. 82 Silicon Chip Celebrating 30 Years interface as well as the I2C interface. The calibration parameters are again stored in a 22-byte internal EEPROM/ NVM (non-volatile memory) during manufacture. The circuit of the GY-BM module is shown in Fig.8, and as you can see it’s even simpler than that of the GY68 module shown in Fig.2. That is because the GY-BM module is intended to run only from a nominal 3.3V supply, and as a result it has no on-board LDO (low dropout) regulator. On the other hand, it has a sixpin connector (CON1) compared to the four pins of the GY-68. The two extra pins are required because the optional SPI interface requires four pins, compared to just two for the I2C interface. To connect the GY-BM module to a micro using the I2C interface, the SDA line should be connected to pin 6 of CON1, while the SCL line is connected to pin 3. Additionally, the CSB pin (CON1 pin 5) should be left floating, so it’s pulled high via the 10kW pullup resistor – this signals to the BMP280 that the I2C interface is to be used. Finally, pin 4 of CON1 can be used to set the module’s I2C address, connecting it to ground to give it the same "default" address as the BMP180, or connecting it to VIN (+3.3V) to give it a different address. However, if you want to connect the GY-BM module to a micro using a standard four-wire SPI interface, the SDI line should be connected to pin 6 of CON1, the SDO line to pin 4 of CON1, the SCK line to pin 3 of CON1 and finally the CSB (Chip Select-bar) line to pin 5 of CON1. The GY-BM module should be just as easy to use as the GY-68 module. Just make sure that you connect its supply input VIN (CON1 pin 1) to +3.3V, not the +5V supply used for the GY-68 module. Otherwise the BMP280 chip may be irrevocably SC damaged. siliconchip.com.au It’s not long to Christmas ­– (just 3 weeks or 25 days!) Here’s the perfect Christmas Gift: A SILICON CHIP subscription! It’s the gift that keeps on giving – month after month after month! If you know someone interested in electronics, why not give them a Silicon Chip gift subscription? (Or even reward yourself if no-one else will!) SILICON CHIP is Australia’s leading monthly magazine focused on electronics and technology. Whether they’re a PhD in quantum mechanics, or the newest beginner just starting out, SILICON CHIP is the one magazine that they’ll want to read from cover to cover, every month. Print subscriptions actually cost less than buying over the counter! Prices start at just $57 for six months, $105 for 12 months or $202 for 24 months – INCLUDING postage! And yes, we have binders available (Australia only) to keep those magazines safe! Taking out a gift subscription for someone special has never been easier. Simply go to our website, click on the <SUBSCRIBE> tab and select <GIFT SUBSCRIPTIONS>. We’ll even send a special message from you to the recipient . . . AND we’ll send you a reminder when the subscription is about to fall due. What could be easier? Or call us – 02 9939 3295, between 9am and 5pm Monday to Friday (AEDST). 4 4 4 4 4 4 Remember, it’s cheaper to subscribe anyway . . . do the maths and see the saving! Remember, we pick up the postage charge – so you $ave even more! Remember, they don’t have to remember! It’s there every month in their letter box! Remember, your newsagent might sell out – and they’ll miss out! Remember, there’s also an on-line version you can subscribe to if you’re travelling. Remember, subscribers qualify for a 10% discount on any item from the*excluding online shop* subscriptions We’re waiting to welcome them – or you – into the SILICON CHIP subscriber family! A GIFT SUBSCRIPTION MAKES LOTS OF SENSE AND SAVES LOTS OF CENTS! www.siliconchip.com.au