Maker Pro
Maker Pro

Max7219 is making a lot of noise

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
Hello all :)
Working again on the MAX7219chip to control 4 7-seg displays. I'm using an ESP8266, and as the MAX7219 is not CMOS compatible, I'm also using a level shifter (bought on the Internet, somewhere)

The ESP8266 is controlling the max7219 using the SPI at a frequency of 100 kHz (through the level shifter, which is largely fast enough at this frequency), and is now just enabling the test mode during startup.

However, doing measurements, I noticed that the MAX7219 is creating a LOT of noise in the clock, chip select and data in pins (and possibly the LED driving pins, but I didn't measure them). See this capture:

1664544004081.png

Yellow is CS, purple is clock and blue is data. At this capture, nothing is sent through the SPI interface. If I unplug the CS wire on the max7219 side, the noise completely disappear. I tried adding a decoupling cap at the CS pin, and the square noise became wavy noise, but still noise. the cap is a ceramic 20nF. If I put the same capacitor at the Vcc pin of the MAX7219, the noise stays the same.

I guess that my capacitor is not... capacitive enough, and I just could try different ones here, but I prefer to be able to compute which one to use, so next time I can fix noise faster without having to try several capacitors.

I will then ask 2 questions here:
- why adding a capacitor at Vcc does not fix the problem at all?
- how do I compute which capacitance I need using this capture ? the smallest squares are 5 µs long (200Khz frequency), and the amplitude is about 1.04V (I would say 1V) according to my cursors.
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
If I put a 0.1µF capacitor at the clk pin, I get waves. At the data pin, nothing changes. I don't get it at all...
 

bertus

Moderator
Nov 8, 2019
2,792
Joined
Nov 8, 2019
Messages
2,792
Hello,

Can you post a schematic?

Bertus
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
Hello :) I can do that, but this will take some time, I've no schemtic on hand right now.
Here is what I get when I try to send additional data through SPI :

1664551066976.png

The noise make some clock pulses too low to be detected by the MAX chip. My oscilloscope correctly decodes the signal (trying to write 348 on the display), but the chip behaves randomly at each try. I need to fix that noise. I'll post a schematic as soon as I have one done.
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
Here is a quick schematic of my breadbord montage:

1664552457074.png

Note that I didn't find symbols / footprints for the level shifter I use (cheap one from aliexpress) and the 4 digits display. The 4 digits display has the same pinout anyways, and the level shifter I use does not have the OE pin.
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
if I add a 33 µF polarized cap at each pin (clk etc), I get no noise at all, but of course I cannot drive these pins from the ESP8266 anymore
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
Had a look at the datasheet and other links on how to decouple the MAX chip. I found out somewhere that both GND pins shall be put to ground... and noticed that I did that for none of them *facepalm*. Both GND pins are now connected to ground, and noise is greatly reduced. I found elsewhere a pair of 0.1 µF and 10 µF capacitors may be good enough. I tried with 2 polarized capacitors, and the rest of the noise is bit reduced, indeed. Not much, because I cannot put the capacitors close to the Vcc pin (no more room on the breadboard). Also, I read that the MAX chip must be as close as possible with the 4 digits display. I'm using dupont wires, so they are further than can be possibly done.

I feel so stupid, thanks for your time.
 

bertus

Moderator
Nov 8, 2019
2,792
Joined
Nov 8, 2019
Messages
2,792
Hello,

Do you have decoupling capacitors on the power lines near each chip?
Read this thread on All About Circuits for more info:

Bertus
 

@[email protected]@me

Dec 15, 2016
81
Joined
Dec 15, 2016
Messages
81
The ESP8266 is on a dev board, with everything already here. The level converter is not a chip and does not need decoupling / bypassing capacitor. The MAX chip needs a 10µF electrolytic and a 0.1µF ceramic capacitors for decoupling & bypassing, as the datasheet states (didn't find the piece of information at first, but it's there). Anyways, my problem was due to the fact that the ground pins where not connected to ground. It now works correctly with little noise on the breadboard (didn't add the capacitors, it does not need them for now).

Thanks for your help Bertus :)
 

danadak

Feb 19, 2021
271
Joined
Feb 19, 2021
Messages
271
Not all caps perform equally as bypass for the same capacitance, eg. ESR
specs. Polymer tants best for bulk, and your LEDs causing lots of current
noise. paralleled with ceramics for high freq suppression as well.

1664751984189.png

OS-CON is polymer tant.....


Regards, Dana.
 
Top