k0ua
Epic Contributor
You can plug a UPS (Uninterruptable power supply) such as for powering computers into it and the plug what you are powering into the UPS. The UPS will clean up the power.
But keep in mind some UPS's themselves are finicky about the input power, and will switch to battery mode and back, and keep on cycling. Some have sensitivity adjustments that you can lower to help prevent this.