工具/软件:Code Composer Studio
早上好、
我们使用 RF430FRL152记录压力数据。 我们的目标是使用 AA 碱性电池(1.5V)为其供电、并结合升压(LTC3526)以确保恒定1.5V 输入。
传感器和外部存储器通过倍压器(VDD2X)供电
问题1:
- 您是否有倍压器(VDD2X)的效率图? 这将有助于估算电路的总功耗。
我们的目标是通过 ADC 端口测量电池电量。 电池为 AA 碱性电池(1.5V)、这意味着(在 ADC 的最大范围为0.9V 的情况下)使用分压器。
想法是使用 I/O 的内部下拉 这也将节省我们添加一个 MOSFET、因为我们可以通过将引脚设置为"输入"或"具有下拉的输入"来打开和关闭电路。
---------------------------+AA Battery
|
|
R 35k (= to internal R_pulldown)
|
Px pin ------|
|
R_pulldown = 35k
|
|
----------------------------GND
According to /slau506.pdf chapter 6.3.4 we can easily do this by changing PxREN.x from 0 to 1 (with PxDIR & PxOUT set to 0)
#pragma RETAIN (DigitalSensorInit)
#pragma CODE_SECTION (DigitalSensorInit, ".fram_driver_code")
void DigitalSensorInit()
{
P1DIR &= ~BIT0;
P1REN |= BIT0;
P1OUT &= ~BIT0;
P1SEL1 &= ~BIT0;
P1SEL0 &= ~BIT0;
return;
}
We tried to run this code on the evaluation board (rf430frl152hevm.However, the measured resistance between the P1.0 and GND stays at infinite, which indicates that the pulldown is not activated.
Questions2:
- do ADC pins also have internal pulldown resistors? If yes we can do everything on that pin, otherwise we will have to use another pin and connect it to the ADC pin.
- is there something wrong in the code?
At the same time we are trying out the ADC measurement of a voltage generated by a power supply, through the evaluation board (rf430frl152hevm) and it's GUI (with TRF7970).
The setup is:
- V_powersupply = 0.46V
- pin = ADC 1/2
- gain = 2
- virtual ground
- measure = 1300h
- value = 0.13V using the formula from slau603b.pdf chapter 2.8.1 for conversion
This value is quite far off the correct value
Questions3:
- did we use the right formula?
- anything else we could have done wrong?
- do we have to subtract virtual ground from the measured value, or is the shown value already corrected?
Thank you very much!
Best
Tobi