Help Shape What We Build Next: Take the 2026 Blues Developer Survey

Blues Developers
What’s New
Resources
API Reference
Notecard and Notehub API documentation
Blog
Technical articles for developers
Connected Product Guidebook
In-depth guides for connected product development
Developer Certification
Get certified on wireless connectivity with Blues
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Webinars
Listing of Blues technical webinars
Blues.comNotehub
Shop
Docs
Help
Support DocsNotehub StatusSecurity AdvisoriesVisit our Forum
Sign In
Docs Home
What’s New
Resources
API Reference
Notecard and Notehub API documentation
Blog
Technical articles for developers
Connected Product Guidebook
In-depth guides for connected product development
Developer Certification
Get certified on wireless connectivity with Blues
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Webinars
Listing of Blues technical webinars
Blues.comNotehub
Shop
Docs
Notecard
Notecard API Reference
Notecard Guides
Notecard Firmware Releases
Notecard Product Family
Notecard Walkthrough
Overview
Notecard Requests & Responses
JSON Fundamentals
Notecard Interfaces
Essential Requests
Time & Location Requests
Inbound Requests & Shared Data
Web Transactions
Low-Power Firmware Design
Modem Power ManagementHost Power ManagementVoltage MonitoringMotion MonitoringCustomizing Voltage-Variable BehaviorsAchieving the Lowest Possible Power StatePower Usage EstimatesDeep Sleep Mode on Notecard WiFi v2
Low Bandwidth Design
Working with the Notecard AUX Pins
Updating Notecard Firmware
Advanced Notecard Configuration
homechevron_rightDocschevron_rightNotecardchevron_rightNotecard Walkthroughchevron_rightLow-Power Firmware Design

Low-Power Firmware Design

The Notecard is designed to be battery operated, with low current consumption, making it an ideal choice for low power applications. Because of its low power design, in many applications a host processor and its peripherals will be larger contributors to power drain.

To help designers and developers build low power applications, Notecard provides several tools, each covered in the sections below:

  • A power management technique that allows firmware developers to regulate modem activity on the Notecard as a function of available energy.
  • A design technique that allows the Notecard to shut the host processor down completely, for dramatic power savings.
  • On-board voltage and motion monitoring, so that sync intervals and GPS sampling can respond automatically to available energy and to whether the device is actually moving.
  • Voltage-variable arguments, which let you map battery voltages to states and then express intervals in terms of those states rather than hard-coding them.
note

As a low-power device (e.g. the Notecard Cellular consumes only ~8µA@5V when idle), the Notecard was built to be continuously powered. This is important to know because certain features of the Notecard require the current time, which is established upon the Notecard successfully connecting to Notehub upon startup.

Consult the Low-Power Hardware Design Application Note for more details on how to design a low-power system that uses the Notecard for wireless communications.

Modem Power Management

In battery-operated systems, and in particular those using energy harvesting approaches like solar power, the energy available to a processor and its peripherals rises and falls, sometimes between extreme levels. Notecard consumes very little power in its idle state, and when staging data with note.add requests, but uses a nontrivial amount of energy when the modem is on and transmitting to and receiving data from a network.

note

Notecard will never go into low power (~8µA@5V) mode if VUSB is present (M.2 pin 13), or if AUX_EN_P (pin 56) is pulled up to VIO.

When designing a system that utilizes the Notecard, it's 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). Using the information available to the host, you can use hub.set to configure the Notecard's connection mode, as well as voltage-variable settings for inbound and outbound data synchronization.

For example, when ample energy is available in the system, you may prefer to sync outbound Notes each hour and process inbound data every two hours.

{
  "req": "hub.set",
  "mode": "periodic",
  "outbound": 60,
  "inbound": 120
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "periodic");
JAddNumberToObject(req, "outbound", 60);
JAddNumberToObject(req, "inbound", 120);

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "periodic"
req["outbound"] = 60
req["inbound"] = 120

card.Transaction(req)

In a hub.set request, the outbound is the maximum latency between changes made at the Notecard (Notes or environment variables), and when the Notecard attempts to sync changes to Notehub. inbound is the maximum latency between syncs with the Notehub to check for changes to Notefiles and environment variables that need to propagate to the Notecard.

note

When using periodic or continuous mode, both outbound and inbound are required. If either is omitted, the Notecard behaves as if it is in minimum mode for that sync direction (syncing only when explicitly triggered with hub.sync).

If, as the product is running, the host detects that available energy is low, a subsequent hub.set request can be issued to adjust the inbound and outbound sync intervals accordingly. For instance, the following request instructs the Notecard to sync outbound Notes every eight hours, and process inbound data once per day.

{
  "req": "hub.set",
  "mode": "periodic",
  "outbound": 480,
  "inbound": 1440
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "periodic");
JAddNumberToObject(req, "outbound", 480);
JAddNumberToObject(req, "inbound", 1440);

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "periodic"
req["outbound"] = 480
req["inbound"] = 1440

card.Transaction(req)

In extreme cases, available power may be so low that you need to instruct the Notecard to keep the modem off completely until instructed otherwise. To do this, use the off mode.

{
  "req": "hub.set",
  "mode": "off"
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "off");

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "off"

card.Transaction(req)

Voltage-Variable Sync Behavior

Each of the examples above requires the host to track power levels and manually intervene to instruct the Notecard to modify its sync behaviors. Alternatively, the Notecard can automatically adjust its sync behavior with voltage-variable arguments in a hub.set request. Instead of using outbound and inbound to specify sync intervals, you can use voutbound and vinbound.

warning

Setting voltage-variable values is not supported on Notecard for LoRa or Notecard XP.

Both arguments expect semicolon-delimited string values with intervals that correspond to a battery state. The pre-defined Notecard battery states are:

  • usb
  • high
  • normal
  • low
  • dead

When the Notecard's power source is in a given state, it will adjust the period based on the values defined in the voutbound and vinbound strings.

Using a 0 value for any state disables that timer as a trigger for sync activity.

For instance, if you wanted to sync outbound every 30 minutes and inbound every hour when the battery is at full strength, and throttle back as available power decreases, send a request like this:

{
  "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"
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "periodic");
JAddStringToObject(req, "voutbound", "usb:30;high:60;normal:90;low:120;dead:0");
JAddStringToObject(req, "vinbound", "usb:60;high:120;normal:240;low:480;dead:0");

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "periodic"
req["voutbound"] = "usb:30;high:60;normal:90;low:120;dead:0"
req["vinbound"] = "usb:60;high:120;normal:240;low:480;dead:0"

