Jump to content

Component: Battery Cell Fuel Gauge (MAX1704x) (Electrical)

From Flowcode Help
Revision as of 14:35, 13 July 2026 by SteveT (talk | contribs) (Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"")
Author Matrix TSL
Version 1.0
Category Electrical


Battery Cell Fuel Gauge (MAX1704x) component

Provides accurate voltage and state of charge readings for one or two lithium ion cells. Based on the MAX1704x device range including: MAX17043 MAX17044 MAX17048 MAX17049

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

ClearAlert

ClearAlert
Clears the alert status bit, if the voltage is still below the specified threshold level then the alert interrupt pin will fire again. 
- VOID Return


Initialise

Initialise
Configures the I2C bus ready for communications and applies the settings defined in the properties. Also sets the default power level to awake. Returns 1 if the module is detected 0 if the module is not found 
- BYTE Return


ReadStateOfCharge

ReadStateOfCharge
Reads the SOC and returns as a floating point value in % between 0 and 100 
- FLOAT Return


ReadStateOfChargeByte

ReadStateOfChargeByte
Reads the SOC and returns as a byte value in % between 0 and 100 
- BYTE Return


ReadVoltage

ReadVoltage
Reads the voltage and returns as a floating point value in Volts. 
- FLOAT Return


SetPowerMode

SetPowerMode
Allows the device to be put to sleep and woken from sleep. 
- BOOL Mode
0=Awake, 1=Sleep 
- VOID Return


Property reference

Properties
Settings
Cell Count
Set the chip type used to determine if you have 1S or 2S cells connected. 
Voltage Per Bit
 
Alert Threshold
Sets the SOC level where the Alert pin will fire which can be used to trigger an interrupt. Alert status needs to be reset using the ClearAlert component macro. 
Config Value
Specific to the lithium charcteristics of the cell. 0x97 is the default value. 
I2C Settings
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Connections
SDA
Pin used for SDA (data signal) 
SDA Remap Pin
 
SCL
Pin used for SCL (clock signal) 
SCL Remap Pin
 
Simulation
Sim Comms
 
Scope Traces
Selects if the scope traces are automatically generated or not 
Console Data
Selects if the console data is automatically generated or not 
API
 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Battery_Cell_Fuel_Gauge_MAX17043_17044.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Battery_Cell_Fuel_Gauge_MAX17043_17044.fcfx