user69282: I want to constantly store data to sd. But how I make sure data is not corrupted on moment of power off? I think I could add small capacitor on 5V and check when voltage drops, so I would stop data write. Or is there better solution for safe data write?

user69592: I think a "small" capacitor here is not going to do the job as you need to keep power stable until the write is completed.  You need to determine:

How much power am I using?
How quickly can I detect a power outage?
How much time do I need to keep power on the Arduino to complete the write operation(s) I want to complete.

Then you will be in a position to calculate how much capacity you need and whether a capacitor or battery is more appropriate.

69282: <p>I want to constantly store data to sd. But how I make sure data is not corrupted on moment of power off? I think I could add small capacitor on 5V and check when voltage drops, so I would stop data write. Or is there better solution for safe data write?</p>
 69592: <p>I think a &quot;small&quot; capacitor here is not going to do the job as you need to keep power stable until the write is completed.  You need to determine:</p>
<ol>
<li>How much power am I using?</li>
<li>How quickly can I detect a power outage?</li>
<li>How much time do I need to keep power on the Arduino to complete the write operation(s) I want to complete.</li>
</ol>
<p>Then you will be in a position to calculate how much capacity you need and whether a capacitor or battery is more appropriate.</p>
