Go Down

Topic: troubleshoot max7219 - Solved (Read 705 times) previous topic - next topic

poppy381

Hello

I've bought some Max7219 china copy. Everything was working on breadboard with my dual digit 7 segments display and USB arduino powering.

Then I've ordered several pcb and something was wrong with max7219 on some circuits. Sometimes the displays was not working. here is what happened :

The case I want it works :
- Powering pcb with external 9V 200mA.
What happen :
- Dual digit blink one time at startup very shortly, then nothing lights.

- I've checked my Eagle files -> Good
- I've tried with USB power from the arduino -> The digit works
- I've try with a 200mA then 500mA 9V external power supply -> Nothing change
- I've try changing Capacitor -> Nothing change (I use a 220µF on orignial circuit + 0.1µF ceramic)
- I've create a loop code to wake up Max7219 each seconds -> Only one digit works after startup and the brightness setting doens't seems to work because Leds are very luminous.

Well at this time I think that my Max7219 are crap and I just want to buy original max...

Then I check again the Resistor Rset from the datasheet. I have a dual digit.
It said :

If the scan-limit register is set for three digits or less,
individual digit drivers will dissipate excessive amounts
of power. Consequently, the value of the RSET resistor
must be adjusted according to the number of digits displayed,
to limit individual digit driver power dissipation.

For 2 digits displayed, max segment current Iseg is 20mA


According the Rset table.
For a Iseg 20mA, Rset is 22.6 from 29.8 kOhms (depending on VLed).
For a Iseg 10mA, Rset is 51.2 from 66.7 kOhms (depending on VLed).

- On my circuit, i puted a 22kOhms : That's why my circuit fails sometimes, I've just increase to 100k to check (that was the closest I have in stock), and the max7219 works fine now everytime.

Let's go deeper

- According to datasheet of 5261AS dual digit 7 segments :
Recommended Operating current per segment : 12mA
VLed : min:1,7V Typ:1,8Vto Max:2V

So According to the Rset datasheet table I should use a Resistor between 28k and 63k

Hope it will help someone. And As I've always read on this forum, I can't better suggest to anyone like me to read better datasheets.... :)



poppy381

#1
Nov 24, 2017, 06:55 pm Last Edit: Nov 28, 2017, 06:11 pm by poppy381
Another troubleshoot :

my EEPROM had problems, on statup some value changed randomly. Wow !!!

I've send a minimal program to arduino (only eeprom writing on a program, then another only reading) and check changing at startup -> Yes EEPROM was changing randomly at startup (plug/unplug USB cable) with random values in random EEPROM addresses.

Then I've putted my Nano off the board : everything was working fine.

I've find the guilty after removing MAX from the board : oversized Capacitor (220µF instead of 10µF) caused a voltage drop when shut down the arduino, which causes a writing problem in the EEPROM (https://forum.arduino.cc/index.php?topic=475679.0).

5V was coming from 5V Nano pin.

Don't know if it helps someone but I've spent some time on it so it's cool to share it and help a hobbyist like me.

Edit : In fact I think there is a better option :  put a diode in 5V output Arduino to avoid Capacitor to became a power source when shut down

poppy381

In fact I think there is a better option :  put a diode in 5V output Arduino to avoid Capacitor to became a power source when shut down.

What do you think about this idea ?

poppy381

I'm actually changing this idea to set BOD electric protection from doing antything when power shut down like writing EEPOM or strange behavior.

You must burn new bootloader to set nano.bootloader.extended_fuses=0xFC (BOD at 4,5V)

I'm on it and will check if it works :)

Go Up