card.Transaction(req)

Likewise, you can use a shorter syntax to express "if USB-powered, sync every 30 minutes, otherwise sync every 60 minutes" with "usb:30;60".

note

To clear a voltage-variable value and revert to the standard outbound/inbound behavior, pass "-" as the value for voutbound or vinbound.

{
  "req": "hub.set",
  "voutbound": "-",
  "outbound": 60
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "voutbound", "-");
JAddNumberToObject(req, "outbound", 60);

NoteRequest(req);
req = {"req": "hub.set"}
req["voutbound"] = "-"
req["outbound"] = 60

card.Transaction(req)

You can confirm these settings with the response from a hub.get request:

{
 "voutbound": "usb:30;high:60;normal:90;low:120;dead:0",
 "vinbound": "usb:60;high:120;normal:240;low:480;dead:0",
 "mode": "periodic",
 "host": "a.notefile.net",
 "product": "com.your-company.your-name:your_product",
 "device": "dev:0000000000000"
}

USB/Line Power Variable Sync Behavior

When in development, you may want to maintain a continuous connection to Notehub when your device is USB/line-powered, but return to periodic, minimum, or off sync modes when USB/line power is disconnected. This capability is available as of the LTS 4.1.1 Notecard firmware release.

Fallback to Periodic Mode

The uperiodic argument in a hub.set request configures the Notecard to use periodic mode when USB/line power is disconnected.

In the following example, when the Notecard has USB/line power it operates in continuous mode, with inbound Notefiles synced immediately and outbound Notefiles synced every minute. If USB/line power is disconnected, the Notecard changes to periodic mode and syncs both outbound and inbound data every hour.

{
  "req": "hub.set",
  "mode": "continuous",
  "sync": true,
  "voutbound": "usb:1;60",
  "vinbound": "usb:0;60",
  "uperiodic": true
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "continuous");
JAddBoolToObject(req, "sync", true);
JAddStringToObject(req, "voutbound", "usb:1;60");
JAddStringToObject(req, "vinbound", "usb:0;60");
JAddBoolToObject(req, "uperiodic", true);

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "continuous"
req["sync"] = True
req["voutbound"] = "usb:1;60"
req["vinbound"] = "usb:0;60"
req["uperiodic"] = True

card.Transaction(req)

Fallback to Minimum or Off Modes

Likewise, you can fall back to minimum mode or off mode when USB/line power is disconnected with the umin or uoff arguments, respectively.

To fall back to minimum mode:

{
  "req": "hub.set",
  "mode": "continuous",
  "sync": true,
  "voutbound": "usb:1;60",
  "umin": true
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "continuous");
JAddBoolToObject(req, "sync", true);
JAddStringToObject(req, "voutbound", "usb:1;60");
JAddBoolToObject(req, "umin", true);

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "continuous"
req["sync"] = True
req["voutbound"] = "usb:1;60"
req["umin"] = True

card.Transaction(req)

To fall back to off mode (modem completely disabled when unplugged):

{
  "req": "hub.set",
  "mode": "continuous",
  "sync": true,
  "voutbound": "usb:1;60",
  "uoff": true
}
J *req = NoteNewRequest("hub.set");
JAddStringToObject(req, "mode", "continuous");
JAddBoolToObject(req, "sync", true);
JAddStringToObject(req, "voutbound", "usb:1;60");
JAddBoolToObject(req, "uoff", true);

NoteRequest(req);
req = {"req": "hub.set"}
req["mode"] = "continuous"
req["sync"] = True
req["voutbound"] = "usb:1;60"
req["uoff"] = True

card.Transaction(req)

Host Power Management

In a well-designed low-power product, the host MCU — not the Notecard — is usually the largest contributor to idle draw. The host should spend the vast majority of its time in a deep-sleep mode (STM32 STOP / STANDBY, ESP32 deep sleep, nRF52 System OFF, etc.), waking only on an RTC tick or an external interrupt.

GPIO Discipline During Sleep

Hitting low current targets on the host depends as much on what it does with its GPIOs and peripherals as on selecting the right sleep mode. Before entering sleep, the firmware must ensure that no pin or peripheral is sinking current from another rail.

The most common offender is I2C: if the host leaves SDA or SCL driven low (or enabled as push-pull outputs) before sleeping, it will drag down Notecard's pull-ups and hold the Notecard out of idle.

For peripherals that cannot be cleanly disabled in firmware (e.g. external UARTs, fixed-drive outputs, or sensors without a shutdown mode) use a level shifter and tie its OE pin to a host GPIO. Deasserting OE before sleep puts the whole bus in high-impedance, isolating the misbehaving peripheral from the Notecard's rails. See the Low-Power Hardware Design Guide for wiring recommendations.

Waking on Notecard Events with card.attn

If needed in your design, Notecard can also manage the power state of its connected host MCU using the card.attn API.

card.attn lets the host sleep until a specific Notecard event occurs, then Notecard pulls ATTN to wake it. Typical wake conditions include:

  • Motion: wake on an accelerometer-detected movement
  • Inbound data: wake when a Notefile or environment variable update arrives from Notehub
  • USB insertion: wake when line power is applied
  • Environment variable changes: wake when a Notehub-pushed variable changes
  • Timer expiry: wake after a fixed seconds interval
warning

Additional Connection Required

As with the other uses of card.attn, this feature requires an additional physical connection between the Notecard and host beyond the default I2C or Serial connection for communication. In order to leverage the host power management feature described here, the Notecard ATTN pin must be wired to an EN or regulator pin on the host.

To utilize this feature, upon each boot, the host sends a card.attn request to determine if the host is in an initial boot, or is being awakened from sleep.

First, the host configures this mode by passing sleep into the mode argument of a card.attn request, as well as a number of seconds to sleep.

{
  "req": "card.attn",
  "mode": "sleep",
  "seconds": 3600
}
J *req = NoteNewRequest("card.attn");
JAddStringToObject(req, "mode", "sleep");
JAddNumberToObject(req, "seconds", 3600);

NoteRequest(req);
req = {"req": "card.attn"}
req["mode"] = "sleep"
req["seconds"] = 3600

card.Transaction(req)

