What Inspired Me

Seeing how much money and time small factory owners and robotics developers lose whenever a heavy machine kicks in. The main power dips for just a fraction of a second, the industrial PC crashes or reboots, the whole production line stops, and expensive work gets ruined. Standard UPS backups are just way too slow to prevent this. I realized we needed a system that doesn't just react to drops, but actually predicts them before they hurt the system.

What I Learned

Power drops don't happen instantly out of nowhere—they leave tiny warning signatures right at the start. By continuously reading voltage patterns with an INA226 power sensor, you can catch the rate of change in the voltage curve. If you train a light TinyML neural net to spot that initial downward slope early, you can fire a quick power injection switch before the main computer even notices a glitch.

How We Built It

We built and verified the entire concept virtually first to keep costs low and testing safe:

Wokwi Simulation: Hooked up an STM32 MCU to an INA226 sensor module, using high-speed I2C and hardware interrupts on pin PA0 to catch voltage drops instantly.

Clean Firmware: Wrote direct, register-level C code from scratch so we don't rely on third-party libraries with tricky open-source license restrictions.

Fusion 360 Design: Mapped out the full PCB schematic, low-resistance supercapacitors, and a tough DIN-rail industrial enclosure.

Challenges Faced

The biggest headache was keeping our total system reaction time under one millisecond. The total delay is the sum of the sensor measurement time, the TinyML model inference time, and the MOSFET switch trigger time. Standard libraries and heavy drivers were causing way too much lag. By cutting out extra middleware and writing lean, direct-register code, we managed to get the entire loop running in roughly a third of a millisecond—well within our safety limit!

Built With

  • 360
  • cembeddedc
  • fusion
  • ina226
  • ml
  • mosfet
  • stm32
  • tinyml
  • wokwi
Share this project:

Updates

Submission history