Hi,
I display temperature, humidity ... but I want to display the battery level too.
i use launchpad CC1352P1 AND LPSTK-CC1352R
any solution please
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I display temperature, humidity ... but I want to display the battery level too.
i use launchpad CC1352P1 AND LPSTK-CC1352R
any solution please
You can use BATMON to read out the supply voltage: https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_6_10_00_29/docs/driverlib_cc13xx_cc26xx/cc13x2_cc26x2/driverlib/group__aonbatmon__api.html
Hi,
Are you asking how to perform the battery monitor measurement
or
How to include the measurement data in the sensor data message sent to the collector, and display it on the collector side?
Regards,
Nikolaj
Hi,
You can take a look at the "TI 15.4-Stack - Adding a New Sensor" SimpleLink Academy Lab: https://dev.ti.com/tirex/explore/node?node=AJI2cgJTW.RrkK.or6kYmA__BSEc4rl__LATEST
Regards,
Nikolaj
Hi,
We provide an extensive set of examples, that showcases how code can be structured and also SimpleLink Academy labs that act as tutorials for how to interact with the different technologies we offer. Unfortunately the support we provide on this forum does not include creating or organizing your project. The expectation is that you create the project and we can help with specific questions.
I suggest you to go through some SimpleLink Academy labs, and examples in the SDK to get a better understanding of how our examples are organized. We have the TI Drivers Project Zero SimpleLink Academy lab, that might be helpful.
Regards,
Nikolaj
I'm trying to follow the example of "adding a new sensor" to send the battery level data to the collector and display it on a terminal emulator.
my questions:
-1 what is the difference between the two functions: AONBatMonEnable()and AONBatMyBatteryVoltageGet().
-2 the steps to add these functions in the sensor project (I'm stuck in the ssf.c and ssf.h part of the adding a new sensor example).
Hi,
-1 what is the difference between the two functions: AONBatMonEnable()and AONBatMyBatteryVoltageGet().
AONBatMonEnable() is to be used when setting up BATMON. BATMON needs to be enabled before reading the battery voltage. BATMON is enabled at boot (please refer to section 20.1 in the Technical Reference Manual) and it is not strictly necessary to call AONBatMonEnable().
AONBatMyBatteryVoltageGet() is used to read out the current battery voltage measurement.
-2 the steps to add these functions in the sensor project (I'm stuck in the ssf.c and ssf.h part of the adding a new sensor example).
Have you successfully completed the "adding a new sensor" SimpleLink Academy Lab, without modifications for your specific application? If not I would suggest doing that first.
For your specific application, I would probably add a function similar to Ssf_readTempSensor() (for example called Ssf_readBatSensor()) where you call AONBatMyBatteryVoltageGet(), similar to how Ssf_readTempSensor() is calling AONBatMonTemperatureGetDegC()
I would then call Ssf_readBatSensor() in the readSensors() function (in sensor.c) similar to what is being done for the temperature sensor.
You do not need to do the changes to Ssf_processEvents (incrementing generic_sensor_val)
Also please be aware that the value returned by AONBatMonBatteryVoltageGet() is in a <int.frac> format size <3.8> in units of volt. So whenever printing this value to a display/UART, it needs to be handled correctly.
Regards,
Nikolaj
in part 4 of smsgs.h "">dev.ti.com/.../node
is there a specific mask bit for the battery level or is it similar to the temperature?
I tried to look for the bit masks of the sensors already existing in the collector example in the technical documentation to understand and do the same thing for the battery level but I can't find the information
You need to define your own bit for the battery level, similar to how the lab defines its own bit for the generic sensor. It is not important which bit it is, as long as it is not used for something else and that the sensor and collector is setup to use the same bit.
Hi,
You can take a look at this application note that describes how the battery voltage can be used to estimate the battery state of charge: https://www.ti.com/lit/an/sluaaa1/sluaaa1.pdf
The battery monitor can be used to measure the voltage, which can be used to estimate the battery state of charge. This is specific to the type of battery (and model) you are using. Your battery datasheet might have a graph or data similar to Figure 3-1 in the application note, which you might be able to use instead of doing your own measurements.
If you need better accuracy, you could use a "battery fuel gauge" (refer to https://www.ti.com/power-management/battery-management/fuel-gauges/overview.html for an overview of TI battery fuel gauges)
Regards,
Nikolaj