When this request is received, the Notecard pulls the ATTN pin LOW, and the host can respond by placing itself into a sleep or low power mode. After the seconds interval has elapsed, the ATTN pin is pulled HIGH. Upon restart, the host should send a no argument card.attn request. The response will include the value timeout to indicate a timeout as the reason for pulling the pin HIGH.

{
 "files": [
  "timeout"
 ],
 "set": true
}

Optional: If the host's reset line is wired and configured for Notecard-driven restarts, the Notecard also resets the host when it starts up and when it wakes the host after a card.attn sleep timeout. To disable that host RESET, use the "stop":true argument in a card.dfu request. This is particularly useful when you want the host to resume from a known state after a sleep-wake cycle rather than performing a full MCU reset.

{
  "req": "card.dfu",
  "stop": true
}
J *req = NoteNewRequest("card.dfu");
JAddBoolToObject(req, "stop", true);

NoteRequest(req);
req = {"req": "card.dfu"}
req["stop"] = True

card.Transaction(req)

If the host needs to preserve a small amount of state across a sleep-wake cycle, the Notecard can hold a Base64-encoded string on behalf of the host. Pass the data as a payload argument in the sleep mode call to card.attn.

{
  "req": "card.attn",
  "mode": "sleep",
  "seconds": 3600,
  "payload": "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ=="
}
J *req = NoteNewRequest("card.attn");
JAddStringToObject(req, "mode", "sleep");
JAddNumberToObject(req, "seconds", 3600);
JAddStringToObject(req, "payload", "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ==");

NoteRequest(req);
req = {"req": "card.attn"}
req["mode"] = "sleep"
req["seconds"] = 3600
req["payload"] = "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ=="

card.Transaction(req)

When the host reawakens, the payload is retrieved by setting start to true in a card.attn request.

{
  "req": "card.attn",
  "start": true
}
J *req = NoteNewRequest("card.attn");
JAddBoolToObject(req, "start", true);

NoteRequest(req);
req = {"req": "card.attn"}
req["start"] = True

card.Transaction(req)

The response object also includes the UNIX Epoch time at which the payload was stored.

{
 "payload": "ewogICJpbnRlcnZhbHMiOiI2MCwxMiwxNCIKfQ==",
 "files": [
  "timeout"
 ],
 "time": 1599064794,
 "set": true
}

Voltage Monitoring

In some hardware designs, the Notecard's V+ will be connected directly to a battery. This approach is ideal for ensuring that potential current spikes during wireless transmission are served directly from the product's power source. What's more, the low standby power draw of the Notecard minimizes the potential downsides of this approach.

The Notecard exposes its V+ voltage and a built-in historical voltage analyzer through the card.voltage request.

Reading the Current Voltage

A bare card.voltage request returns the current voltage on the Notecard's V+ pin along with the Notecard's computed voltage-variable threshold bucket.

{
  "req": "card.voltage"
}
J *req = NoteNewRequest("card.voltage");

NoteRequest(req);
req = {"req": "card.voltage"}

rsp = card.Transaction(req)

The response always includes:

  • value — the current voltage, in volts.
  • mode — the current voltage-variable threshold bucket, one of high, normal, low, dead, or usb. See Customizing Voltage-Variable Behaviors for what each state represents and how the bucket is computed.

When the Notecard is connected to USB power, the response also includes "usb": true and reports mode as "usb".

{
 "usb": true,
 "mode": "usb",
 "value": 5.112190219747135
}

When the Notecard is on battery, the response instead includes minutes, the number of minutes since the Notecard was last on USB power.

{
 "mode": "normal",
 "value": 3.95,
 "minutes": 1440
}

Enabling Historical Voltage Trends

The Notecard can also track up to 720 hours (30 days) of voltage history and include statistical analysis with each card.voltage response. Historical analysis is opt-in; enable it once with "on": true.

{
  "req": "card.voltage",
  "on": true
}
J *req = NoteNewRequest("card.voltage");
JAddBoolToObject(req, "on", true);

NoteRequest(req);
req = {"req": "card.voltage"}
req["on"] = True

rsp = card.Transaction(req)

This setting persists across reboots, so it only needs to be sent once per Notecard. To turn historical analysis off later, send {"req":"card.voltage","off":true}.

note

Historical analysis requires the Notecard's clock to be set, which typically happens after the first successful sync with Notehub. Until the clock is set, card.voltage will return an error of the form {"err":"time required for history analysis {time-unavailable}"}.

Once history is enabled, subsequent card.voltage responses include these additional fields:

  • hours — the number of hours of voltage history actually used in the analysis.
  • vmin, vmax, vavg — the minimum, maximum, and average voltage during the analyzed window.
  • daily, weekly, monthly — the change in moving-average voltage over the past 24 hours, 7 days, and 30 days, when those time periods fall within the analyzed window. A negative value indicates voltage is trending downward.
{
 "mode": "normal",
 "value": 3.85,
 "hours": 720,
 "vmin": 3.2,
 "vmax": 4.1,
 "vavg": 3.75,
 "daily": -0.05,
 "weekly": -0.3,
 "monthly": -0.8,
 "minutes": 43200
}

Customizing the Analysis Window

By default, voltage trend analysis uses all available history (up to 720 hours, or 30 days). The hours argument narrows the window to a specific number of hours.

{
  "req": "card.voltage",
  "hours": 8
}
J *req = NoteNewRequest("card.voltage");
JAddNumberToObject(req, "hours", 8);

NoteRequest(req);
req = {"req": "card.voltage"}
req["hours"] = 8

rsp = card.Transaction(req)

The offset argument tells the Notecard to skip a set number of hours into the past before starting analysis. The example below analyzes the 24-hour window that ended 48 hours ago.

{
  "req": "card.voltage",
  "hours": 24,
  "offset": 48
}
J *req = NoteNewRequest("card.voltage");
JAddNumberToObject(req, "hours", 24);
JAddNumberToObject(req, "offset", 48);

NoteRequest(req);
req = {"req": "card.voltage"}
req["hours"] = 24
req["offset"] = 48

rsp = card.Transaction(req)

The vmax and vmin arguments tell the Notecard to ignore voltage measurements above or below specific levels when computing statistics.

{
  "req": "card.voltage",
  "hours": 300,
  "vmax": 4,
  "vmin": 2.2
}
J *req = NoteNewRequest("card.voltage");
JAddNumberToObject(req, "hours", 300);
JAddNumberToObject(req, "vmax", 4);
JAddNumberToObject(req, "vmin", 2.2);

