HOW TO USE AN ACS712 SENSOR

Hi,
I'm wondering if the purpose of your work is to learn about ACS712 or learn about Arduino or just to monitor and respond to a power fail event. If the latter, then there's no need to implement a micro-controller or indeed ACS712 as there are simpler ways to detect power fail events and trigger a relay via an external circuit and supply.

You solution will need to be powered outside of mains (or it will fail when needed most) and for the great majority of time it will be waiting for a job to do. I guess you could run it on rechargeables maintained while the mains is on, but it does seem wasteful. However, if this is a learning exercise you could have a look through: Using the ACS712 Hall Effect Current Sensor Module (part 1) - YouTube but be warned that experience, knowledge and competence around mains is your own responsibility.