AREF on Uno R4 using ADR ICs

Hi,
I use an analogic reference (ADR4540) pin for better noise handling on analogic measurement. I bought the ADR4550 and 4533 and made a simple circuit with two 100nF capacitors and a 1uF capacitor as suggested on the datasheet.

I used this simple code to test it out

void setup() {
  Serial.begin(9600);
  analogReference(AR_EXTERNAL);
  analogReadResolution(14);
}

void loop() {
  int sensorValue = analogRead(A0);
  Serial.println(sensorValue);
  delay(1);  // delay in between reads for stability
}

However, even if the Analog reference is activated, I do not recognise any improvement in noise reduction, remaining +-20bits as it was powered only by USB. Does anyone know what is missing?

Is it possible to apply 5V to AREF ?
What if the processor runs at 4.99V and you apply 5.01V to AREF ?
Why would an external voltage have influence on the noise ? There is already a ferrite bead and a capacitor for the AREF. If the 5V is not doing something crazy, then that should be good enough.

The noise can be reduced by averaging/oversampling in software.

According to the datasheets, the Aref IC can apply a maximum of 5.001V since a B-grade IC. Considering the resistance of the wires at the processor should not arrive at more than 5V

It your analog signal itself noisy ?

Update:
I read some more about the ADC.
According to the datasheet, the processor can do both 12 and 14 bit:

The special settings for the UNO R4 Minima are here: https://github.com/arduino/ArduinoCore-renesas/tree/main/variants/MINIMA

I assume that setting the resolution to 14 bits should work.

Yes at 14 bits that noise is normal on USB and it is higher if it is powered by an external power source.
According to Here using an AR IC will reduce the noise by one-tenth.

Thanks for the link, but I have so many questions.
Gaining 1 or 2 bits with a external reference might be possible in a specific situation, but it can be different for an other situation.
First of all, you have to determine if you want to measure a absolute voltage or a ratiometric sensor.
Then determine how the board is powered in the final project.
Then decide if an internal reference should be used or the default or an external reference.

I still don't like a 5V reference. What is the USB has bad contacts and there is only 4.2V from the USB. How will the ADC behave with such a high reference ?

Getting a good signal is the first goal. But have you thought about averaging/oversampling in software. It will really help to get rid of noise. You can even increase the resolution beyond the 14 bits (but not the accuracy).

I Need Absolute voltage: from two hall sensors, from a li ion cell and the current from a current sensor, or the signal from a single axis accelerometer. The board for the ADR was prepared using a breadboard with Dupont cables and the adr was supplied externally from a 2s li-ion battery like this one Here

I also have a 3.3V reference

Since the sampling frequency is not high 2, 5kHz Vs over 1MHz using a mov mean could be helpful

Thank you for the clarification. A reference of 3.3V or 4.096V makes more sense.

In most cases you can use really high resistor values for a Li-ion cell, for example a voltage divider with R1 and R2 and R2 = 100k or so. The extra noise can be reduced in software. Do you need milliVolt accurate reading ?
A good current sensor or a hall current sensor ? For example a ACS712 ? Then you can put aside the numbers in the datasheet and assume that they are 20% inaccurate.
If you have a current transformer with a load resistor, then you can add a protection resistor of 1k or 4k7 towards the analog input.
An normal accelerometer has also a few percentage inaccuracy.

If you have normal parts, then the 10 bits of a Arduino Uno is good enough.
If you have industrial parts, check the accuracy, I doubt if they are below 1%.

1 Like

The Minima has a diode in series with the USB +5V in, so is running at about 4.7 volts.
Therefor to make use of the Aref input one has to have a reference that is lower, I use 4.096V ref chip. Note however one also has to make sure that the circuit that is supplying the analog-input is also stable - if one is using a 10K pot for example the hot side also needs to be on the Aref, NOT the nominal +5V pin.
The Minima’s ADC is pretty pants, I only see a 2x improvement - it’s still very noisy, but then I am trying to use it in 14bit mode.

1 Like

Why not using internal 1.5 V voltage reference instead?

I found out during experiments with ACS712 that providing a stable reference voltage (internal or external) may not be enough. I obtained repeatable measurement results only after taking multiple readings, discarding extreme values ​​and taking an average. This is more or less what it looks like for me:

#include "KickSort.h"

  analogReference(AR_EXTERNAL); 
  analogReadResolution(14);

for (int i = 0; i < 150; i++) {
    U2_array[i] = analogRead(A3);
}

KickSort<int>::quickSort(U2_array, 150, KickSort_Dir::ASCENDING);

for (int i = 50; i < 100; i++) {
    suma2 += U2_array[i];
  }

 U2ar = suma2 / 50;

U2 = U2ar * (3.3 / 16383.0);


It may look weird (I'm not a professional programmer, I'm playing around with it) but this method is effective... :slight_smile:

Hi, External REF is always helpful to use since both absolute and ratiometric measurements which are normally referred to the 5V internal, since this voltage has always an offset due to the instability of the 5V power supply. With 3.3V the situation is better since it is more stable. It doesn't kill the noise, but it eliminates measurement drift

There is also a problem in Uno R4 that the internal is about 1.5V, so if you want to measure the voltage from acs712 (zero about 2.5V), you would have to divide it at the input, e.g. by two, losing precision. I used as an external reference LD1117V33 and connected the DC poles to acs712 so that it subtracts 2,5V. It works very well during the first tests. I checked with a laboratory power supply in the range of up to 10A and obtained an error in the current measurement by acs712 of about 20mA, I was surprised...