0

Arduino UNO AREF PIN internal resistor

Hi there,

 

I would like to know if the Arduino UNO available in circuits TinkerCAD includes/simulates the  internal resistor (32 kOhms) that AREF pin internally has:

https://electronics.stackexchange.com/questions/30549/atmega328-external-aref-connection/496702#496702

According to my simulations (see image) and the resistors (1k+47k) the voltage at AREF should be 2 V but it is 5 V. The input impedance for AREF looks like to be infinite...what is (as far as I know) wrong.

Has someone arrive at the same conclusion? Is it a bug?

This is the code for the Arduino

float RawValue=0; //it corresponds to the measured number of LSB
float Measurement=0; //it corresponds to the measurement of the physic variable
float ReferenceVolt=2; //Modify this value in case external voltage reference is used

void setup()
{
analogReference(EXTERNAL); //Uncomment in case external reference is used
pinMode(A0, INPUT);
Serial.begin(9600); //Measurements will be sent by console
}

void loop()
{
RawValue= analogRead(A0); // We count the number of LSB
Measurement = (RawValue * ReferenceVolt)/ 1024.0; //This equation will give the physical measurement
Serial.println(Measurement); // Plot the result
delay(500);
}

 

 

1 comment

Please sign in to leave a comment.