Card.voltage V+ and voltage-sensitive settings

The API for card.voltage mentions

Provides the current V+ voltage level on the Notecard, and provides information about historical voltage trends. When used with the mode argument, configures voltage thresholds based on how the device is powered.

But there is no V+ pin on Notecard. After some hunting, I saw V+ is on Notecarrier F which is routed, together with VBAT and VUSB to VMAIN and then to VMODEM_P, so it looks like VMODEM_P voltage is what is driving the voltage-sensing.

The voltage-variable modes have a usb setting (like usb:4.6 for lipo mode). Does the state of the VUSB pin (3.3-5v) play a part in setting the usb voltage category independently of the voltage on VMODEM_P?

Hi @devElert,

You’re right, that doc needs to be updated to state that card.voltage returns the current VMODEM_P voltage level on the Notecard. Thanks for pointing that out!

Regarding your other question, if a physical USB connection is detected (via the VUSB pin), the mode is automatically set to usb, regardless of the VMODEM_P voltage. For example:

VUSB Pin VMODEM_P Voltage Resulting Mode
Detected Any usb (forced)
Not detected ≥4.6V usb (via voltage threshold)
Not detected 4.0-4.6V high
Not detected 3.5-4.0V normal
etc…
2 Likes

Thanks for laying that out clearly!