RAYPCB · ENGINEERING GUIDE
IoT Embedded Systems: Connect Power States, Updates and Recovery
An IoT embedded system combines a physical device, firmware and a networked service. Its architecture must explain how the product behaves when those parts are not all available. Sleep, measurement, connection attempts, updates and recovery consume different resources and can leave different information behind. A design that works only in its normal connected state is incomplete.
This page organizes the hardware and firmware conversation around operating states. The local energy worksheet uses currents measured or assumed at one supply boundary. It can reveal which declared states dominate a cycle, but it does not estimate battery life, simulate firmware or prove that a recovery mechanism works.

Define the state before measuring its current
List mutually exclusive states that describe one complete operating cycle. Examples may include waiting, sensor warmup, acquisition, processing and transmission. If two functions overlap, represent their combined measured current or define another consistent model; do not count both durations as if they occurred sequentially when they did not.
Name the supply boundary used for every value. A processor-rail current cannot be added directly to a battery-input current measured at another voltage. Include relevant regulator, sensor, indicator and communication loads at the chosen boundary, or state what is excluded. Typical component currents are not a substitute for a measured whole-device profile.
Record the operating condition with each value: firmware, supply voltage, radio configuration and relevant environment. A longer connection attempt can dominate energy even when its peak current is unchanged. The aim is to understand a reproducible sequence rather than collect an impressive low sleep-current figure in isolation.
Work the cycle in charge and energy
The worksheet calculates average current as the sum of current multiplied by duration divided by total cycle duration. In the example, 58 seconds at 0.1 mA, one second at 10 mA and one second at 80 mA produce 95.8 mA·s in a 60-second cycle. Average current is approximately 1.597 mA.
Repeating that cycle for 24 hours gives 38.32 mAh at the stated boundary. At a constant 3.3 V, the corresponding energy is approximately 0.1265 Wh. These invented values illustrate the arithmetic only. They exclude battery behavior and any upstream conversion effects not included in the current measurements.
Use a separate profile for failed connection attempts, sensor warmup after reset or other operating modes. Do not treat an expected average as a guaranteed worst case. Battery usable capacity, temperature, aging, self-discharge and conversion efficiency require additional evidence before any lifetime prediction can be made.
| Review item | What to establish |
|---|---|
| State definition | Mutually exclusive states forming a complete cycle, with overlap handled explicitly. |
| Measurement boundary | One supply voltage and current boundary for every contribution. |
| Resources | Code, working memory, retained data and update/recovery allocation. |
| Update behavior | Authorization, interruption, configuration compatibility and recovery. |
| Handoff | Initial firmware, programming access, shipping state and observable diagnostics. |
Operating-state charge and energy
Operating-state charge and energy
Use the current inputs and keep the assumptions
Load the example to see the units and record format, then clear it before entering your own revision. Example values are illustrative and do not select components or establish acceptance limits. Every field needs an intentional value; a blank number is not treated as zero. For CSV input, retain the header and put one item on each row. Quoted cells can contain commas, but duplicate headers and malformed rows are rejected.
Generate a result only after checking the measurement boundary, operating condition and units. Editing an input invalidates the old result and disables its download until you calculate again. An edited example stays labeled as an example. The report is created locally; it does not upload a design, send an enquiry or populate the Contact form. Attach it manually if it helps explain a requirement. You can contact RAYPCB without completing the tool.
| Input | What to establish before using it |
|---|---|
| Review reference | Use a nonconfidential revision label. |
| Mutually exclusive states · CSV | All currents at the same supply measurement boundary. Durations form one complete repeated cycle. |
| Voltage at that boundary · V | Constant-voltage approximation; upstream converter and battery behavior excluded. |
| Planning interval · h | Assumes the declared cycle repeats continuously; not a battery-life prediction. |
Allocate memory to operation and recovery
Identify code, working memory, retained configuration, logs and update storage separately. The selected update strategy may require space for another image or recovery data, but the amount depends on the implementation. Avoid consuming every remaining byte with logs before deciding how the product will recover from a failed update.
Define which records must survive reset and when they are committed. Excessive nonvolatile writes can create endurance concerns; deferred writes can lose recent information during interruption. Choose a policy based on the product requirement and exact memory characteristics, then test the behavior under controlled interruption.
For gateway data retention, the industrial IoT hardware guide owns the outage and buffer calculation. Keep application data and firmware-recovery needs distinct so an overflowing telemetry queue cannot unexpectedly consume a region required for maintenance.

Treat an update as a controlled state transition
Specify how an image is authorized, checked, installed and selected for boot. Define the behavior if power or communication is lost at each relevant stage. The public FreeRTOS OTA documentation provides an implementation context, not a guarantee that a port or custom bootloader already implements the needed behavior.
Retain compatibility rules for configuration and stored data. Rolling back an executable may not restore a data format that the new version already changed. Identify which migrations are reversible and what recovery means if they are not. A checksum can detect certain data changes but does not establish authenticity or overall product correctness.
Assign the update authority and service responsibilities. A manufacturing station may program an initial image while a different controlled process manages field updates. Keep that relationship documented and avoid embedding operational credentials in downloadable worksheets or general assembly notes.
Specify recovery that restores useful behavior
A watchdog reset can restart execution, but it cannot determine whether the restored application state is valid. Define what the device checks after reset, how it identifies incomplete operations and what information it reports. Repeated reboot loops should be observable rather than appear as occasional missing measurements.
Include network unavailability, invalid sensor information and exhausted local resources in the state model. Decide what the product continues doing locally and which functions are deliberately unavailable. Avoid silently substituting old data for a current measurement unless the application clearly identifies its age and validity.
The IoT device health guide connects these states to observable evidence. Useful health information includes the meaning of a reset or update outcome, not only a periodic message. Keep diagnostic records proportionate to the service task and free of unnecessary private customer data.
Carry the architecture into manufacturing and field support
The IoT manufacturing guide explains how firmware, unit identity and test records join the physical assembly. Provide the initial image, configuration method, required programming access and the intended shipping state. Define which recovery observations belong in manufacturing acceptance and which need product-level validation.
When migrating a demonstration, use the Raspberry Pi and Arduino industrial review to examine platform and maintenance ownership. Retaining a familiar development platform does not remove the need for a controlled release and supported recovery path. Conversely, a custom PCB does not automatically make the software lifecycle simpler.
For an enquiry, send the current hardware files and describe the operating states relevant to assembly, programming and test. Attach a nonconfidential energy worksheet if it clarifies the requirement. The useful result is a shared definition of the device's behavior across normal use and recovery, with the corresponding evidence assigned to the right team.
Separate a connected device from a dependable service
A network connection is only one state of the product. Specify first installation, ordinary operation, unavailable network, expired or replaced credentials, firmware recovery and transfer to another owner. Record what the local device continues doing and which data remain meaningful in each state.
Measure power and communication activity over a representative sequence rather than only an idle interval. Keep operational measurements distinct from production test records and security credentials. For a manufacturing handoff, identify the firmware image, identity assignment responsibility, required test network and cleanup state after testing. Customer acceptance should follow useful behavior, such as retaining valid data or recovering a defined function, rather than a display merely saying connected.
Standards, source context and limits
Use the exact device, system and material documents relevant to the released design. A public reference design demonstrates a particular implementation under its stated conditions; changing its parts, layout, enclosure or firmware creates a different verification task. Standards summaries here identify the type of evidence to request, not every clause of a licensed standard. Component qualification, board workmanship, product validation and regulatory acceptance are separate decisions.
For fabrication scope and the agreed construction requirements, see PCB manufacturing.