Analyzing 24V fast PWM signal in Arduino
If ground is common between the PWM controller and Arduino then you can just use a resistor divider.







simulate this circuit &ndash; Schematic created using CircuitLab