Volt/Amp/Watt meter on MSP430 LaunchPad

Texas Instruments MSP-EXP430G2

This is a simple voltage and current meter that uses the Texas Instruments INA219 chip and Texas Instruments MSP430 LaunchPad Development kit. Voltage measurement range is 0 to 26 volts with 4 mV resolution and current measurement range is -4 to +4 amps with 1 mV resolution (when using a 0.01 ohm shunt). The specs are inferior to a pair of quality multimeters, but it is a fraction of the price and shows wattage in addition to voltage and current. The Nokia 5110 display is used so the firmware could be enhanced to do simple graphing. Sending the measurements to a computer could also be done.

Volt/Amp/Watt meter on MSP430 LaunchPad

LaunchPad is an easy-to-use development tool intended for beginners and experienced users alike for creating microcontroller-based applications. At $4.30, the LaunchPad offers everything you need to get started with your projects.

The LaunchPad development kit is a part of the MSP430 Value Line series. LaunchPad has an integrated DIP target socket that supports up to 20 pins, allowing MSP430 Value Line devices to be dropped into the LaunchPad board. Also, an on-board flash emulation tool allows direct interface to a PC for easy programming, debugging, and evaluation. Included are free and downloadable software development environments for writing and debugging software. LaunchPad can be used to create interactive solutions thanks to its on-board push buttons, LEDs, and extra input/output pins for easy integration of external devices.

Development kit Texas Instruments MSP430 LaunchPad

The INA219 is a high-side current shunt and power monitor with an I2C interface. The INA219 monitors both shunt drop and supply voltage, with programmable conversion times and filtering. A programmable calibration value, combined with an internal multiplier, enables direct readouts in amperes. An additional multiplying register calculates power in watts. The I2C interface features 16 programmable addresses.

Features

  • Senses Bus Voltages From 0V to +26V
  • Reports Current, Voltage, and Power
  • 16 Programmable Addresses
  • High Accuracy: 0.5% (max) Over Temperature (INA219B)
  • Filtering Options
  • Calibration Registers
  • SOT23-8 and SO-8 Packages

Using the INA219 makes for a very simple circuit.

Volt/Amp/Watt meter on MSP430 LaunchPad: Schematic Diagram
Click to enlarge

The normal display is three lines with voltage, amperage and wattage.

Pressing the P1.3 switch will show the 6 registers in the INA219 in hex and signed decimal.

INA219 registers

The code is written in C++ and uses templates for the LCD, IIC and INA219. Software SPI and IIC is used for maximum portability.

Downloads

Development board (MSP-EXP430G2) Schematic Diagram - download
Source Code - download

43oh.com