So I am trying to make a circuit breaker using a microcontroller. I managed to get as far as this So I have the CT with a peak detector running to the adc. I then calculate the rms by dividing by root 2, which I then compare with a reference in this case 10A and it trips via the mosfet/relay. So, I tested it and it works fine with overloading above 10A. I was wondering how to deal with short circuits and inrush currents ?, should I have a delay before tripping to allow for inrush current ? I also tested a short circuit and found that it tripped in 25 ms, how would I know if that is enough to damage the transformer ?, would I have to calculate how hot the winding's get ?