IoT / EmbeddedRust + EmbassySolar Powered

Beach Flags

Automated beach safety, from firmware to cloud

End-to-end IoT system for Panama City Beach. STM32 + Embassy-rs firmware, Blues Notecard cellular, NWS API integration. Sub-1µA sleep current, solar-powered, full OTA updates.

0.4µA
STOP2 Current
92
Days Autonomy
83:1
Solar Ratio
A/B
OTA Slots
The Challenge

Manual Flags are Dangerous

Lifeguards must physically change flags in hazardous conditions. Forecasts update faster than humans can respond. Lives depend on accurate, timely warnings.

😰 Traditional Approach
  • • Manual flag changes in dangerous weather
  • • Delayed response to changing conditions
  • • Inconsistent coverage across beaches
  • • No historical data or analytics
⚔ Automated System
  • • Real-time NWS forecast integration
  • • Instant flag changes, no human exposure
  • • Consistent, rule-based decisions
  • • Full telemetry and event logging
Flag Logic

Deterministic Safety Rules

Conditions map to flags through a clear, testable algorithm. No ambiguity, no interpretation. Try it yourself.

Rip Current Riskmoderate
Surf Height3 ft
0 ft4+ ft6+ ft8+ ft12 ft
Yellow
Medium Hazard
Motor Command
set_flag("yellow")
Architecture

Device to Cloud

Distributed architecture with the Notecard as the cellular bridge. Backend pushes intelligence, devices stay dumb and sleepy.

I²C JSONLTE-MWebhookRESTšŸ“”IoT DevicezzzšŸ“¶Notecardā˜ļøNotehubšŸ–„ļøBackend🌊NWS API
Data Source

NWS Integration

Smart polling minimizes API calls while staying current. Only fetch full forecasts when they actually change.

Smart Polling Strategy
1
Query product metadata
2
Compare with cached ID
3
Fetch full product if new
4
Parse conditions & update
NWS Surf Zone Forecast
FLZ112
Rip Current RiskModerate
Surf Height3-4 ft
Water Temperature78°F
Last Updated2 min ago
Power Design

Engineered for Autonomy

Sub-1µA sleep current with adaptive scheduling. 5W solar panel harvests 127Ɨ daily consumption. Runs indefinitely, even on cloudy days.

Daily Power BalanceSolar Positive
ā˜€ļø Solar Harvest+2300 mAh
šŸ”‹ Daily Consumption-18 mAh
128:1
Harvest to consumption ratio
333
Days without sun
āˆž
With 10% solar
Sleep Mode Strategy
STM32L4 STOP2 Mode
• Wake latency: ~5 µs
• Core current: 0.4 µA
• RAM retention: Yes
• Wake sources: RTC, GPIO, ATTN
Hardware Stack

Production Components

Every component chosen for reliability, availability, and power efficiency. ~$240 BOM at prototype, ~$150 at volume.

STM32L476
Microcontroller
ARM Cortex-M4, 5µs wake latency, full RAM retention
Blues Notecard
Cellular Module
LTE-M, JSON-native API, ATTN pin for event-driven wake
DRV8876
Motor Driver
Current sense, fault detection, self-locking worm gear
LiFePO4 6Ah
Battery
Safer chemistry, 2000+ cycles, flat discharge curve
CN3791
MPPT Charger
6W solar panel, 60% efficiency, ~5.4Ah daily harvest
MAX17048
Fuel Gauge
SOC tracking, low battery interrupt, power mode triggers
RustšŸ¦€
Embassy-rs
STM32
Blues Notecard
Axum
PostgreSQL
TimescaleDB

Building an IoT product?

From firmware to cloud, we ship production embedded systems. Fast prototypes, solid foundations, real results.