GY-BMP280-3.3 Pressure Sensor Module Arduino Tutorial and Pinout

GY-BMP280-3.3 high precision atmospheric pressure sensor module for Arduino – tutorial on first use and testing of the module as well as GY-BMP280-3.3 pressure sensor module pinout. The same module is sold under different names such as BMP280-3.3 or just BMP280, although BMP280 is the actual pressure sensor chip that can be seen just below the capacitor at the top of the module, as shown in the image below.

GY-BMP280-3.3 Pressure Sensor Module

GY-BMP280-3.3 Pressure Sensor Module

GY-BMP280-3.3 Pressure Sensor Module Basic Information

The least you need to know before using this module is presented below.

What the GY-BMP280-3.3 Pressure Sensor Module Can Measure

It can measure both atmospheric pressure and temperature. Because it can measure atmospheric pressure, it can be used to calculate altitude.

BMP280 Datasheet

The module uses a BMP280 barometric pressure sensor from Bosch. A datasheet on the BMP280 can be found on the BMP280 page on the Bosch website. This datasheet and web page is for the actual BMP280 device found on the GY-BMP280-3.3 module.

Operating Voltage

The GY-BMP280-3.3 operates from 3.3V, so requires 3.3V power and must be driven with 3.3V logic levels. Some modules that use the BMP280 device have a voltage regulator and level shifters so that it can be operated from a 5V controller such as an Arduino Uno. This module does not have any regulator or level shifters.

From the BMP280 datasheet:
Minimum power supply voltage – 1.71V
Maximum power supply voltage – 3.6V
Absolute maximum power supply voltage – 4.25V

Direct connection to a 3.3V Arduino such as an Arduino Due, Arduino Zero, Arduino M0 or Arduino M0 Pro is fine, so long as the pressure sensor is powered from the Arduino 3.3V pin. For 5V Arduinos such as the Arduino Uno or Arduino MEGA, it must be powered from the Arduino 3.3V pin, and must be interface to the Arduino using a level shifter for the data and clock pins.

I have seen videos on YouTube where this module is connected directly to a 5V Arduino and powered from 5V. This is extremely bad engineering practice and could result in severely damaging or destroying the BMP280 device. It is sheer luck if the device actually works and does not blow up.

Interfacing

I2C or SPI can be used to interface or connect the module to an Arduino or other microcontroller. Pin 6 of the module controls the I2C address of the module which can be set to either 0x76 when pin 6 is left unconnected or 0x77 when pin 6 is pulled to Vcc (3.3V).

Wrong Information

The Internet is full of wrong information regarding this sensor module. Tutorials on powering this device from 5V and not using level shifters on the data pins are out there. Or if the advice is to power the module from 3.3V, then the data pins are directly connected to 5V Arduino pins without level shifters.

Another mistake that I have seen is that people do not know that the I2C address can be changed by using pin 6 of the module, as can be seen in the pinout for the module (link in the section below). What they then do is modify the Arduino driver to change its I2C address so that it matches the default I2C address of the module, instead of just pulling pin 6 high so that the module address matches the driver address.

GY-BMP280-3.3 Pressure Sensor Module Pinout

Refer to the GY-BMP280-3.3 pressure sensor module pinout page for the module’s pinout and circuit diagram.

GY-BMP280-3.3 Pressure Sensor Module Tutorial

A tutorial on basic use and testing of the GY-BMP280-3.3 pressure sensor module on the Starting Electronics website shows how to connect the module to both 3.3V and 5V Arduino boards. An Arduino Due is used to demonstrate how to wire the module to a 3.3V Arduino. For 5V Arduino boards, an Arduino Uno is used to demonstrate how to use a transistor level shifter to wire the module for 5V use.

The tutorial also shows how to install drivers for the pressure sensor module and then test the module to make sure that it can read pressure and temperature.

Go to the tutorial now →

KiCad Schematic Tutorial

Learn to draw a circuit diagram in this KiCad schematic tutorial for beginners. Draw a 555 timer LED flasher circuit using free open source KiCad EDA software.

KiCad is an Electronic Design Automation (EDA) software package that can run on Windows, Linux and MAC OSX. Beginners in electronics may be interested in learning how to draw a circuit using this software package. The circuit diagram or schematic can then be exported for publishing on the web or in documents.

The image below shows KiCad running on a Windows computer with the circuit drawn in the tutorial.

KiCad Schematic Tutorial

KiCad Schematic Tutorial

Beginners in electronics may also like the blog post on how to read schematic or circuit diagrams for beginners.

