Noisy analogRead() with Nano Every

I have just spent an evening trying to use a new Nano every to measure some sensor voltages. The readings are really noisy. At first I thought it was me but I have come to the conclusion the ADC is faulty. It doesn't seem to matter if you use an internal or external reference. There is just lots and lots of noise to the extent that readings are practically useless.

The older Nano is fine, with its internal 1.1V reference. Relatively stable, if not particularly accurate. The Every has more choices for internal reference but they all seem to have this problem.

Has anyone else noticed this or is it just the Nano Every I have is faulty?

It is not an external PSU noise issue before anyone asks. I tested for that and with the external reference too.

Mike

What happens if you connect the ADC input to some reference test voltage? Can you share your schematic?

How did you test?

In general it is good practice to add a 0.1µF capacitor (ceramic) at the analog input pin.

The Capacitor leads should be as short as you can make them and connect directly at the board, i.e. not 2 or 3" from the board. This goes for both the analog input and ground.

This is not specific to the Nano Every but just a good practice (unless you need a fast conversion). And it's like Chicken Soup.... it can't hurt.

It hurts the chicken :slight_smile:

The Nano Every has a switching (buck) 5volt power supply. That could be the reason.
Maybe also decouple the 5volt supply.
Which sensors and Aref are you using. Are you using smoothing code.
Leo..

Yea but it's from the one that never made it across the road :slight_smile: I think the saying as an ethnic origin so it may be more common in New England.

Not as much as the buck buck converter.

Yeah nah, also known here, but we prefer a "big Kiwi breakfast".
Bucks are only a problem if you go in the wop wops.
? ? ?
Leo..

I’ve used a couple of Everys’ and not had a problem with noise on the A/D .

A circuit diagram and sketch would be useful .

I had a sigh this morning. am not new to this but the first challenge always seems to be I must not be measuring it right. Perhaps understandable in the modern world, but I am an experienced Electronics engineer so please be reassured, on this occasion it is not the test set up that is the problem and run with that. What else could it be?

Just the Nano Every with a voltage divider, 22k in series, 5.6k to ground analogue input. (I have tried other divider values, no difference). This is driven from a clean, linear variable voltage lab power supply, with short leads, no earth loops etc. The signal is clean on scope and this works fine with a traditional Nano which suggests it is not the test configuration. Before anyone asks, it makes no difference if run off a USB supply, a 9V supply via Vin or 5V directly.

Either there is a problem with the Nano Every ADC or perhaps its internal voltage regulators are causing this noise or there is some software difference messing up the ADC readings. I am using the internal reference voltage setting at 1.1V and also tried VCC with the same noisiness. The mean is OK, there is just a huge amount of sample to sample variation.

If everyone else's Every is OK, we can maybe put it down to hardware failure and I can invest in a new Every. If not, then I need to rethink the feasibility of using the Nano Every and its siblings for monitoring analogue sensors.

1 Like

It is a linear PSU and looks good on my scope. Incidentally my test source of choice for low noise is a AA cell. I think my Every might be faulty. There seems to be quite a lot of noise on the 3.3V. Meanwhile the older Nano is perfectly good.

The sketch?

I have several LEDs, I2C expanders and an LCD on the PCB which are powered via a 7805, not the Nano. To eliminate these I wrote a simple test sketch that does an analog read and sends the sample USB serial once per second. It is possible the inactive I2C bus is interfering with the ADC I suppose, even though not actually running.

int Value = 0;
void setup() {
Serial.begin(9600);
analogReference(INTERNAL1V1);
}
void loop() {
Value = analogRead(A0);
Serial.println(Value);
delay(1000);
}

How much noise are you taking about ?
Does it read zero with no voltage on your divider ?
Have you a 0v connection issue ( significant current along cables affecting the measurement ?
Try connecting unused analog pins to 0v ( desperation)?

I really don’t understand this issue, mine all work fine .

No wires on Aref …

1 Like

I don't understand it either. Even worse it was working earlier today and then not again. Maybe I have damaged it.

For reference here is the schematic I am working on. The Nano is socketed so I can test it out of circuit.

Have you tested the nano out of that circuit , not sure from what u say ?- there’s a lot going on in there that could be your source of problems .

I would test the nano on the bench with a basic circuit. If that’s fine you need to look at the rest of it !!!!

Yes, I have. It's socketed but I will repeat a nano works fine. Can we please move on from challenging my project and think why a Nano every might.be different enough from a Nano to cause this problem?

It is a different micro but is supposed to be pin compatible.

Mike

I think the Every has an on board switching regulator , rather than a linear one ( so it will work with higher supply voltages ) That might have something to do with it , maybe different input voltage range issue , outputs won’t do so much current either , but overall can do 200mA.
Compare the specs , might give you a clue .

The newer MCU families from microchip are much different in their specifications/capabilities when comparing to the older atmega328p. There should be special attention (filtering) made to the analog voltage supply (AVDD).

On the Nano Every, its a direct connection to +5V ...

image

On the ATmega4809 Curiosity Nano, they use an LC filter ...

image