NoteRequest(req);
req = {"req": "card.voltage"}
req["hours"] = 300
req["vmax"] = 4
req["vmin"] = 2.2

rsp = card.Transaction(req)

Monitoring USB Power State

The Notecard can watch for USB power connect and disconnect events and respond automatically. Enable USB monitoring with "usb": true:

{
  "req": "card.voltage",
  "usb": true,
  "alert": true,
  "sync": true
}
J *req = NoteNewRequest("card.voltage");
JAddBoolToObject(req, "usb", true);
JAddBoolToObject(req, "alert", true);
JAddBoolToObject(req, "sync", true);

NoteRequest(req);
req = {"req": "card.voltage"}
req["usb"] = True
req["alert"] = True
req["sync"] = True

rsp = card.Transaction(req)
  • usb: true — indicates that this request is configuring the USB power-state responses below.
  • alert: true — adds an entry to _health.qo whenever USB power is connected or disconnected.
  • sync: true — triggers an immediate sync to Notehub on USB connect or disconnect.
note

These settings persist across reboots.

Detecting Charge Source on Solar and Energy-Harvesting Designs

On products powered by solar panels or other harvesting sources, knowing whether the battery is currently charging is often as useful as knowing its voltage. Notecard can monitor this directly via its AUX_CHARGING pin, provided the pin is wired to the PMIC's charge-in-progress indicator.

Enable detection with a card.carrier request:

{
  "req": "card.carrier",
  "mode": "charging"
}
J *req = NoteNewRequest("card.carrier");
JAddStringToObject(req, "mode", "charging");

NoteRequest(req);
req = {"req": "card.carrier"}
req["mode"] = "charging"

card.Transaction(req)

Once set, subsequent card.carrier responses will include "charging": true whenever the PMIC is actively charging.

Temperature Monitoring

Sometimes a product will be deployed in environments where extreme temperatures may affect battery performance. In these situations, you may need to know the temperature within the electronics enclosure. The Notecard has a calibrated absolute temperature sensor that can be used to measure the temperature around the Notecard with a card.temp request.

{
  "req": "card.temp"
}
J *req = NoteNewRequest("card.temp");

NoteRequest(req);
req = {"req": "card.temp"}

rsp = card.Transaction(req)

This request returns an object with the temperature in degrees centigrade, and a calibration value. The calibration value, taken together with the temp value, means that the Notecard measured a value of 29.3125, which was adjusted to 26.3125 before being returned.

{
 "value": 26.3125,
 "calibration": -3
}

Notecard temperature readings are performed by the temperature sensor integrated into the device's onboard accelerometer. If the accelerometer is disabled with a card.motion.mode request, card.temp still returns a reading, but falls back to the temperature sensor built into the Notecard's MCU and adds "off": true to the response to indicate that the accelerometer was not the source.

{
  "value":       26.3125,
  "calibration": -3.0,
  "off":         true
}
warning

card.temp measures the temperature around the Notecard — effectively the temperature inside your electronics enclosure, which can be influenced by heat from the Notecard's own modem and nearby components. If your application needs an accurate ambient-air measurement, use a dedicated external temperature sensor with documented accuracy and response time.

Motion Monitoring

The Notecard includes a three-axis accelerometer that can be used to detect the orientation of the module or when the Notecard is in motion with a card.motion request.

note

Motion monitoring is not supported on the Notecard for LoRa.

{
  "req": "card.motion"
}
J *req = NoteNewRequest("card.motion");

NoteRequest(req);
req = {"req": "card.motion"}

rsp = card.Transaction(req)

When passed with no arguments, the Notecard responds with a count of the number of motion events since the last time the request was made, a motion field with the UNIX Epoch time of the last motion event, and an alert field if a free-fall was detected since the last call.

The response will also include the current device orientation in the status field. The orientation will be one of the following values:

  • face-up
  • face-down
  • portrait-up
  • portrait-down
  • landscape-right
  • landscape-left
  • angled (when the board is tilted but not clearly in any of the above orientations)
  • unavailable (when the accelerometer is not currently enabled)
{
  "status": "face-down",
  "motion": 1599073299,
  "count": 1
}

Retrieving Motion Results Over a Time Period

By default, card.motion returns a single orientation status and a count of motion events. You can also use the minutes argument to specify an amount of time to sample for buckets of movement.

{
  "req": "card.motion",
  "minutes": 5
}
J *req = NoteNewRequest("card.motion");
JAddNumberToObject(req, "minutes", 5);

NoteRequest(req);
req = {"req": "card.motion"}
req["minutes"] = 5

rsp = card.Transaction(req)

When card.motion is used in this manner, the Notecard will return a movements field of movement buckets, ordered most-recent to least-recent. Each character encodes the number of movements in one bucket:

  • 0–9 — a count of 0 through 9.
  • A–P — a count of 10 through 25.
  • Z — a count of 26 or more.

A seconds field, which signifies the size of each bucket, is also returned.

The string always contains one character per bucket in the requested window (minutes × 60 ÷ seconds, rounded up), up to a maximum of 249 characters. Trailing zeros are not trimmed. The request above asks for five minutes at the default five-second bucket size, so the response contains 60 characters.

{
 "count": 17,
 "seconds": 5,
 "status": "face-up",
 "movements": "520000000000000000000A00000000000000000000000000000000000000",
 "motion": 1599074347
}

In the example above, the Notecard detected five movements in the most recent five-second bucket, two in the bucket before it, and ten in the bucket 105 to 110 seconds ago. No movement was detected in any of the other buckets.

Configuring Motion Monitoring

If you need finer-grained control over motion tracking on the Notecard, use the card.motion.mode request. With this request, you can stop motion monitoring with the stop argument. Once sent, subsequent bare card.motion requests return an empty JSON object ({}).

{
  "req": "card.motion.mode",
  "stop": true
}
J *req = NoteNewRequest("card.motion.mode");
JAddBoolToObject(req, "stop", true);

NoteRequest(req);
req = {"req": "card.motion.mode"}
req["stop"] = True

card.Transaction(req)

Use the start argument to turn motion monitoring back on:

{
  "req": "card.motion.mode",
  "start": true
}
J *req = NoteNewRequest("card.motion.mode");
JAddBoolToObject(req, "start", true);

