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

From Flowcode Help
Jump to navigationJump to search
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

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


Initialise

Fc9-comp-macro.png 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 
Fc9-u8-icon.png - BYTE Return


ReadStateOfCharge

Fc9-comp-macro.png ReadStateOfCharge
Reads the SOC and returns as a floating point value in % between 0 and 100 
Fc9-f32-icon.png - FLOAT Return


ReadStateOfChargeByte

Fc9-comp-macro.png ReadStateOfChargeByte
Reads the SOC and returns as a byte value in % between 0 and 100 
Fc9-u8-icon.png - BYTE Return


ReadVoltage

Fc9-comp-macro.png ReadVoltage
Reads the voltage and returns as a floating point value in Volts. 
Fc9-f32-icon.png - FLOAT Return


SetPowerMode

Fc9-comp-macro.png SetPowerMode
Allows the device to be put to sleep and woken from sleep. 
Fc9-bool-icon.png - BOOL Mode
0=Awake, 1=Sleep 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Settings
Fc9-type-16-icon.png Cell Count
Set the chip type used to determine if you have 1S or 2S cells connected. 
Fc9-type-15-icon.png Voltage Per Bit
 
Fc9-type-16-icon.png 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. 
Fc9-type-21-icon.png Config Value
Specific to the lithium charcteristics of the cell. 0x97 is the default value. 
Fc9-conn-icon.png I2C Settings
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-16-icon.png SDA Remap Pin
 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png SCL Remap Pin
 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Sim Comms
 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-16-icon.png 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