# Confused about power monitoring with a notecard design

**URL:** <https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051>\
**Category:** Hardware\
**Created:** [October 28, 2022, 2:02pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051 "2022-10-28T14:02:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ril3y](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/ril3y/32/589_2.png) [@ril3y](https://discuss.blues.com/u/ril3y)\
**Post date:** [October 28, 2022, 2:02pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/1 "2022-10-28T14:02:29Z")

</div>

I am building a system that the host CPU (esp32 s3) will be sleeping most of the time. The host + notecard will be powered by a small lipo battery during these times. The notecard will be sleeping/waking at intervals or possible gpio interrupts. I read this in the documentation.

> When designing a system that utilizes the Notecard, its a good idea to vary Notehub connection intervals based on the energy available to the system as monitored through a host’s use of a fuel gauge or Power management integrated circuit (PMIC).

What I am trying to understand is how to do this? If I put the host to sleep then it cannot monitor a lipo battery voltage. Perhaps I am misunderstanding this completely. Does anyone have an example of hardware/software of this in use?

---

<div class="post-metadata">

**Author:** ![Karl\_iWell](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Karl\_iWell](https://discuss.blues.com/u/Karl_iWell)\
**Post date:** [October 28, 2022, 2:59pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/2 "2022-10-28T14:59:55Z")

</div>

Someone from Blues may give a better reply, but I think that applies when using the Notecard “periodic” synchronization mode. You could check battery levels on wake and adjust the outbound and inbound synchronization times.

I use a different approach and set the synchronization mode to minimum in hub.set, this means the Notecard will only synchronize when a hub.sync command is issued, but in my application I only want to synchronize with the Notehub under control from my mcu.

Hope that helps,  
Karl

---

<div class="post-metadata">

**Author:** ![zfields](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/zfields/32/29_2.png) [@zfields](https://discuss.blues.com/u/zfields)\
**Post date:** [October 28, 2022, 3:13pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/3 "2022-10-28T15:13:25Z")

</div>

Hello @ril3y,

We happen to have some smarts built into the Notecard all by itself. When you issue the [`hub.set`](https://dev.blues.io/reference/notecard-api/hub-requests/#hub-set) command, you can specify `vinbound` and `voutbound` parameters. These are the voltage aware variants of the `inbound` and `outbound` parameters, respectively.

The topic is covered extensively in the [Modem Power Management section of the Low Power Design Guide](https://dev.blues.io/notecard/notecard-walkthrough/low-power-design/#modem-power-management).

Generally speaking, the form looks similar to the following…

```json
{
 "req": "hub.set",
 "mode": "periodic",
 "voutbound": "usb:30;high:60;normal:90;low:120;dead:0",
 "vinbound": "usb:60;high:120;normal:240;low:480;dead:0"
}

```

…, where you can specify the syncing interval based on the battery level.

---

<div class="post-metadata">

**Author:** ![ril3y](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/ril3y/32/589_2.png) [@ril3y](https://discuss.blues.com/u/ril3y)\
**Post date:** [October 28, 2022, 3:48pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/4 "2022-10-28T15:48:26Z")

</div>

Hey Z I did read that. Perhaps I am asking something so obvious no one understands it 🙂  
Does the notecard read the voltage coming into the card directly. (VMODEM\_P) Meaning there is not a need to sync voltage levels from a reading from the host mcu?

Thanks

---

<div class="post-metadata">

**Author:** ![zfields](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/zfields/32/29_2.png) [@zfields](https://discuss.blues.com/u/zfields)\
**Post date:** [October 28, 2022, 3:55pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/5 "2022-10-28T15:55:44Z")

</div>

Ahh…

Yes, the Notecard will read voltage levels and attach them to each `_session.qo` Note.

Meaning that each time a Notecard establishes a new session (every connection in `periodic` mode), it will report `voltage` to Notehub in the JSON payload.

~Z

---

<div class="post-metadata">

**Author:** ![ril3y](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/ril3y/32/589_2.png) [@ril3y](https://discuss.blues.com/u/ril3y)\
**Post date:** [October 28, 2022, 5:23pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/6 "2022-10-28T17:23:09Z")

</div>

Specifically, which pins does the notecard read the voltage from? VMODEM or VIN?

---

<div class="post-metadata">

**Author:** ![zfields](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/zfields/32/29_2.png) [@zfields](https://discuss.blues.com/u/zfields)\
**Post date:** [October 28, 2022, 6:36pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/7 "2022-10-28T18:36:45Z")

</div>

Hi @ril3y,

You were correct with `VMODEM`.

`VIN` should be connected to a regulated `3v3` or `1v8`, whereas `VMODEM` is supposed to be connected directly to the battery (or, better yet, the diode protecting that battery).

~Zak

---

<div class="post-metadata">

**Author:** ![ouaibeer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/ouaibeer/32/418_2.png) [@ouaibeer](https://discuss.blues.com/u/ouaibeer)\
**Post date:** [November 2, 2022, 2:42pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/8 "2022-11-02T14:42:32Z")

</div>

Hi,

I have built 3 dataloggers with the notecard. My datalogger is composed of a TinyPico ESP32 and the notecard model with the Sparkfun notecarrier. An RTC (DS3231) measures precisely the elapsed time and makes an interrupt to wake and sleep ESP. Internal RTC is not precise and I cannot use wifi signal to read the time. A mini SD card module allows to record and store the data.  
My ESP32 records data with a defined time step (30 sec, 60 sec or 1800 sec or others). The notecard turns on every X measurements and sends all data to notehub and then to iotplotter. As the ESP32 records the battery voltage, I can see the evolution of my battery voltage when the data arrives on iotplotter, that is to say every 3h. This system consumes about 0.2 mA in sleep and can therefore last a long time with a timestep of 1800 sec. In my assembly, the notecard is only used to send the data but not for monitoring. I don’t If you want to do something like that.  
Best regards,  
Eric

---

<div class="post-metadata">

**Author:** ![ril3y](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/ril3y/32/589_2.png) [@ril3y](https://discuss.blues.com/u/ril3y)\
**Post date:** [November 3, 2022, 5:11pm UTC](https://discuss.blues.com/t/confused-about-power-monitoring-with-a-notecard-design/1051/9 "2022-11-03T17:11:28Z")

</div>

What I am actually doing is having the notecard be the connection for my custom golf cart. GPS data etc. However, one of the big features for me is the ability to put the host mcu to sleep and keep the notecard alive. I am thinking about having the ability to turn on the cart via the notecard’s data connection using the attn pin. Say from a iphone application or something. I have a lipo built into my design which will keep the cell connection open. I also have a 280Ah 48v battery I can turn on to charge up the lipo when the notecard drains it down.