NoteRequest(req);
req = {"req": "card.motion.mode"}
req["start"] = True

card.Transaction(req)

You can also use the seconds argument to specify a period for each bucket when using the minutes argument with card.motion. For instance, the following request sets the bucket size to 30 seconds:

{
  "req": "card.motion.mode",
  "seconds": 30
}
J *req = NoteNewRequest("card.motion.mode");
JAddNumberToObject(req, "seconds", 30);

NoteRequest(req);
req = {"req": "card.motion.mode"}
req["seconds"] = 30

card.Transaction(req)

If you then perform another request to card.motion and set the minutes argument to 2, the response will return a movements string with four characters, one for each 30 second bucket of motion.

{
  "req": "card.motion",
  "minutes": 2
}
J *req = NoteNewRequest("card.motion");
JAddNumberToObject(req, "minutes", 2);

NoteRequest(req);
req = {"req": "card.motion"}
req["minutes"] = 2

rsp = card.Transaction(req)
{
  "seconds": 30,
  "status": "face-up",
  "movements": "1010",
  "motion": 1599074347
}

Finally, if you need to adjust the sensitivity of the accelerometer, use the sensitivity field. The default sample rate of 1.6Hz could miss short-duration accelerations (e.g. bumps and jolts), and free fall detection may not work reliably with short falls. The penalty for increasing the sample rate to 25Hz is increased current consumption by ~1.5uA relative to the default -1 setting.

  • -1: 1.6Hz, +/-2G range, 1 milli-G sensitivity (default)
  • 1: 25Hz, +/- 16G range, 7.8 milli-G sensitivity
  • 2: 25Hz, +/- 8G range, 3.9 milli-G sensitivity
  • 3: 25Hz, +/- 4G range, 1.95 milli-G sensitivity
  • 4: 25Hz, +/- 2G range, 1 milli-G sensitivity
  • 5: 25Hz, +/- 2G range, 0.25 milli-G sensitivity
{
  "req": "card.motion.mode",
  "sensitivity": 3
}
J *req = NoteNewRequest("card.motion.mode");
JAddNumberToObject(req, "sensitivity", 3);

NoteRequest(req);
req = {"req": "card.motion.mode"}
req["sensitivity"] = 3

card.Transaction(req)

Automatic Motion Capture

To automatically store motion events as Notes in a Notefile, use the card.motion.track request and the start argument. If successful, calls to this request return an empty JSON object ({}).

{
  "req": "card.motion.track",
  "start": true
}
J *req = NoteNewRequest("card.motion.track");
JAddBoolToObject(req, "start", true);

NoteRequest(req);
req = {"req": "card.motion.track"}
req["start"] = True

card.Transaction(req)

By default, the Notecard stores motion events in a Notefile called _motion.qo. You can specify your own Notefile with the file argument. You can also use minutes to specify the maximum frequency at which Notes will be recorded, count for the number of most recent buckets to examine, and threshold to specify the number of buckets that must indicate motion in order for a tracking Note to be added.

{
  "req": "card.motion.track",
  "start": true,
  "minutes": 5,
  "count": 10,
  "threshold": 2,
  "file": "movements.qo"
}
J *req = NoteNewRequest("card.motion.track");
JAddBoolToObject(req, "start", true);
JAddNumberToObject(req, "minutes", 5);
JAddNumberToObject(req, "count", 10);
JAddNumberToObject(req, "threshold", 2);
JAddStringToObject(req, "file", "movements.qo");

NoteRequest(req);
req = {"req": "card.motion.track"}
req["start"] = True
req["minutes"] = 5
req["count"] = 10
req["threshold"] = 2
req["file"] = "movements.qo"

card.Transaction(req)

With the now argument set to true, the Notecard will immediately add a Note if the orientation of the Notecard changes, overriding the minutes rate limit. The Note goes to whichever Notefile is configured with file, so in the example below it is added to movements.qo rather than _motion.qo.

{
  "req": "card.motion.track",
  "start": true,
  "minutes": 5,
  "count": 10,
  "threshold": 2,
  "file": "movements.qo",
  "now": true
}
J *req = NoteNewRequest("card.motion.track");
JAddBoolToObject(req, "start", true);
JAddNumberToObject(req, "minutes", 5);
JAddNumberToObject(req, "count", 10);
JAddNumberToObject(req, "threshold", 2);
JAddStringToObject(req, "file", "movements.qo");
JAddBoolToObject(req, "now", true);

NoteRequest(req);
req = {"req": "card.motion.track"}
req["start"] = True
req["minutes"] = 5
req["count"] = 10
req["threshold"] = 2
req["file"] = "movements.qo"
req["now"] = True

card.Transaction(req)

To stop automatic motion capture, use the stop argument.

{
  "req": "card.motion.track",
  "stop": true
}
J *req = NoteNewRequest("card.motion.track");
JAddBoolToObject(req, "stop", true);

NoteRequest(req);
req = {"req": "card.motion.track"}
req["stop"] = True

card.Transaction(req)
note

For location-aware applications, Notecard's accelerometer is also used to gate GPS sampling. With the "mode":"periodic" argument of card.location.mode, GPS only activates after motion is detected. See Sampling GPS Readings with Periodic Mode for how the motion threshold and seconds/vseconds arguments work to keep a stationary tracker from consuming power.

Configuring Sync on Notecard Motion

Finally, use the card.motion.sync to configure automatic syncs to Notehub based on Notecard movement. Use the start argument to turn this feature on:

{
  "req": "card.motion.sync",
  "start": true
}
J *req = NoteNewRequest("card.motion.sync");
JAddBoolToObject(req, "start", true);

NoteRequest(req);
req = {"req": "card.motion.sync"}
req["start"] = True

card.Transaction(req)

And stop to turn it off:

{
  "req": "card.motion.sync",
  "stop": true
}
J *req = NoteNewRequest("card.motion.sync");
JAddBoolToObject(req, "stop", true);

NoteRequest(req);
req = {"req": "card.motion.sync"}
req["stop"] = True

card.Transaction(req)

For finer-grained control, use the minutes argument to specify the maximum frequency at which a sync will be initiated, count for the number of most recent buckets to examine, and threshold to specify the number of buckets that must indicate motion in order for sync to be triggered.

