I came across some voltage detector ICs (like the KA75XX) that are designed to detect battery voltage.
I am wondering what's the need for the these when using it with a microcontroller like an Arduino? Since the Arduino has analog inputs, can't you just wire the battery directly to those pins and do an analogRead() with the Arduino? (with an internal pull-up enabled)
In low-cost microcontrollers, like those used in most versions of the Arduino, there is no separate pin or internal circuit that supplies an analog reference voltage. Instead, the power supply voltage is used as a reference. So, the analog-to-digital converter always measures the input voltage as a fraction of the supply voltage.
Therefore, you can't measure the supply voltage directly. The supply voltage is always 100% of the supply voltage.
Reliability: When you need to detect a supply voltage drop and need to turn of e.g. all the machinery, then you don't want to rely on a microcontroller which might already be misbehaving because of undervoltage.
Also, especially the KA75XX are from a time where microcontrollers even lacked basic things like brownout detection and couldn't reset themselves. That's why they needed external circuitry to do that.