0
\$\begingroup\$

I need to measure the voltage on the 0-5V power line using the Arduino UNO analog input.

As I understand it, this can be done simply by connecting the "+" power line to an analog pin, without using any resistors? If not, do I need to pull the + to GND?

Can I protect the input of the arduino from overvoltage?

\$\endgroup\$
2
\$\begingroup\$

Connecting supply line to the ADC directly has other implications such as subjecting the ADC line to higher voltage than 5 V, possibly damaging the pin or the whole MCU.

You can form a voltage divider using two resistors. Now you could accommodate chances of the external power input being higher than 5 V too.

Connecting a small capacitor (100nF) across the ADC input will also smooth out the noise on the line.

What is the reference voltage source of the ADC you are planning? Is there internal bandgap voltage reference? It is more important too

I would still connect two Schottky diodes back to back across the ADC for voltages beyond the operating range of the MCU. This will prevent any mishaps just in case.

Example of ADC input protection

Image source: Figure 2 from ADC Input Protection - Texas Instruments Application Report SLAA593

\$\endgroup\$
  • 1
    \$\begingroup\$ You can also mention that diodes should have lower forward voltage than protective diodes in MCU. And that it is good idea to limit current to pin and diodes, but in your case RC filter should provide enough resistance. \$\endgroup\$ – Rokta Aug 14 at 6:40
  • \$\begingroup\$ Umar, SamGibson, Rokta - Thank you!!! \$\endgroup\$ – Алекс Гарисон Aug 15 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.