{
  "req": "card.motion.sync",
  "start": true,
  "minutes": 20,
  "count": 20,
  "threshold": 5
}
J *req = NoteNewRequest("card.motion.sync");
JAddBoolToObject(req, "start", true);
JAddNumberToObject(req, "minutes", 20);
JAddNumberToObject(req, "count", 20);
JAddNumberToObject(req, "threshold", 5);

NoteRequest(req);
req = {"req": "card.motion.sync"}
req["start"] = True
req["minutes"] = 20
req["count"] = 20
req["threshold"] = 5

card.Transaction(req)

Customizing Voltage-Variable Behaviors

A number of requests in the Notecard API, like hub.set and card.location, can be configured to use voltage-variable behaviors to perform battery- intensive actions like a sync or tracking location with GPS. If your product battery allows you to use voltage as a proxy for available energy, you can use the card.voltage request's mode argument to map voltage levels to the following battery states:

  • usb
  • high
  • normal
  • low
  • dead

The mode argument accepts either a named preset (like "lipo") or a custom voltage string. Both are described below.

tip

When battery voltage drops into the low state, the right response in most deployments is to stretch the device's remaining runtime by throttling sync intervals and sensor sampling, not to give up and let it die silently. A fleet of devices that each report once per day at a low voltage is far more useful than the same fleet going dark a week earlier. Use voltage-variable arguments throughout your design, then surface the devices currently operating in degraded modes via Notehub Smart Fleet Rules so the fleet administrator can see them.

Using a Named Preset

Named presets set the voltage thresholds for your battery chemistry automatically. For instance, for a LiPo battery:

{
  "req": "card.voltage",
  "mode": "lipo"
}
J *req = NoteNewRequest("card.voltage");
JAddStringToObject(req, "mode", "lipo");

NoteRequest(req);
req = {"req": "card.voltage"}
req["mode"] = "lipo"

rsp = card.Transaction(req)

Consult the card.voltage API docs for a complete listing of named presets (lipo, l91, alkaline, and others).

Using a Custom Voltage String

If the built-in presets don't match your battery's characteristics, you can provide a custom semicolon-delimited string of state:voltage pairs as the mode value directly.

note

List the pairs in descending voltage order. Working from the highest threshold down, the Notecard returns the first state whose threshold is at or below the current voltage. End the string with dead:0 as a catch-all for any voltage not matched by an earlier entry.

{
  "req": "card.voltage",
  "mode": "usb:4.6;high:4.2;normal:3.6;low:3.1;dead:0"
}
J *req = NoteNewRequest("card.voltage");
JAddStringToObject(req, "mode", "usb:4.6;high:4.2;normal:3.6;low:3.1;dead:0");

NoteRequest(req);
req = {"req": "card.voltage"}
req["mode"] = "usb:4.6;high:4.2;normal:3.6;low:3.1;dead:0"

rsp = card.Transaction(req)

If your application needs to use a similar approach for timing intervals against a connected sensor or peripheral, you can use the name argument to specify an environment variable. This variable can then be set in Notehub to override application default timing values.

{
  "req": "card.voltage",
  "mode": "lipo",
  "name": "sensor-timings"
}
J *req = NoteNewRequest("card.voltage");
JAddStringToObject(req, "mode", "lipo");
JAddStringToObject(req, "name", "sensor-timings");

NoteRequest(req);
req = {"req": "card.voltage"}
req["mode"] = "lipo"
req["name"] = "sensor-timings"

rsp = card.Transaction(req)

Sampling at Voltage-Variable Intervals

If the Notecard is sampling in periodic mode and you want to minimize the impact of GPS on the battery powering your project, use the vseconds argument to instruct the device to take the charge of your battery into consideration when obtaining GPS readings.

The vseconds argument should be a semicolon-delimited string that defines a period for each state of your battery. The pre-defined Notecard battery states are:

  • usb
  • high
  • normal
  • low
  • dead

When the Notecard's battery is in a given state, it will adjust the period based on the values defined in the vseconds string.

For instance, if you wanted to sample GPS once per hour when the battery is full, but scale back the sample rate as the power decreases, you'd provide a vseconds string like this:

{
  "req": "card.location.mode",
  "mode": "periodic",
  "vseconds": "usb:3600;high:14400;normal:43200;low:86400;dead:0"
}
J *req = NoteNewRequest("card.location.mode");
JAddStringToObject(req, "mode", "periodic");
JAddStringToObject(req, "vseconds", "usb:3600;high:14400;normal:43200;low:86400;dead:0");

NoteRequest(req);
req = {"req": "card.location.mode"}
req["mode"] = "periodic"
req["vseconds"] = "usb:3600;high:14400;normal:43200;low:86400;dead:0"

rsp = card.Transaction(req)

This will return an object confirming that the Notecard is in periodic mode and that GPS should be sampled at a voltage-variable rate:

{
 "mode": "periodic",
 "vseconds": "usb:3600;high:14400;normal:43200;low:86400;dead:0"
}

To set the sample rate from a voltage variable rate back to a set rate, set vseconds to - and provide a new value for the seconds argument:

{
  "req": "card.location.mode",
  "mode": "periodic",
  "vseconds": "-",
  "seconds": 60
}
J *req = NoteNewRequest("card.location.mode");
JAddStringToObject(req, "mode", "periodic");
JAddStringToObject(req, "vseconds", "-");
JAddNumberToObject(req, "seconds", 60);

NoteRequest(req);
req = {"req": "card.location.mode"}
req["mode"] = "periodic"
req["vseconds"] = "-"
req["seconds"] = 60

rsp = card.Transaction(req)

This will return an object confirming that the Notecard is in periodic mode and sample GPS at a set rate:

{
 "mode": "periodic",
 "seconds": 60
}

Achieving the Lowest Possible Power State

The Notecard's hardware components and factory firmware settings provide a default experience with minimal power usage. There are additional Notecard API requests and hardware settings that can be altered to achieve the right balance of power savings and functionality for your specific requirements.

warning

Do not repeatedly power-cycle or reset Notecard to save power. Notecard is designed to be continuously powered. Its idle draw is already very low, and power-cycling it at runtime incurs a startup cost (i.e. re-registering with the network, reacquiring time, etc.) that dwarfs any savings. Leave VIO powered at all times.

For example, the following Notecard API commands will place the Notecard in its lowest possible power state (e.g. ~8µA@5V on a Notecard Cellular):

// perform a "factory reset" on the Notecard and restart
{"req":"card.restore","delete":true}

// disables all syncing between Notecard and Notehub
{"req":"hub.set","mode":"off"}

