Designing IoT for power cuts means deciding which parts of the system must keep working when mains power fails, for how long, and how the system tells you that the power has gone. In practice that usually means a battery in the device, backup power for the router or gateway, an alert when mains power is lost, and storing readings until they can be sent. For remote sites with no mains supply, solar with a battery does the job. How much backup you need depends on how long outages last where you are, so the design starts with your site, not with a part list.

Start with the whole chain

A device on battery is only half the answer. Follow a reading from start to finish and ask what each link needs:

  1. The sensor and its board. Usually small loads, easy to back up.
  2. The router, gateway or SIM module. If the device uses the shop's Wi-Fi and the router has no backup, the device goes quiet the moment the power goes.
  3. The internet connection itself. Broadband equipment outside your premises may also lose power. A mobile data path is often a sensible second route.
  4. The equipment being monitored. A freezer without power will warm up whatever the sensor does. The monitoring's job is to tell you quickly so someone can act: start the generator, move stock, call a technician.

Most systems also benefit from a power-loss alert: a message that says "mains power lost at the cold room" the moment it happens, before temperatures start to move.

Backup options compared

Option Good for Watch out for
UPS for router and gateway Keeping the internet link alive indoors Batteries age and need replacing; check it actually covers the router
Rechargeable battery inside the device Riding through outages without anyone noticing Needs proper charging and protection circuits
Replaceable batteries Very low-power sensors that report rarely Someone must remember to change them; the device should report its battery level
Solar panel with battery Ponds, fields, pump houses and sites with no mains Cloudy monsoon spells, dust, theft and heat inside the enclosure
Building generator or IPS Keeping the main equipment running A short gap during changeover can still reset devices

Many sites combine two of these, for example a device with an internal battery plus a UPS for the router.

Design choices that stretch the backup

How long a battery lasts depends as much on the design as on the battery.

  • Sleep between readings. Boards such as the ESP32 can spend most of their time in a low-power sleep and wake briefly to measure and send.
  • Change behaviour on battery. When mains fails, the device can switch off its display, send less often and report only what matters.
  • Store and forward. Readings are saved on the device during an outage and sent when the connection returns, so the record has no gaps.
  • Shut down cleanly. Small computers like the Raspberry Pi can corrupt their memory card if power disappears suddenly. A small backup and a controlled shutdown prevent that.
  • Report health. Battery level, mains status and last contact should all appear on the dashboard.

Solar for remote sites

For a fish pond or a pump far from any supply, a small solar panel charging a battery can run a low-power sensor indefinitely if it is sized properly. Sizing depends on how much power the device uses, how many cloudy days in a row it must survive, and how much sun the spot gets. Plan for the worst stretch of the rainy season, not an average day.

Practical points: mount the panel where it stays clean and hard to steal, keep the battery and electronics shaded and ventilated, since a sealed metal box in the sun gets very hot, and use a proper charge controller. Remote sites usually pair well with LoRa or mobile data; see IoT connectivity options.

Battery safety and care

Batteries store a lot of energy and deserve respect.

  • Use good-quality cells with the right protection and charging circuits, and an enclosure suited to the conditions.
  • Replace any battery that swells, leaks or gets unusually hot, and dispose of it properly.
  • Keep batteries away from heat sources and out of direct sun where possible.
  • Mains wiring, inverters, IPS units and larger solar installations should be designed and installed by qualified electricians.
  • Batteries lose capacity with age. Note the installation date and plan replacements.

Test it before you trust it

A backup that has never been tested is a hope, not a plan. Before relying on the system:

  1. Switch off mains power to the device and confirm the power-loss alert arrives.
  2. Switch off the router and check that the device keeps readings and sends them later.
  3. Let the device run on battery and note roughly how long it lasts.
  4. Restore power and confirm everything reconnects without anyone pressing a button.
  5. Repeat these checks every few months, because batteries and set-ups change.

For real examples of how this fits together, see cold room temperature alerts and generator fuel and running-hours monitoring. If you want a system designed around your site's power situation, my IoT device development service starts there.

Related service IoT device development Connected devices from prototype to dashboard: sensors, firmware, connectivity and alerts that reach your phone.