Arduino Nano Every - Vin Buck Converter ripple?

Goal:
-Measure 0-4.3 voltage at A0. This part works.
-calibrating the voltage based on the 4.3Vref

setup:
1 amp 24VAC transformer into a full-bridge > 1mF smoothing capacitor > lt3080 for pre-regulation > which feeds into an LM317 adj, set to 5V feeding the arduino at the 5V pin.

problem:
After being unable to get a stable voltage reading(fluctuating by 10-20mV) while testing from A0, I started probing around and found a 2MHz 20mV p-p ripple emanating from the arduino- this ripple is present at all analog pins, 3V3, 5V, and Vin pins. I was able to confirm this by disconnecting the arduino to see that there is no detected ripple or noise while probing the lm317 VOUT pin, while feeding a resistor dummy load at 250mA.

After looking the schematic for the nano every, and doing some research on the mpm3610 buck regulator, I found that its operating frequency is infact, 2000KHz (i.e. 2MHz). So even though I am NOT using the Vin pin and feeding the 5V pin directly, I would presume that the mpm3610 would not be powered, therefore, the enable pin would not be active and therefore should not be causing any ripple.
However, this is not the case, and I am still getting the exact ripple and wave form.

Can anyone shed some light on what I might be missing? Or possibly, should this not be happening?
thanks in advance!

You need a much bigger smoothing capacitor on the output of your regulator , try 100micro farad or even larger .

The analog pins are not true analog outputs , they are pulse width modulated , with the mark space variable to change the average voltage output .

The smoothing cap is 1 millifarad (1000 microfarads) . The oscope is showing a very nice looking DC signal with a resistive dummy load hooked up @ 250mA.

That being said, thanks for the info. I wrongly assumed that the analog outputs were linear.
After playing some wack-a-mole with ceramics and low value resistors, and adjusting my grounds, I was able to suppress most of the ripple - Attenuating the ripple helped get more stable readings and improved the accuracy and precision.

I would suggest you take multiple measurements and average them to filter out the noise. In addition the ADC in the Nano Every can be configured to make multiple measurements at changing intervals to reject harmonic noise. You might not even lose performance doing this as the Arduino library runs the ADC much slower than it is capable in order to be compatible with the Uno. I'd recommend reading the data sheet ATmega4809 Data Sheet

Try a 0u1 ceramic capacitor, or several of them, as close as physically possible to the power connection.

Thanks guys for the suggestions. I have been making progress on it. But I have an odd problem happening.

refresher: The arduino is powered by the 317 set to 5 volts. I have bypassed the Vin pin and I am powering directly from the 5V pin. I have a 4.7uF and a .1uF decoupling caps (MLCC) soldered to the 5V pin and ground pin.

update: When connecting the oscope at the 5v pin and GND pin, I am getting about 10-15 mV of ripple at 2MHz. While trying to touch the leads of an extra ceramic to the leads of the ceramic already attached, I noticed that the oscope suddenly showed there was no ripple...
I figured I knocked a test probe loose or something, but just to test, while the scope was showing no ripple, I tested the voltage of a 9v battery with the voltmeter (i.e. the diy voltmeter that IS the arduino) which is printing out 4 decimal places. To my surprise, it read pretty accurately and showed a totally stable reading out to 4 digits- which is what I would expect from a 9v battery.
However, when power cycling the arduino, the ripple comes back. And when testing the 9v battery when ripple is present, the 2 least signifcant digits are bouncing around from reading the ripple.
After messing with it some more, I figured out that its only if I touch the leads of the capacitor to charge it, and then reverse the polarity of the cap and touch the pins again, the ripple goes away.

At this point I can reproduce those results and what I thought was human error seems to be something going on with the 5V regulator being backfed.

I am getting about 10-15 mV of ripple at 2MHz

I would expect that amount of ripple in a digital circuit to be insignificant and not cause any problems.

I have no explanation for your test results.

Two things about decoupling capacitors:
Within reason, there is no such thing as too many decoupling capacitors, if in doubt add another one.
They should be soldered as physically close to the pins of the chip as is possible with leads as short as possible.

Got it- Ill double over my board and try to really clean up any solder joints and get all of my caps as close as possible.

Also, I agree that those ripple levels for a digital circuit are not bad. My initial issue is why there was ripple coming from the regulator at all when it was bypassed all together.

Of course, that led to the issue of the ripple being injected onto the analog pin. Which, in turn, led to the weird capacitor reversal fix.

Anyway, I will stack on more capacitors and clean up my board and see if that doesn't help at all.

Hello !

Any news about your problem ?
I have exactly the same, I open a new topic about that…

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.