ADC configuration

Thread Starter

gogo00

Joined Oct 28, 2023
37
I am new here and looking for help to understand the configuration settings of the ADC in a microcontroller. What reference voltage do we need to configure if we want to read a 0 to 12 volt DC voltage?
 

Jerry-Hat-Trick

Joined Aug 31, 2022
550
For a microcontroller with analogue input pins it’s important not to connect a signal with a higher voltage than the voltage used to run the microcontroller. So for an Arduino UNO which runs on 5.0 volts you need a potential divider to adjust the 12V down to a value ideally less than 5V and scale the value in your code. In this example, maybe use a 15K resistance in series with a 10K resistance between your signal to be measured and ground and connect the junction of the resistors to the input line.
This will scale a value of 12V to 10/(15 + 10) x 12 = 4.8V.
 
Top