Circuits / Sensors
Arduino UNO: altitude with a BMP280 (on 3.3 V)
The usual BMP280 board has no regulator: it goes on the UNO's 3.3 V pin, not 5 V. Wire turns on the UNO's own 5 V pull-ups, so after begin() the sketch turns them off and the bus idles at 3.3 V. Lower pressure, higher altitude.

Tap a part to see its voltages and currents. It is a model, not a measurement.
What do you need?
- Development board Arduino UNOAliExpress Amazon
- Climate sensor (library) BMP280AliExpress Amazon
- Jumper wires × 5AliExpress Amazon
- BreadboardAliExpress Amazon
The AliExpress links are affiliate links: if you buy through them ohmio.dev gets a commission, at no extra cost to you. Affiliate links
This page is a guide: the numbers come from a simulation, and real parts vary. Check your parts before you power the circuit. Safety and responsibility
How does an Arduino get altitude from a BMP280?
The BMP280 measures air pressure, which falls as you climb, and the library turns it into altitude. The sketch calls bmp.readAltitude(1013.25), comparing the pressure with the sea-level 1013.25 hPa. In the model, 1013.25 hPa prints alt: 0.00 m, 900 hPa prints alt: 988.67 m, and 700 hPa prints alt: 3012.69 m. The board has no regulator, so it goes on the UNO's 3.3 V pin: on 5 V it would pass its 4.25 V maximum. The UNO's own pull-ups to 5 V would lift SDA and SCL to 3.67 V, so the sketch turns them off after begin(). With the program running, the bus sits at 3.30 V. In a real build, an UNO at 5 V asks for 0.7 × VCC = 3.5 V as a high on its I2C pins (ATmega328P datasheet): 3.3 V usually works but is outside the specification, and a level shifter or a 3.3 V board is the correct way.
Values from the Protoboard ISO simulation: a model, not a bench measurement.
Hear about the next circuit
One email when a new circuit is out, about twice a month. Nothing else.