EasyManua.ls Logo

Bouffalo Lab BL702 - Page 98

Default Icon
375 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BL702/704/706 Reference Manual
4.3.9 VBAT measurement
The VBAT/2 measurement is the voltage of the chip VDD33, not the voltage of an external battery such as a lithium
battery. If you need to measure the voltage of a power supply head such as a lithium battery, you can divide the
voltage and then input it to the ADC’s GPIO analog channel. Measuring the voltage of VDD33 can reduce the use of
GPIO.
The VBAT/2 voltage measured by the ADC module is after a partial pressure.The actual input voltage to the ADC
module is half of VDD33, that is, VBAT/2 = VDD33/2. Because the voltage is divided, in order to obtain higher
accuracy, it is recommended that the reference voltage of the ADC is 2V, single-ended mode is used, the positive
input voltage is VBAT/2, the negative input voltage is GND, and vbaten is set to 1 to start.
After conversion, multiply the corresponding conversion result by 2 to get the VDD33 voltage.
4.3.10 TSEN measurement
The ADC can measure the internal diode or external diode voltage value, and the voltage difference between the diode
and temperature is related, so by measuring the voltage of the diode, the ambient temperature can be calculated. We
call it Temperature Sensor, referred to as TSEN.
The test principle of TSEN is to generate a fitted curve by measuring the voltage difference V generated by two
different currents on a diode with temperature.
Regardless of the measurement of the external or internal diode, the final output value is related to temperature, which
can be expressed as (ADC_out) = 7.753T + X. When we know the voltage value, we also know the temperature T.
Here X is an offset value that can be used as a standard value. Before actual use, we need to determine X. The chip
manufacturer will measure (ADC_out) at a standard temperature, such as 25 degrees at room temperature, before
the chip leaves the factory to get X.
When the user uses it, as long as the formula T = [(ADC_out) -X]/7.753, the temperature T can be obtained.
When using TSEN, it is recommended to set the ADC to 16Bits mode, reduce the error by multiple sampling, and
select 2V as the reference voltage to improve accuracy. Set tsen to 1 to enable the TSEN function. If the internal
diode is selected, tsxten = 0. External diode, tsxten = 1, select the forward input channel according to the actual
situation.
If it is an internal diode, select the TSEN channel. If it is external, select the corresponding analog GPIO channel.
Select the negative input terminal as GND. After the above settings are completed, set tsdc = 0 to start the measure-
ment and get the measurement result V0, then set tsdc = 1 to start the measurement and get the measurement re-
sult V1, (ADC_out) = V1-V0, according to the formula T = [(ADC_out) -X] /7.753 to obtain the temperature T.
BL702/704/706 Reference Manual 98/ 375
@2021 Bouffalo Lab
guest@bouffalolab

Table of Contents