So I have a custom PCB, which I'm 100% sure is working. there are 7 segment digits on the pcb but they aren't turning on.
With my multimeter I discoverd that the voltage between CLK (yellow) and GND (black) is 0.1mV while CS (white) and GND is 5 and so is DIN (orange) and GND. Any idea what I'm doing wrong? The 5v is directly connected to external power supply and the GND is connected to the Arduino GND (so is the power supply ground)
#max7219 problem. Not turning on.
1 messages · Page 1 of 1 (latest)
without any information on your pcb it is quite impossible to say anything else than check that your DIN/CS/CLK are in the right order.
what is your reasoning to be 100% sure that your PCB is working?
How high are the voltages between signal lines and ground respectively when the wires aren't connected to the arduino? Measure both in the arduino side and the PCB side for fault isolation...
Does the PCB work for you if you upload an arduino sample sketch for MAX7219 from the arduino IDE?
CS is always at 5V while the arduino isn't communicating data to the chip, so that is normal. The 5V comes from the arduino pin so with the PCB signal wires disconnected from the arduino, CS should be at 0V on the PCB.
CLK is pulsed between 0V and 5V while the arduino is communicating. These pulses are very short, so it is unlikely your multimeter will ever pick up a signal. CLK should be 0V on the PCB with the signal lines disconnected.
DIN changes between 0V and 5V while the arduino is communicating data to the chip. I'm not sure whether DIN goes to 0V when communication is finished or is left in the last state it was during communication. DIN should be 0V on the PCB when the signal lines are disconnected from the arduino.
If you upload a schematic of your PCB circuit as well as a board layout, someone might spot something worth looking into.
Is it possible there's a fault CLK or DIN connection in the white connector?
Because 2 weeks ago it was working
This are my measurements with the DIN, CLK and CS disconnected from the arduino:
GND power supply- DIN pcb: ~0.7V
GND power supply - CLK pcb: ~0.7V
GND power supply - CS pcb: ~0.7V
GND pcb - DIN pcb: 1V
GND pcb - CLK pcb: 1V
GND pcb - CS pcb: 1V
GND power supply - GND pcb: 0.3mV
GND power supply - VCC pcb: 5.06V
To sum up what we know @proud fossil :
-PCB has worked before,
-no apparent short circuit on the pcb
-mobiflight seems correctly configured
I think the wiring is what stands out as an unknown right now? maybe the connector isn't making a good connection?
Assuming the wire colors in your setup represent what you've stated they are... any chance the order is incorrect (as @onyx dust has already asked, I know 🙈 )
Or maybe the pins you've inserted into the arduino's pin sockets aren't making good connections?
From left to right, the order must be 5V, GND, CS, CLK, DIN which translates to red, black, white, yellow, orange
A15 = orange
A13 = yellow
A11 = white
so
A15 = DIN
A13 = CLK
A11 = CS
what has changed since you had it working?
The mobiflight configuration and the arduino pins
I'm using the same white connector
I already placed it in the old arduino pins
will try again
The only other thing I can think of trying is reducing the speed of the communication.
I've had devices stop working when the speed was too high.
In the general settings tab, slide the ''Config Execution Speed'' slider all the way to the left and test again.
Okay I got something going on right now
I placed it in the "old" arduino pins and in Mobiflight selected 1 num of MAX7219 in stead of 2
Still strange because 1 MAX7219 controls the upper digits and the other the lower digits
That's progress!
What happens when you change Num back to 2?
Huh
I just closed the "test" tab of mobiflight, opened it again and pressed "test" again but now it isn't turning on
I didn't change anything at all
From the pictures you posted, one MAX7219seems to control three sections (I'm guessing DC Amps,DC Voltsand AC Amps
The other controls two sections?
No, I'm pretty sure one MAX7219 controlls the DC AMPS and CPS FREQ (upper part) and the other one controls DC VOLTS, AC AMPS, AC VOLTS (lower part)
But it seems like we're back at the beginning because it's not turning on again
Okay never mind it is again
Okay and off again
I didn't even press stop
It just turned off?
Yeah when I went to my computer in my other room to update you
I said it is turning on again
Then I went back to the other room and it was off
I reopend Mobiflight and pressed "test", now it's on again
HUH
What the hell is happening hahaha
It was on like this when I pressed "test"
Then I pressed "stop" and it was on like this (even tho I pressed "stop")
Okoay great. Now I've changed NUM to 2
Like this
This is working as it should
does Module 1work as well?
My guess is data got shifted out of the first MAX7219 chip and into the second previously, as mobiflight didn't know about the second chip and therefore didn't send NoOpcommands
Well, I unplugged the Arduino and Power Supply, plugged it in again and now it it off again
I only unplugged it😭 😂
Voltage between:
GND - VCC 4.04V
GND - CS 4.8V
GND - CLK 0.1mV
GND - DIN 4.8V
power or wiring
the max needs a restart when something goes wrong
I would also see that the chips are well pushed into their sockets and there are no bad connections
so if it behaves erratic, you need to stop and start in MF
GND of power supply and DIN, CLK, CS on pcb
How to?
At 4.04V you're operating your MAX7219 chip awfully close to its lower limit
Reset the Arduino, mobiflight automatically restarts the MAX7219 chip
I don't know why it's 4.04V, an hour ago it was 5.1V and I didn't change power supply/wiring
By pressing the restart button on the arduino? With everything connected to arduino/power supply/MAX7219?
My guess is that the voltage drops when the segments are lit. Your power supply wire may be too thin?
Either that or unplug the USB cable, whatever is easier
It's still the same wiring/power supply as 2 weeks ago..
Will try
Again, it is at the low end... the MAX7219 is very sensitive to voltage in my experience. Small fluctuations mess it up. Being so close to the voltage threshold might work one day and not the next
are the wires long? Did you change anything else in the setup compared to when it was working?
I mean even before attaching a capacitor etc, its like we need to find the leaking water pipe before installing a bigger water pump
What all is connected to the power supply? Is it near its rated current with everything turned on? Is the white connector making good contact on the VCC pin?
Measure VCC on the PCB with the arduino not doing anything (disconnected) and with no segments lit up
Then measure with as many segments lit as you can achieve
I think I might have been thinking down the wrong rabbit hole when I said signal integrity. This is starting to sound like more of a power supply issue altogether
you can test by setting the brightness to lowest in the pin config
and see if that makes a difference
then test again with setting it to brightest and displaying 8.8.8.8.8.8.8.8.
it should fall over if it is a power problem
I unplugged the USB of the arduino and plugged it in again.
I opened Mobiflight, went to the LedModule, NUM was 1, I tested it with "12345678" and it was still off.
I measured the voltage and it was 5.08V between GND and 5V of power supply
I edited in MobiFlight NUM to 2, tested it with "12345678" and they all turned perfectly on
Then I SELECTED num 2 in the test panel, tested it with "12345678" and they also turned on
hmm
try setting the brightness to lowest
and see if it works better
that will tell you if it is power related
no, in pin config
yea the wiring is likely correct, unless there is a flaky joint and it disconnects at times
but open the pin config
and set the brightness to lowest
What do I check now?
If the digits are less bright now?
They are less bright indeed, but they also seem to work the same as when they're more bright
that if they work better
they should be less bright of course
but it will consume less power
so if the problem is the power it will work better
and if you then crank up the brightness to max, it should work a lot worse
this is just the "rule out things" troubleshooting that works with everything
So everything was working good (also when bright)
Then I unplugged Arduino and power supply
Then I plugged it in again
Measured voltage and it was 4.04V
7 Segments didn't turn on
I set MAX7219 to most dimmed
Measured voltage again, 3.6V
7 Segments were turned on
So yeah it seems like a power issue, but it's still a question for me why sometimes it gives full 5V and sometimes around 4V
Because the power supply is an original Samsung 5V 2A
And I haven't had this experience with 30 shift registers which all require 5V too
yeah, maybe test the power supply with just the multimeter connected? remove everything else from the circuit and see if that still changes the voltage
or if it works unloaded (very likely) maybe put some load on it that is just using current steadily, like a 5V led strip, or a lamp, or a fan or something
It sounds like the power supply might either be defective or undicided, whether something is connected at all? I think it might be the culprit in all of this.
If possible, I would recommend a different power supply. I personally use an old ATX power supply which can be found used for no more than 10€ or equivalent in other currencies. They're quite reliable, much more so than phone chargers. They do not require voltage negotiation circuitry and they are very easy to "hack". Also, they make 3.3V, 5V and 12V available, all in one device with absolute heaps of current provided. A simple 400W power supply should be able to take care of your entire cockpit (unless you have motorized controls, those require an additional supply!) All that is required to turn them on and off is a single toggle switch or latching button. Instructions can be found online. It really is only a matter of shorting a single connection to ground.