Nano Every ADC reference

Hi.
I have a question concerning the Arduino Nano Every ADC reference.
I have a simple circuit: 10K potentiometer on input pin A1, and a little 9G servo on an output pin.

My problem is jitter on the servo motion only when using the pot as position control.
If I program specific points to move to and hold, the servo works fine.

Only when using the analog input for position control does the servo gets jittery.

I tried different size capacitors on the analog input pin, but that did not help.

I inserted the SimpleKarman filter into the program, and that made a world of difference.
I may leave it at that, but I feel it is a bandaid for the real problem.

I'm thinking of using a resistor from Vcc to the AREF pin with a capacitor tied from AREF to the common and then invoke "analogReference(EXTERNAL)." Is this a viable solution?

Another option.
I read in the forums to wire the AREF to 3.3 volts for less noise.
Would I need to wire my potentiometer to the 3.3 volts also?

Best regards, and stay safe.

How do you power the servo.
I hope externally, not from an Arduino pin (SG-90 is 650mA stall).
Leo..

Hi.
Thanks for your concern.
No, the servo is not being powered up by the IO pin.
The servo jitter only happens when I use a potentiometer tied to an analog input pin.

If I program specific points to move to and hold, the servo works fine.

I think noise is getting in the AREF.

I have gathered up some parts and will be trying a low pass filter on the ARFE soon (minutes from now).

Thanks again for your concern and input.

Best regards.

My low pass filter was a disaster, it went from jittery to jumpy.

That should be AREF.

This is my first post with an attachment, it does not show up in the preview. I hope I got this right.
There is an option to insert a picture, and I see the HTML tags, but no picture is displayed. More to learn....

Based on your description my money is on the pot being the problem. Sounds like noise coming off the pot's wiper. If you have a good meter I would measure the DC voltage at the pot wiper, does it jitter? You are taking a wiper input into a 10 bit ADC and then likely mapping that out in 0 to 255. While it would take a lot of jtter on your analog in I would not rule it out. A dirty wiper, a cheap pot? Merely something to look at.

Ron

Perhaps you're not using star-grounding for the pot and servo wiring?

LaserSteve:
No, the servo is not being powered up by the IO pin.

I understand that, but HOW is it powered.
Hopefully not THROUGH the Arduino (not from any Arduino power pin).
Because that could cause instability of the MCU supply, that could result in the problems you're seeing.

Post a (real) picture of the setup.
On this site, not on Google Drive, which doesn't work.
Read the "How to post" guidelines first.
Leo..

Thanks for all the replies.

Ron, I put an oscilloscope on the wiper of the pot. It looked clean to a few mill volts. I also put some caps on it, just in case.

MarkT, most definitely star wiring.

Wawa: yes, the servo is injecting noise into the system. I'm fairly sure it is affecting the AREF. A separate power supplies is not an option for this project. Other, bigger, and more critical projects with more funds available will have separate power supplies. :slight_smile:

The Karman filter did the trick, and I'll leave it at that.

Best regards to all.