Potentiometer Ground Noise With MAX7219

Hi all,

First post :tada:. I would really appreciate some wisdom here, as I'm more of a programmer than an electrical engineer, so I'm a bit out of my depth with this issue.

I'm making a little USB midi device using the Sparkfun Pro Micro, which is pretty similar to the Arduino micro (both use the ATmega32U4 and have a USB port). More data here.

Here is the wiring diagram I'm following (I'd post an image but the forum limits me to one as I'm new).

So far without the LED module it works very well, I can post the code but it's long, unfinished, and I don't think it has much bearing on this issue. Everything shows what it's supposed to show, a pot at max shows 1024, at min shows 0. Nice solid numbers.

Now when I plug in the MAX7219 board, the LEDs light up fine and how they should, however, I get a bunch of noise on my four 10k pots, between 0-15ish difference on the scale from 0-1024, at any point between min and max on the pot.


The above is simply Serial.print(analogRead(A0));, and without the MAX7219 connected it shows a solid 0. With the LEDs attached and lit, hairy noise.

To combat this it tried different combinations of the two available outputs from the Pro Micro, one being RAW and the other VCC, both 5v. Moving the pots to RAW and keeping the LEDs on VCC fixed the problem at one end, all the pots now show a pretty solid 1024 when at max, but still have noise at the other end (min, same as shown above). So I assume it's now a grounding issue, with the max spitting some voltage into the ground or the like (yes, I still have a lot to learn about circuits. I'm getting there.)

The problem is definitely worse when the MAX7219 is drawing more power, with all LEDs lit at max brightness vs none.

I've also noted that the documentation for the MAX7219 has instructions to include two capacitors and a resistor as part of the wiring diagram, which this component seems to have built in under the LED matrix, though I can't read the values.

I know I could use filtering via code, but I'd really love to fix it on the hardware end for more stability and precision.

Any suggestions on how to filter out this noise? Happy to provide any follow-up info if I've missed something.

I'd fix that first.

1 Like

Use Vcc for the power to the pots. Try a 0.1uF (or more) cap from each of the wipers to ground to lessen the noise picked up by the pots.

1 Like

Ah, typo, 1023 =)

I'll pick up some tomorrow and give that a try, thank you for the advice.

Edit: is there any way to address the root of the issue, noise caused by the LED module?

You could try a 100uF to 1000uF cap across the power supply to the MAX7219. That may help to smooth out the voltage as the current demands of the LED matrix change. If that does not help, you may need an external supply that is capable of more current.

1 Like

I'll pick up some of those as well and see what happens, thank you.

Can you post the circuit now?

1 Like

I won't go to a website where you have to click to agree to terms.

I assume you use a breadboard.
A pot needs it own supply (5volt) wire and ground wire to the Arduino (not shared).
If you share those wires (ground in this case) with other users (MAX7219), then you got this problem.

What a peculiar suggestion? :roll_eyes:

If he is supplying some sort of voltage to "RAW" and connecting a MAX7219 to the "5V" pin instead of an adequate regulated 5 V supply, then that is obviously the problem. :astonished:

Reference to "RAW" - always the big clue to the problem :grin:

Can you please post an image of your project so we can see your component layout?

It sounds like you have some power supply and/or ground problems.

A copy of your circuit would be appreciated, an image of a drawn schematic would be okay.

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

1 Like

Hi all,

Here's the drawing if you don't want to visit the link above:

The pins aren't exactly the same as the site for the above drawing as I'm using a Sparkfun Pro Micro instead of the Arduino Micro, but the setup is nearly identical.

I'm fairly certain it's both power and ground issues as when I separate the pots and the LEDs on the power end (Pots on RAW, LEDs on VCC), I get a clear signal from one 'end' of the pot (a stable 1023, but not a stable 0).

Hi Paul. The project is powered by the USB input, and the components were all initially powered by the VCC pin, when this problem was discovered. I've made use of the RAW pin, a separate pin that serves as a 4.8V power output (unregulated I assume) when the board is powered via USB, as a troubleshooting step to separate the power going to the pots and the LEDs to see if the power side was the issue.

Ultimately I'd like to power everything from the regulated VCC pin, once I can clean up both sides from the noise caused by the LED array.

Hi Wawa. Yes, you bring up a good point which I forgot to mention. Initially all of the components were grounded on the same breadboard rail. As a part of my troubleshooting process I've since moved the ground for the MAX7219 off of the rail to either of the other two common ground pins on the Pro Micro, to no success.

So the illustration is totally useless then. :roll_eyes:

OK, reference to the actual schematic indicates that for the appropriate 5 V version, the "RAW" pin is bypassed and the "VCC" pin is the actual input from the USB connector via what I gather is a polyfuse.

No point fiddling about with the pins. Forget "RAW" (as you always should :worried:), connect the dis[play to "VCC".

I am wondering what MAX7219 module you are using? It is supposed to include a 10 ยตF capacitor but a 100 ยตF capacitor directly across 5 V and ground on the MAX7219 module will be a good start.

Posts not going to zero is always a pot ground problem.
Did you also move the ultrasonic sensor?
The pots really need their own power/ground to the Arduino. Not shared by anything else.

Read post #11.

Can you please post an image of your project so we can see your component layout?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Two capacitors, one small one big, are required for the MAX7219 if I remember correctly. I can't find any specification for this specific component, I think it's generic. It seems identical to the one in this video.

Under the LEDs I can see one electrolytic cap, one ceramic cap, and a resistor, though I can't tell exactly which without removing the LED display.

Edit: The electrolytic is 25V 10uf.

Bless this mess:

The above diagram will probably be more helpful.

If you want to know the exact pins I'm using for each component I can share a list.

To be clear, when the MAX7219 is disconnected the pots function perfectly. I'll try moving them off the rail as well and report back.

Update: It did not help.