ABS on a car works by comparing all the wheel speeds and pulsing the brake on the slow one. You have only a single "wheel" so a different tact is in order, you could compare the RPM vs time to a lookup table and pulse the brake if the curve is too fast, or you could give your BRAKE some room to travel against spring tension and sense if the travel is consistent with over braking, and if it is pulse the Brake then. Easy to do using interrupts.