Installing KiCad

KiCad can be installed on Windows, Linux and MAC OSX:

How to install KiCad in Windows is a short article on installing the newest version of KiCad on a Windows computer.

How to install KiCad in Linux is an article that shows how to install the latest version of KiCad on a Linux computer.

The KiCad download page has links for installing KiCad on OS X and Windows and various Linux distributions.

KiCad Schematic Tutorial for Beginners

The full KiCad schematic tutorial can be found on the Starting Electronics website.

The tutorial shows how to create a new project in KiCad, including how to create and name a project directory. A 555 timer flashing LED circuit is then drawn using the KiCad schematic editor called Eeschema.

You will learn how to zoom in and out of the circuit, scroll the schematic, place electronic part symbols, wire the circuit and annotate the circuit. These and more basic actions needed to draw and edit a schematic are included in the tutorial.

Finally the tutorial explains how to export a circuit diagram or schematic for publishing on the web or in a document.

Go to the KiCad Schematic Tutorial now →

 

ESP8266 ESP-05 WiFi Module – Getting Started

I recently purchased three ESP8266 ESP-05 WiFi modules. These are very cheap WiFi modules costing around $4 USD each, so are ideal for hobbyists, makers and hackers to use in various projects. My idea was to try to get an Arduino web server working on WiFi as a cheap alternative to using an Ethernet shield or WiFi shield.

Although the same module is available from several suppliers, the particular module that I bought was from SainSmart: SainSmart Neu ESP8266 Esp-05 Remote Serial Port WIFI Transceiver Wireless Module AP+STA

ESP8266 ESP-05 WiFi Module

ESP8266 ESP-05 WiFi Module

ESP8266 ESP-05 Pinout and Documentation

The supplier web page for the ESP8266 ESP-05 had no pinout for the module and no documentation. Some of the information on the web page for the module was also completely wrong, for example they state that the module has 5V compatible I/O, however this is wrong. The I/O pins only work with 3.3V logic and are not 5V tolerant.

They also state “on board antennae”, but this module does not have an on board antennae, it has a connector for an external antennae.

ESP8266 ESP-05 Pinout

After some searching on the web I found a pinout diagram for the 5 pin version of the ESP8266 ESP-05. A new article with pinout and power requirements for the ESP-05 is now available on the Starting Electronics website.

ESP8266 Documentation

The manufacturer of the ESP8266EX chip found on the ESP-05 and other modules is the Espressif company. Documentation for the module must be taken from the ESP8266EX datasheets on the Espressif website. Look under Documentation on the ESP8266 resource page where you will find datasheets, user guides, application notes, technical references, etc.

Getting Started with the ESP8266 ESP-05 WiFi Module

You bought a ESP8266 5-pin ESP-05 module, now what? Here are the steps necessary to get the module working for the first time. Once you have a basic understanding of the module and where to find further information you will be able to start your own project development.

Soldering the Header

The module comes with a separate 5-pin header that must be soldered into the module. After the header is soldered to the module it is easy to use the module in a breadboard.

ESP8266 ESP-05 with Header Soldered

ESP8266 ESP-05 with Header Soldered

The following video shows how to solder the header to the module.

 

Aerial / Antennae

I found that the module works fine without an aerial / antennae as long as it is near enough to the WiFi router that it is connecting to. Connecting a wire to the aerial connector does give it more range and picks up the second WiFi router that I have on the other side of the house.

Testing the Module

Use the pinout diagram to correctly connect the ESP8266 module power and UART data pins. An Arduino Due is ideal for testing the module. This is because a Due can supply enough current from its 3.3V pin and works with 3.3V logic. The Arduino Due is therefore completely compatible with the ESP8266 module.

The article on testing the ESP8266 ESP-05 module using an Arduino Due shows how to connect the ESP8266 module to the Due and test it. Use this article to get started with sending AT commands to the WiFi module.

Documentation and Staring your Own Projects

Once you have the ESP8266 module working, it is a matter of sending the correct AT commands to the module to set it up for your project.

Find example AT commands in the ESP8266 AT Command Examples document.

Find all of the AT commands in the ESP8266 Instruction Set document.

Atmel Software Framework Tutorial – ARM Cortex

An Atmel Software Framework Tutorial series that shows how to use Atmel Software Framework (ASF) to program ARM Cortex microcontrollers using Atmel Studio and the C programming language.

About ASF

Atmel Software Framework (ASF) consists of a number of modules that can be added to a C language project in Atmel Studio. Adding ASF modules to a project makes various functions available for initializing and using hardware and software services, cutting down development time.

