The revised schematic:
Wrong diode. Must be Schottky, which the 1N5815 is not.
The 1N5819 is a good choice.
Wrong orientation of the bottom diode.
Bottom line must be connected to Arduino ground.
I would cange the cap to 0.1uF (100n) ceramic
and move it to the other side of the 10k resistor.
That gives higher noise rejection.
Leo..
Connect sensor(+) to 24volt (+) supply, sensor(-) to the top of the sense resistor and 24V negative to the bottom of the sense resistor (Arduino GND).
