### Air pressure, temperature and altitude with BMP280 sensor

BMP280 is a digital air pressure sensor especially designed for mobile applications. It is a very small device, having a footprint of 2 by 2.5 millimeters. Interfacing with a development board would be difficult if breakout boards wouldn't exist. Even so, there's another issue: sensor's nominal voltage is 1.8 V. Fortunately, it can handle 3.3 volts. BMP280 can measure atmospheric pressure and temperature. Since there is a correlation between pressure and altitude, the latter can be estimated.

I ended up wiring this sensor to a 5 V development board because of the display. Pressure, temperature and altitude required 3 rows, so I used my ST7920 graphic LCD. Although this controller works at 3.3V, the way my display is hardwired by manufacturer does not because you cannot increase contrast enough. I connected the display in SPI mode, so only 4 wires are used (3 for SPI and 1 is reset). The BMP280 supports either SPI or I2C interface. Because the only level shifter I have is one I built a while ago for I2C, this is the protocol I wrote the code for.

The BMP280 sensor on the breadboard

### Stereo audio amplifier with TDA2003

TDA2003 is an integrated audio amplifier circuit capable of providing up to 10 W into 2 ohms load and 6 W into 4 ohms load when powered at 14.4 V. It is very easy to build a reliable circuit with it because it has short circuit protection. It will withstand a permanent short circuit on the output as long as supply voltage doesn't exceed 16 V. The maximum operating DC voltage is 18 V, however TDA2003 will not get damaged as long as supply voltage is less than 28 V. It comes with integrated thermal limiting circuit.

Having these features, the TDA2003 proves to be a good option for small power amplifiers. It was designed for car audio, that's why it is powered from single supply of about 12 V. Although nowadays it is considered obsolete, there are plenty of electronic parts suppliers which have TDA2003 in stock. At very low prices, by the way. Using the datasheet as source of inspiration, I designed my own PCB for two TDA2003 circuits, to make a stereo amplifier.

The TDA2003 amplifier on homemade PCB without heatsink

### Upload binary and debug STM32 bluepill on Eclipse

The blue pill is a STM32 development board which can be programmed in multiple ways. You can use Arduino IDE, mBed OS or HAL library from ST. This post is about STM32 development using HAL. There is a plugin for Eclipse that adds features for working with this family of microcontrollers (MCU) and there is also System Workbench for STM32 (SW4STM32), a complete development environment based on Eclipse IDE.

In a previous post I talked about STM32 development on SW4STM32. At that time I was just beginning with this MCU and after I was compiling the project binary, I used ST-Link tools to upload it to the board. That worked, but it was uncomfortable to launch ST-link utility or call st-flash after each build. More important, I lost all debug options with this method. I didn't knew then that Eclipse/SW4STM32 can be configured to automatically upload (burn) binary to MCU and debug it. Configuration procedure is a one-time process per project.