10Volt sensor

I have a pressure sensor which outputs 10volt at 20 bar, but i am only gonna use it up to 6 bar which will then output 3 volt. I just don’t want to destroy the arduino if the sensor get shortened or someone else put higher pressure on it. Is there a way to prevent the arduino from over voltage? a diode or sth like that?

Yes, a zener diode could be used for over-voltage protection. Something like a 4.7V or maybe 5.1V zener in parallel with the analog input pin should do it.

Have a look at:-