Analog read jump while tm-1637 connected

Hi, I have arduino nano, potentiometer 10К and TM-1637 indicator module.

While indicator connected, analog read very jump 492 493 494 505 492 492 477 494 501 492.
If disconnect indicator - 492 492 492 492 492 492 491, values +- same.

Code simple:
long frequencyPotentiometerValue = 0;
frequencyPotentiometerValue = analogRead(FREQUENCY_IN_PIN);

I measure potentiometer voltage, it little lower when indicator connected. But with multimeter i don't see some voltage jumps.

I don't undersatand why. Is this ok for analog read jump so much?

In my opinion, this difference is due to interference caused by the TM1637 driver. With DMM, I don't think you'll see them because they're fast and short. If you have an oscilloscope it will help. Connect the wires of the TM1637 driver and the driver itself away from the potentiometer and you can add a small capacitor to the analog pin (ceramic capacitor from the analog pin to ground) connected to the potentiometer to filter these ripples. Maybe that will help.

And try a, say, 10uF cap across the power supply to the display to help smooth the power fluctuations when the number of lit segments change.

Ok, thanks.
I don't understand capacitors yet, will learn and try.

See this site for example.

Also you can decouple the analog reading better from the supply, by selecting the internal reference voltage.

...and... since it's just a potentiometer setting, you could just low pass filter the readings in software...

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