Loading...
Searching...
No Matches
ina2xx_params.h File Reference

Default configuration for INA2xx power/current monitors. More...

Detailed Description

Default configuration for INA2xx power/current monitors.

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file ina2xx_params.h.

#include "board.h"
#include "ina2xx.h"
#include "saul_reg.h"
+ Include dependency graph for ina2xx_params.h:

Go to the source code of this file.

Variables

static const ina2xx_params_t ina2xx_params []
 Configure INA2XX devices.
 
static const saul_reg_info_t ina2xx_saul_info []
 Allocate and configure entries to the SAUL registry.
 

Set default configuration parameters for the INA2XX

#define INA2XX_PARAM_I2C   (I2C_DEV(0))
 Default to first I2C device.
 
#define INA2XX_PARAM_ADDR   (0x40)
 Default to address 0x40, which is active if A0 and A1 are connected to GND.
 
#define INA2XX_PARAM_CONFIG
 Default to an optimal configuration for current/power measurements of USB high-power devices using the popular INA219 break out board with 128 samples averaged.
 
#define INA2XX_PARAM_RSHUNT_MOHM   (100)
 Default to 100 mΩ as shunt resistor.
 
#define INA2XX_PARAM_I_RANGE   (INA2XX_CURRENT_RANGE_655_MA)
 Default to a current range of ±655.36mA.
 
#define INA2XX_PARAMS
 

Set default SAUL info for the INA2XX

#define INA2XX_SAULINFO
 

Macro Definition Documentation

◆ INA2XX_PARAM_ADDR

#define INA2XX_PARAM_ADDR   (0x40)

Default to address 0x40, which is active if A0 and A1 are connected to GND.

On the popular INA219 breakout board this is the default address if solder jumpers remain open.

Definition at line 48 of file ina2xx_params.h.

◆ INA2XX_PARAM_CONFIG

#define INA2XX_PARAM_CONFIG
Value:
@ INA2XX_SHUNT_RANGE_80MV
+/- 80 mV range
Definition ina2xx.h:141
@ INA2XX_MODE_CONTINUOUS_SHUNT_BUS
Shunt and Bus, Continuous, default.
Definition ina2xx.h:69
@ INA2XX_SADC_AVG_128_SAMPLES
128 sample average, 68.10 ms conversion time
Definition ina2xx.h:101
@ INA2XX_BUS_RANGE_16V
16 V bus voltage full scale range
Definition ina2xx.h:150
@ INA2XX_BADC_AVG_128_SAMPLES
128 sample average, 68.10 ms conversion time
Definition ina2xx.h:133

Default to an optimal configuration for current/power measurements of USB high-power devices using the popular INA219 break out board with 128 samples averaged.

Setting Value
Mode Continuous shunt and bus voltage measurements
Shunt ADC Setting 128 Samples, 68.10 ms per conversion
Bus ADC Setting 128 Samples, 68.10 ms per conversion
Shunt Voltage Range ±80mV
Bus Voltage Range 16V

Definition at line 64 of file ina2xx_params.h.

◆ INA2XX_PARAM_I2C

#define INA2XX_PARAM_I2C   (I2C_DEV(0))

Default to first I2C device.

Definition at line 38 of file ina2xx_params.h.

◆ INA2XX_PARAM_I_RANGE

#define INA2XX_PARAM_I_RANGE   (INA2XX_CURRENT_RANGE_655_MA)

Default to a current range of ±655.36mA.

This is the highest resolution suitable to measure USB high-power devices (up to 500 mA).

Definition at line 85 of file ina2xx_params.h.

◆ INA2XX_PARAM_RSHUNT_MOHM

#define INA2XX_PARAM_RSHUNT_MOHM   (100)

Default to 100 mΩ as shunt resistor.

This is the value used in the popular INA219 breakout board.

Definition at line 76 of file ina2xx_params.h.

◆ INA2XX_PARAMS

#define INA2XX_PARAMS
Value:
{ .i2c = INA2XX_PARAM_I2C, \
.addr = INA2XX_PARAM_ADDR, \
.config = INA2XX_PARAM_CONFIG, \
.rshunt_mohm = INA2XX_PARAM_RSHUNT_MOHM, \
.i_range = INA2XX_PARAM_I_RANGE }
#define INA2XX_PARAM_CONFIG
Default to an optimal configuration for current/power measurements of USB high-power devices using th...
#define INA2XX_PARAM_I2C
Default to first I2C device.
#define INA2XX_PARAM_I_RANGE
Default to a current range of ±655.36mA.
#define INA2XX_PARAM_ADDR
Default to address 0x40, which is active if A0 and A1 are connected to GND.
#define INA2XX_PARAM_RSHUNT_MOHM
Default to 100 mΩ as shunt resistor.

Definition at line 88 of file ina2xx_params.h.

◆ INA2XX_SAULINFO

#define INA2XX_SAULINFO
Value:
{ .name = "INA2XX current" }, \
{ .name = "INA2XX power" }, \
{ .name = "INA2XX voltage" }

Definition at line 101 of file ina2xx_params.h.

Variable Documentation

◆ ina2xx_params

const ina2xx_params_t ina2xx_params[]
static
Initial value:
=
{
INA2XX_PARAMS
}

Configure INA2XX devices.

Definition at line 110 of file ina2xx_params.h.

◆ ina2xx_saul_info

const saul_reg_info_t ina2xx_saul_info[]
static
Initial value:
=
{
INA2XX_SAULINFO
}

Allocate and configure entries to the SAUL registry.

Definition at line 118 of file ina2xx_params.h.