Voltage meter

I'm trying to measure the voltage from a 12v car battery (in the future maybe 24v as well) using a voltage divider with 10k? & 330? Resistors. This all works fine, my question is do i need to provide some sort of protection for the analog input pins?

I was considering using clamping diodes like in this article here:

http://www.thebox.myzen.co.uk/Tutorial/Protection.html

But I'm not sure if this is necessary at all?

The Arduino input pins are protected by pin protection diodes. Provided you limit the current flowing into those diodes to no more than about 1mA, you don't need to provide additional protection. However, for protection against transients etc. I would increase the upper resistor in the voltage divider to 100K, then choose the value of the lower resistor according to the voltage range you want to measure.

dc42:
The Arduino input pins are protected by pin protection diodes. Provided you limit the current flowing into those diodes to no more than about 1mA, you don't need to provide additional protection. However, for protection against transients etc. I would increase the upper resistor in the voltage divider to 100K, then choose the value of the lower resistor according to the voltage range you want to measure.

That's great, thanks for the information. I'll change the 10K for a 100K like you said and swap the other to get the correct reading.

This circuit is connected directly to the car battery so there's no need for me to worry about the current is there? as it's very small?