As an example, adding the IOPORT ASF module to a project allows pins and ports of a microcontroller to be initialized and accessed using functions from the IOPORT module. Functions from the IOPORT module can then be called to set up pins or ports as inputs or outputs and other functions allow the pins or ports to be read or written to without having to use the hardware at a register level.

Atmel Software Framework Tutorial Contents

The ASF tutorial series consists of the following parts thus far. More parts are being added to the tutorial series each week.

INTRODUCTION TO ASF

Introduces the Atmel software framework tutorial and shows how ASF is structured.

BLINKING AN LED ON AN ATMEL DEVELOPMENT BOARD

How to create a new ASF project for an Atmel Evaluation board. The example project blinks the on-board LED.

BLINKING AN LED ON A CUSTOM OR USER BOARD

How to create an ASF user board project. If you are going to use ASF on your own custom or user board, you will need to know how to write ASF user board projects from scratch. This type of project can still be created and tested on an Atmel evaluation board. Most of this tutorial series shows how to create various projects from scratch using an ASF user board project as this is what is needed in real world applications that use a custom board.

ADDING ASF TO AN EXISTING PROJECT

How to add ASF to an existing project that was not started as an ASF project.

COMPARING ATMEL BOARD AND USER BOARD ASF PROJECTS

There are slight differences between ASF projects created for Atmel evaluation boards and user board ASF projects. This part of the tutorial shows the differences between the project types such as which files are different and where to changes settings in the files.

USING EXTERNAL CRYSTALS IN AN ASF PROJECT

How to enable the on-chip oscillators of the microcontroller to use the external crystals instead of the internal R/C oscillators in ASF.

ASF PROJECT QUICK START CHECKLIST

A quick start checklist for creating new ASF user board projects. Where to add code and to change settings in a new ASF project.

READING AND WRITING PINS USING ASF

Using ASF functions to read and write individual microcontroller pins used for general purpose input/output.

WRITING TO A PORT USING ASF

How to write to a microcontroller port or group of pins from a port using ASF functions.

READING AND WRITING A PORT USING ASF

Reading and writing a port or group of port pins rather than individual port pins.

USING A UART FOR C STANDARD I/O FUNCTIONS

How to configure C standard input/output functions such as printf() and scanf() to use a UART for input/output.

Further Parts of the Tutorial Series

Further parts will be added to the tutorial series until it is complete. Check the index and menu of the tutorial for additional parts.

Arduino Internet Voltage Monitoring

Arduino Internet voltage monitoring can be achieved in several ways. The Arduino can be set up as a client or a server in order to display measured voltage on a web page. In this article an Arduino is set up as web server that hosts a web page stored on SD card. The web page displays the voltage measured on Arduino analog pin A2 in near real-time. The web server also interacts with ThingSpeak, a Internet of Things (IoT) service which logs voltage over time. Voltage is displayed on the hosted web page on a gauge and in a ThingSpeak generated graph or chart.

Arduino Internet Voltage Monitoring

Arduino Internet Voltage Monitoring

How Arduino Internet Voltage Monitoring Works in this Project

The Arduino web server hosts a web page that communicates with the Arduino using JavaScript / Ajax. This allows the voltage to be sent from the Arduino to the web page over the Ethernet connection to update the voltage in the gauge on the web page. A potentiometer is used to vary the voltage on Arduino pin A2 between 0 and 5 volts.

The raw value from the Arduino analog input is sent to the web page and converted to voltage in the JavaScript that runs on the page. The raw analog value is also displayed on the web page and will be between 0 and 1023.

After the voltage is calculated, it is sent to ThingSpeak by JavaScript. ThingSpeak logs the voltage and plots the graph of the voltage. The graph in the above image is created by copying graph code from ThingSpeak which then updates the graph with the data from the ThingSpeak server.

Voltage Update Timing

Voltage is measured by the Arduino and updated on the web page every 200ms. ThingSpeak only updates graph or chart values every 15s (fastest update speed), so the JavaScript code only sends updates to the ThingSpeak server every 20s.

Tutorial for the Project and Other Resources

A full tutorial is available which explains how to set up this project on your own Arduino.

Learn how ThingSpeak works and how to set up a channel to send data from an Arduino to an account on the ThingSpeak server — ThingSpeak is a free service.

Learn about measuring voltage with Arduino.

Arduino Ethernet shield tutorial explains how to set up an Arduino and Ethernet shield as a web server.