• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/04-Jan-2025-4127

CMakeLists.txtD04-Jan-2025225 96

README.rstD04-Jan-20251.8 KiB6143

app.overlayD04-Jan-2025407 2320

prj.confD04-Jan-202571 54

sample.yamlD04-Jan-2025368 1615

README.rst

1.. zephyr:code-sample:: max17262
2   :name: MAX17262 Fuel Gauge Sensor
3   :relevant-api: sensor_interface
4
5   Get voltage, current and temperature data from a MAX17262 sensor (polling mode).
6
7Overview
8********
9
10This sample application periodically reads voltage, current and temperature
11data from the MAX17262 device that implements SENSOR_CHAN_GAUGE_VOLTAGE,
12SENSOR_CHAN_GAUGE_AVG_CURRENT, and SENSOR_CHAN_GAUGE_TEMP.
13
14Requirements
15************
16
17The MAX17262 is an ultra-low power fuel-gauge IC which implements the Maxim
18ModelGauge m5 algorithm. The IC monitors a single-cell battery pack and
19supports internal current sensing for up to 3.1A pulse current. The IC
20provides best performance for batteries with 100mAhr to 6Ahr capacity.
21
22This sample requires a board which provides a configuration for Arduino
23connectors and defines node aliases for the I2C interface.
24For more info about the node structure see
25:zephyr_file:`samples/sensor/max17262/app.overlay`
26
27Building and Running
28********************
29
30This sample application uses an MAX17262 sensor connected to a board via I2C.
31Connect the sensor pins according to the connection diagram given in the
32`max17262 datasheet`_.
33
34.. zephyr-app-commands::
35   :zephyr-app: samples/sensor/max17262
36   :board: nrf52840dk/nrf52840
37   :goals: build flash
38   :compact:
39
40Sample Output
41=============
42To check output of this sample , any serial console program can be used.
43This example uses ``picocom`` on the serial port ``/dev/ttyUSB0``:
44
45.. code-block:: console
46
47        $ sudo picocom -D /dev/ttyUSB0
48
49.. code-block:: console
50
51        V: 3.626406 V; I: -3.437500 mA; T: 28.011718 °C
52        V: 3.626406 V; I: -3.437500 mA; T: 28.011718 °C
53        V: 3.626406 V; I: -3.437500 mA; T: 28.011718 °C
54
55References
56**********
57
58.. target-notes::
59
60.. _max17262 datasheet: https://datasheets.maximintegrated.com/en/ds/MAX17262.pdf
61