// disable the Notecard accelerometer and stop motion tracking
{"req":"card.motion.mode","stop":true}

// disables ATTN processing and sets the pin OFF
{"req":"card.attn","off":true}

// disable GPS
{"req":"card.location.mode","mode":"off"}

// disable AUX mode
{"req":"card.aux","mode":"off"}

// enable ESP32 deep sleep (only for Notecard WiFi v2, NOTE-ESP)
{"req":"card.sleep","on":true}

Likewise, the Notecarrier in use can impact overall power consumption. For instance, the Notecarrier A provides the best out-of-the-box power performance of ~8-9µA@5V with a Notecard Cellular.

notecard cellular and notecarrier a

The Notecarrier F, however, requires changing a DIP switch to achieve the lowest possible power state. For example, on a Notecarrier F, setting the FEATHER_EN DIP switch to N_ATTN (which disables the Feather) will lead to the lowest possible power usage (approximately ~9-11µA@5V with a Notecard Cellular).

note

There is a lot of capacitance aboard the Notecarrier F, so you may see the current start high and drift downward toward ~9-11µA@5V.

notecard cellular and notecarrier f

Debug Tip: Visually Confirm Idle Behavior with a Monitor-Mode LED

While bringing up a low-power design, it can be hard to tell from a multimeter alone whether the Notecard is actually idling as expected. A helpful trick is to wire an LED or NeoPixel to the AUX pins and configure them to light under different scenarios. See the Using LEDs and NeoPixels to Monitor Notecard Status example app for more information.

Power Usage Estimates

Notecard datasheets list an idle current of about 8-18µA@5V, but actual power consumption metrics depend on how the Notecard is used in practice.

This section outlines several common use cases and provides the estimated power consumption for each, based on measurements taken with a Blues Mojo under standardized test conditions and representative cellular signal strengths.

tip

To turn these measurements into a battery life estimate for your own duty cycle, see How to Estimate Battery Life for a Cellular IoT Device, which walks through the math and includes a calculator.

  • Test: First Network Connection After a Factory Reset
  • Test: "Cold" Network Connection After Restart
  • Test: "Warm" Network Connection
  • Test: Idle Mode for One Hour
  • Test: Create and Sync One Note in Minimum Mode
  • Test: Continuous Mode for 12 Hours with 5-Minute Syncs
  • Test: Minimum/Periodic Mode for 12 Hours with 30-Minute Syncs

Additional tests were performed on Notecard for Skylo (NOTE-NBGLWX) using its built-in satellite (NTN) radio on the Skylo network. Before switching to NTN, it synced once over cellular to upload the compact templates that NTN requires; that sync isn't included in the results.

  • Satellite Test: Create and Sync One Note
  • Satellite Test: Idle Mode for One Hour
  • Satellite Test: Minimum Mode for 12 Hours with 60-Minute Syncs
warning

The following data points are best used as a relative comparison between Notecards. Any product design alterations or Notecard models incorporated should be based on your own real-world usage of Notecard, unique to the physical enclosure, antennas, and geographic location.

Testing Parameters

  • Tests were performed using Notecard firmware v11.4.1, with each device in the same physical location.
  • Tests were run using the following independently-powered hardware:
    • Blues Swan 3.0
    • Notecarrier A
    • Blues Mojo
  • A bench power supply provided 4.2V to the Notecarrier A's LiPo connector through the Mojo, so the results include the Notecarrier A as well as the Notecard. The Swan was powered separately and connected to the Notecarrier with only SDA, SCL, and GND, so its power use isn't included.
  • Each Notecard's series of tests started with a factory reset (card.restore with "delete":true). Cellular tests used cellular only (card.transport set to cell) with automatic selection of the network technology, and with the Notecard's location, motion, ATTN, AUX, and DFU features turned off.
  • Connection tests measure from the hub.sync request until the modem powers off.
  • The body of the "generic Note" used when needed was {"temp":12.3,"alert":true}.
  • The Arduino sketches used for the test runs are available on GitHub for cellular tests and for satellite tests.
note

All test results are reported in milliamp hours (mAh); lower values indicate lower power consumption.

Cellular Signal Considerations

Since the strength of a cellular signal and the network technology in use can directly impact power usage (e.g. a weaker signal may require a Notecard to be active for longer to transmit all data), the following table lists the signal strength indicators for each Notecard used for testing, as the median across its connection tests.

note

For more information on decoding the following indicators of cellular signal quality, please consult our guide on Diagnosing Cellular Connectivity Issues.

NotecardNetwork TechRSSISINRRSRPRSRQBars
Narrowband
NOTE-NBGLWXLTE-M-7011-96-142
Midband
NOTE-MBGLNLTE Cat-1 bis-6813-98-132
NOTE-MBGLWLTE Cat-1 bis-7211-99-112
NOTE-MBNANLTE Cat-1 bis-686-100-152
NOTE-MBNAWLTE Cat-1 bis-6710-97-132
Wideband
NOTE-WBGLWTLTE Cat-1-617-94-142
NOTE-WBNANLTE Cat-1-6710-96-122
NOTE-WBNAWLTE Cat-1-6814-96-122

Test: First Network Connection After a Factory Reset

This test measures power usage of a Notecard's first connection to Notehub after a factory reset.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M1.086
Midband
NOTE-MBGLNLTE Cat-1 bis0.517
NOTE-MBGLWLTE Cat-1 bis0.988
NOTE-MBNANLTE Cat-1 bis0.568
NOTE-MBNAWLTE Cat-1 bis0.800
Wideband
NOTE-WBGLWTLTE Cat-11.204
NOTE-WBNANLTE Cat-12.405
NOTE-WBNAWLTE Cat-12.493

Test: "Cold" Network Connection After Restart

This test measures power usage of connecting to Notehub after the Notecard is restarted (using the card.restart API), averaged across ten independent runs. The restart itself isn't included.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M0.637
Midband
NOTE-MBGLNLTE Cat-1 bis0.255
NOTE-MBGLWLTE Cat-1 bis0.327
NOTE-MBNANLTE Cat-1 bis0.255
NOTE-MBNAWLTE Cat-1 bis0.293
Wideband
NOTE-WBGLWTLTE Cat-10.795
NOTE-WBNANLTE Cat-10.888
NOTE-WBNAWLTE Cat-10.781

Test: "Warm" Network Connection

