Regulating the Analog Input

Hi everyone!

In a small project that I'm working on right now, I have an Arduino Nano that is supposed to get data from various sensors. Now one of the sensors (or rather, 'input') is directly coming from a car. This is supposed to be an Analog input.

The values from this input range between 0V ~ 12V as expected. However, the voltage can surge to upto 30V during ignition.

What I want to do, is implement a small circuit that will "cap" the voltage at 12V. I was thinking of using a Zener diode rated for 30V. Will it work (or am I thinking right)? And what would be the best way to go about this?

Furthermore, I would also want to implement another circuit to proportionally change the 0~12V input to 0~5V input.

Any help would be greatly appreciated!

  • Cheers!

Howabout a 18k:10k voltage divider to the analog pin. At 30V the 18k resistor will limit the current to 1.4mA
through the Arduino pin's protection diode. You can bolster this protection diode with an external schottky diode to the +5V rail.

At 13.8V you'll get 4.93V out, nearly full-scale for a 5V Arduino analog input.

A 30V zener won't protect against 30V!!

Alright, I’ll give it a go.

I’ll implement it and I’ll post a follow up.