Low-power design
Explore with your favorite AI
Gemini & other AI
Copy this page’s context into your AI to explore how it works and what you can build.
Copy the prompt, then paste it into Gemini’s message box.
View prompt
Leafony is designed for compact, battery-powered systems. Runtime depends on the complete circuit, its program and its power supply. Start by identifying where energy is spent, then measure the assembled device.
Power and energy
Section titled “Power and energy”For a constant voltage and current, power is P = V × I. One watt is one volt times one ampere. Energy is power multiplied by time: 1 Wh = 1 W × 1 h.
For switching in a digital circuit, a simplified model is P = α × C × V² × f, where C is load capacitance, V is supply voltage, f is clock frequency, and α is the number of charging events per clock cycle. This excludes leakage and short-circuit current. Lowering frequency can reduce instantaneous power, but also changes how long a task takes, so measure energy for the whole task.
Identify the loads
Section titled “Identify the loads”| Leaf | Main device | Conditions to compare |
|---|---|---|
| AP01 AVR MCU | ATmega328P | Clock frequency, active and sleep states, enabled peripherals |
| AP03 STM32 MCU | STM32L452REI6 | 16 / 80 MHz, run / sleep / stop, RTC and other peripherals |
| AI01 4-Sensors | HTS221TR, OPT3001, LIS2DHTR | Measurement interval, continuous / single measurement / power-down |
| AC02 BLE Sugar | BGM11S22F256GA-V2 | Transmit power, interval, connection / beacon / sleep |
Follow the specifications and schematic links in each reference page, then consult the component data sheets at the actual supply voltage, temperature and operating mode. This table identifies what to investigate; it is not a table of measured current. Include LEDs, resistors and power converters when measuring a complete leaf.
Record the leaf model and revision, firmware, supply voltage, instrument, temperature, mode, measurement interval and average current. Distinguish typical values from maximum values, and data-sheet values from measurements.
Estimate battery runtime
Section titled “Estimate battery runtime”Battery charge capacity is measured in ampere-hours: 1 Ah = 1 A × 1 h. Multiply by nominal voltage to estimate stored energy. The following are assumed values for arithmetic examples, not specifications for all products:
| Example battery | Assumed nominal voltage and capacity | Nominal energy |
|---|---|---|
| CR2032 coin cell | 3.0 V, 220 mAh | 660 mWh |
| AA nickel-metal hydride cell | 1.2 V, 2,000 mAh | 2,400 mWh |
| Lithium-ion cell | 3.7 V, 3,000 mAh | 11,100 mWh |
A constant 3.3 V, 100 mA load consumes 330 mW. Under the assumptions above, a 660 mWh battery gives 660 / 330 = 2 h; a 2,400 mWh battery gives approximately 7.3 h.
A load that sleeps between measurements
Section titled “A load that sleeps between measurements”Assume a circuit draws 100 mA for one minute each hour and 1 mA for the remaining 59 minutes, all at 3.3 V.
Average current = 100 mA × 1/60 + 1 mA × 59/60 = 2.65 mAAverage power = 3.3 V × 2.65 mA = 8.745 mWEnergy used in one hour = 8.745 mWhIdeal runtime = 660 mWh / 8.745 mW ≈ 75.5 h ≈ 3.14 daysThis is a theoretical example, not a measured Leafony runtime.
Reduce energy use
Section titled “Reduce energy use”- Lower the MCU clock when the workload allows it. The STM32 PlatformIO guide explains the 16 MHz setting.
- Put sensors and unused peripherals into sleep or power-down modes between readings.
- Use interrupts to wake the CPU only when needed.
- Increase measurement or radio intervals when the application permits it.
The STM32 Logger Beacon sample demonstrates these techniques.
Measure and verify
Section titled “Measure and verify”- Record the leaves, firmware, battery and voltage.
- Measure current on the battery side over a complete cycle, including startup, sensing, radio transmission and sleep. Check that the instrument’s voltage drop does not affect operation.
- Average current over time. If voltage changes, average the product of voltage and current to obtain average power.
- Change one setting at a time and compare with the estimate.
- Verify runtime using the intended battery and operating temperature.
Only the arithmetic examples have been checked for this revision. No hardware test date, instrument record or verified firmware revision is recorded for this page.