LiPo Fuel Gauge (MAX1704X) Hookup Guide

Pages
Contributors: bboyho
Favorited Favorite 1

Introduction

The SparkFun LiPo Fuel Gauge - MAX17043 connects your LiPo battery to your project and uses a sophisticated algorithm to detect the relative state of charge and direct A/D measurement of battery voltage. In other words, it tells your microcontroller how much 'fuel' is left in the tank. The LiPo Fuel Gauge Breakout communicates with your project over I2C and an alert pin also tells you when the charge has dropped below a certain percentage.

SparkFun LiPo Fuel Gauge

SparkFun LiPo Fuel Gauge

TOL-20680
$12.50

Required Materials

To follow along with this tutorial, you will need the following materials at a minimum. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary. Below is a wishlist of the parts that you need to get started.

Microcontroller

You will need a microcontroller with an I2C port when connecting to the LiPo Fuel Gauge. For the scope of this tutorial, we will be focusing on the Arduino Library for the LiPo Fuel Gauge.

Arduino Pro Mini 328 - 3.3V/8MHz

Arduino Pro Mini 328 - 3.3V/8MHz

DEV-11114
$10.95
54
SparkFun RedBoard Artemis Nano

SparkFun RedBoard Artemis Nano

DEV-15443
$16.50
6
SparkFun Qwiic Micro - SAMD21 Development Board

SparkFun Qwiic Micro - SAMD21 Development Board

DEV-15423
$22.50
5
SparkFun RedBoard Turbo - SAMD21 Development Board

SparkFun RedBoard Turbo - SAMD21 Development Board

DEV-14812
$19.95
8
Arduino Pro 328 - 3.3V/8MHz

Arduino Pro 328 - 3.3V/8MHz

DEV-10914
$18.50
1

Display

The example code can be used to print the voltage and state of charge of a single cell, LiPo battery using a serial monitor. For those that want to monitor a battery remotely, you can add a display to the setup. Below is the Qwiic Micro OLED breakout that can be used. You can also use a different display. However, you will need to adjust the code to display the readings properly.

SparkFun Micro OLED Breakout (Qwiic)

LCD-14532
7 Retired

Single Cell LiPo Battery

Of course, you will also need a single cell LiPo battery. Below are a few LiPo batteries to choose from in the SparkFun catalog.

Lithium Ion Battery - 1250mAh (IEC62133 Certified)

Lithium Ion Battery - 1250mAh (IEC62133 Certified)

PRT-18286
$10.95
2
Lithium Ion Battery - 850mAh

Lithium Ion Battery - 850mAh

PRT-13854
$10.95
2
Lithium Ion Battery - 400mAh

Lithium Ion Battery - 400mAh

PRT-13851
$5.50
11
Lithium Ion Battery - 6Ah

Lithium Ion Battery - 6Ah

PRT-13856
$32.50
7

Tools

Building a circuit using this breakout requires some assembly and soldering. You may already have a few of these items but if not, the tools and hardware below help with that assembly.

Hook-Up Wire - Assortment (Stranded, 22 AWG)

Hook-Up Wire - Assortment (Stranded, 22 AWG)

PRT-11375
$22.50
19

SparkFun Beginner Tool Kit

TOL-14681
Retired

Prototyping Accessories

Depending on your setup, you may want to use IC hooks for a temporary connection. However, you will want to solder header pins to connect devices to the plated through holes for a secure connection. Depending on your application, you could use straight headers or right angle headers. Of course, you could also solder wire as well.

Breadboard - Self-Adhesive (White)

Breadboard - Self-Adhesive (White)

PRT-12002
$5.50
48
Break Away Headers - Straight

Break Away Headers - Straight

PRT-00116
$1.75
20
JST Jumper 2 Wire Assembly

JST Jumper 2 Wire Assembly

PRT-09914
$1.05
3
IC Hook with Pigtail

IC Hook with Pigtail

CAB-09741
$5.50
10
Jumper Wires Premium 6" M/M Pack of 10

Jumper Wires Premium 6" M/M Pack of 10

PRT-08431
$4.50
2
Break Away Male Headers - Right Angle

Break Away Male Headers - Right Angle

PRT-00553
$2.25
5
Jumper Wire - JST Black Red

Jumper Wire - JST Black Red

PRT-08670
$1.05

For those that want to take advantage of the Qwiic enabled devices, you'll want to grab a Qwiic cable. Users can cut, strip, and solder half of a cable to easily connect the LiPo Fuel Gauge to a Qwiic-enabled microcontroller. For those that soldered male header pins to the board when prototyping, users can use a Qwiic cable with male pins or female sockets to connect without desoldering the header pins on the board. Note that this causes the board to have a higher height profile than soldering wires straight to the board.

SparkFun Qwiic Cable Kit

SparkFun Qwiic Cable Kit

KIT-15081
$8.95
22
Flexible Qwiic Cable - 200mm

Flexible Qwiic Cable - 200mm

PRT-17258
$1.60
Flexible Qwiic Cable - Female Jumper (4-pin)

Flexible Qwiic Cable - Female Jumper (4-pin)

CAB-17261
$1.50
Flexible Qwiic Cable - Breadboard Jumper (4-pin)

Flexible Qwiic Cable - Breadboard Jumper (4-pin)

PRT-17912
$1.60

Recommended Reading

If you aren’t familiar with the following concepts, we also recommend checking out a few of these tutorials before continuing.

Battery Technologies

The basics behind the batteries used in portable electronic devices: LiPo, NiMH, coin cells, and alkaline.

Electric Power

An overview of electric power, the rate of energy transfer. We'll talk definition of power, watts, equations, and power ratings. 1.21 gigawatts of tutorial fun!

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.

What is a Battery?

An overview of the inner workings of a battery and how it was invented.

LilyPad Basics: Powering Your Project

Learn the options for powering your LilyPad projects, LiPo battery safety and care, and how to calculate and consider power constraints on your projects.