Method for sensing fault currents with microcontroller
I dont have reputation so i could not able to comment.
The most common way is using fuse.But the circuit stops working if fuse breakes .

Do you want to detect the false currents ? or do you want to detect and eliminate or suppress?

For ac circuits you can use bypass capacitors , it short circuits during high frequency.