How to read analog 0-24V signal


I need to read a 0-24V signal or 0-100V. I know how to reduce the voltage using a voltage divider, but is it possible to reduce voltage in some other way, so i can feed the signal to a 5V inputpin.

In other words, I want to convert a 0-24V signal to 0-5V signal.

Resistor divider the easiest and cheapest way to reduce a voltage. If you need galvanic isolation between two circuits than look here: There are also some special made IC to measure high side voltage, do a search for BMS ( battery management system ) for example.

A voltage divider with two resistors is best/easiest/cheapest.