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?

asked Aug 14, 2019 at 5:48
\$\endgroup\$

1 Answer 1

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

SamGibson
18.5k5 gold badges42 silver badges65 bronze badges
answered Aug 14, 2019 at 6:04
\$\endgroup\$
2
  • 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\$ Commented Aug 14, 2019 at 6:40
  • \$\begingroup\$ Umar, SamGibson, Rokta - Thank you!!! \$\endgroup\$ Commented Aug 15, 2019 at 7:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.