Hi, is their ID's for detecting the voltage current and battery temperature?
Hi, is their ID's for detecting the voltage current and battery temperature?
Hello,
you can run the PMIC samples on the Thingy91:X if you want.
Well, at least the npm1300_fuel_gauge sample. As far as I understand the Thingy91:x doesn't have a button connected to the nPM1300 PMIC, so the one_button sample would not register the button presses. I will use the npm1300_fuel_gauge sample in the info below.
In NCS, the nPM1300 EK is described as a "Shield" type board. The nPM1300 samples use this shield in order to map the PMIC functions and GPIO assignments into the sample. Thingy91:x has its own hardware board files, which includes the nPM1300.
The "Shield" type boards expects there to be an i2c labelled "arduino_i2c". The Thingy91:x does not have this label. In order to get the npm1300_gauge_sample working you need to create a new file in the following path:
`ncs/nrf/samples/pmic/native/npm1300_fuel_gauge/boards/extensions/thingy91x/thingy91x_nrf9151_ns.overlay`
With this file present, you can compile the npm1300_fuel_gauge sample for thingy91x:
`$ west build -b thingy91x/nrf9151/ns --pristine`
You can also use the nPM1300 from any other sample you have built for the Thingy91:x. Looking at the thingy91x board files, the I2C and nPM1300 devices are enabled by default. In your application you just have to make sure the appropriate kconfig options are set in your prj,conf file. Look at the npm1300_fuel_gauge sample as a reference.
Best regards,
Audun
Hi Audun,
Thanks, it's working now! However, I have a question regarding the current—how does it work? Is it related to the current measurement module included in the kit?
Thank
Ellan
Hi Ellan,
great, glad to hear it's working!
The nPM1300 ADC can measure battery current (in addition to battery voltage etc.). This measurement is used along with battery voltage and battery temperature as inputs to the fuel gauge library.
The accuracy of the nPM1300 battery current measurement is not sufficient to properly profile system performance, but it is good enough for battery fuel gauge functionality.
Note that the nPM1300 current measurement only measures battery current. If you connect USB, this measurement will show 0, as current is pulled from USB instead of the battery.
The current measurement module along with an external power meter or ampere meter would give you access to measure the various power domains regardless of power source
Best regards,
Audun
Thanks
Thanks