Sounds like a great idea but that will take a lot of capacitor depending whet else is connected to the Arduino. I would suggest using a USP if you need lines support or a battery backup system for the Arduino. Here is the formula you need: capacitance in Farads F = Current I x time t / voltage dV