This test measures power usage of a new connection to Notehub after the previous connection has closed and the modem has powered off, averaged across ten independent runs.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M0.488
Midband
NOTE-MBGLNLTE Cat-1 bis0.255
NOTE-MBGLWLTE Cat-1 bis0.303
NOTE-MBNANLTE Cat-1 bis0.256
NOTE-MBNAWLTE Cat-1 bis0.283
Wideband
NOTE-WBGLWTLTE Cat-10.697
NOTE-WBNANLTE Cat-10.891
NOTE-WBNAWLTE Cat-10.947

Test: Idle Mode for One Hour

This test measures power usage of a Notecard in minimum mode, with its modem off and no requests from the host, over one hour, averaged across five independent runs. Because each run lasts one hour, the result in mAh is also the average current in mA.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M0.0266
Midband
NOTE-MBGLNLTE Cat-1 bis0.0289
NOTE-MBGLWLTE Cat-1 bis0.0310
NOTE-MBNANLTE Cat-1 bis0.0280
NOTE-MBNAWLTE Cat-1 bis0.0345
Wideband
NOTE-WBGLWTLTE Cat-10.0295
NOTE-WBNANLTE Cat-10.0286
NOTE-WBNAWLTE Cat-10.0334

Test: Create and Sync One Note in Minimum Mode

This test measures power usage of creating one Note and immediately syncing it with Notehub, averaged across ten independent runs.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M0.516
Midband
NOTE-MBGLNLTE Cat-1 bis0.263
NOTE-MBGLWLTE Cat-1 bis0.320
NOTE-MBNANLTE Cat-1 bis0.271
NOTE-MBNAWLTE Cat-1 bis0.303
Wideband
NOTE-WBGLWTLTE Cat-10.723
NOTE-WBNANLTE Cat-10.893
NOTE-WBNAWLTE Cat-10.967

Test: Continuous Mode for 12 Hours with 5-Minute Syncs

This test measures power usage of a Notecard in continuous mode for twelve hours, while creating and immediately syncing a new Note every five minutes. The Notecard was already connected to Notehub when the measurement started.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M302.2
Midband
NOTE-MBGLNLTE Cat-1 bis176.5
NOTE-MBGLWLTE Cat-1 bis180.9
NOTE-MBNANLTE Cat-1 bis176.9
NOTE-MBNAWLTE Cat-1 bis164.9
Wideband
NOTE-WBGLWTLTE Cat-1276.0
NOTE-WBNANLTE Cat-1323.1
NOTE-WBNAWLTE Cat-1331.1

Test: Minimum/Periodic Mode for 12 Hours with 30-Minute Syncs

This test measures power usage of a Notecard in minimum mode for twelve hours, while creating and immediately syncing a new Note every thirty minutes.

NotecardNetwork TechmAh
Narrowband
NOTE-NBGLWXLTE-M12.23
Midband
NOTE-MBGLNLTE Cat-1 bis5.98
NOTE-MBGLWLTE Cat-1 bis7.20
NOTE-MBNANLTE Cat-1 bis6.10
NOTE-MBNAWLTE Cat-1 bis7.01
Wideband
NOTE-WBGLWTLTE Cat-116.34
NOTE-WBNANLTE Cat-121.55
NOTE-WBNAWLTE Cat-122.06

Satellite Test: Create and Sync One Note

This test measures power usage of creating one Note and immediately syncing it over satellite, averaged across five independent runs. Because the satellite radio can stay active after the sync completes, each run is measured over a fixed 15-minute window that starts at the hub.sync request, so the result also includes the Notecard's idle draw for the rest of that window. The syncs took 45-151 seconds; the longest was the first, which included registering with the satellite network.

NotecardNetwork TechmAh
NOTE-NBGLWXNTN (Skylo)3.869

Satellite Test: Idle Mode for One Hour

This test measures power usage of Notecard for Skylo in minimum mode, with NTN as its transport and no requests from the host, over one hour, averaged across five independent runs.

NotecardNetwork TechmAh
NOTE-NBGLWXNTN (Skylo)0.0267

Satellite Test: Minimum Mode for 12 Hours with 60-Minute Syncs

This test measures power usage of Notecard for Skylo in minimum mode for twelve hours, while creating and immediately syncing a new Note over satellite every sixty minutes.

NotecardNetwork TechmAh
NOTE-NBGLWXNTN (Skylo)45.52

Deep Sleep Mode on Notecard WiFi v2

Unlike STM32-based Notecards, Notecard WiFi v2 does not (by default) fall back to a ~10µA current draw when it is idle. This is because the ESP32 on Notecard WiFi v2 doesn't have a STOP mode equivalent where the UART and I2C can operate. The ESP32 does have a deep sleep mode that draws ~10µA@5V, but in this state:

  • The RTC is retained
  • GPIOs are retained
  • It can wake based on RTC or GPIO
  • UART and I2C are not functional

Enabling Deep Sleep Mode

To enable Notecard WiFi v2 to enter a deep sleep state during periods of inactivity, the host must configure it with the card.sleep API:

{
  "req": "card.sleep",
  "on": true
}
J *req = NoteNewRequest("card.sleep");
JAddBoolToObject(req, "on", true);

NoteRequest(req);
req = {"req": "card.sleep"}
req["on"] = True
rsp = card.Transaction(req)

In addition, the CTX and RTX pins on Notecard must be wired to GPIOs on your host. These pins are exposed on Notecarrier F and the Notecarrier X series.

When the Notecard is in this state, you must drive RTX high to wake the Notecard from deep sleep when it wants to communicate via UART or I2C. The Notecard WiFi v2 sets CTX high whenever it is ready to receive commands via I2C or UART. Note that there is significant latency on wake (~10 seconds).

The Notecard firmware libraries provide helper functions to handle this automatically:

notecard.setTransactionPins(_ctx_pin, _rtx_pin);
card.SetTransactionPins(_ctx_pin, _rtx_pin)
note

Notecard WiFi v2 will never enter deep sleep mode if any of the following are true (this behavior is analogous to the STM32-based Notecards):

  • RTX is high
  • USB is connected
  • AUX-EN is high
  • If the Notecard is in continuous mode
Web Transactions Low Bandwidth Design
Can we improve this page? Send us feedback
© 2026 Blues Inc.
© 2026 Blues Inc.
AboutDocsAPI ReferenceTermsPrivacy