MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
pmasters
Posts: 2
Hi - sorry, from what I can see, this is a well-trodden topic. I've read what I can to find out if I'm doing this right on both this and the arduino forums, but I'm running out of ideas. Basically the displays are completely unreliable, and drop out or show garbage regularly. Some displays are better that others, but others will only work for 30 seconds before going blank.

In my current setup, I'm trying to run a homemade 737 MCP panel. "Behind the scenes" this is 2 arduino (Mega 2560) boards running a number of switches and LEDs (all switches just route an arduino pin to ground, and LEDs each run through 100ohm resistors and then to ground), as well as 4 x Max7219 blue 7-seg display boards. I must have bought over 20 of these boards from various suppliers on ebay and amazon, but I cannot get anything to stay reliable and I'm tearing my hair out. I have a reasonable if not great electronics background, and I'm a software developer by trade so I know my way around the arduino software side.

The 7segment displays are all powered in parallel from a 6v, 2.1amp mains DC supply (I tried various 5v supplies, but up'd to 6v to see if that helped with any voltage drops). The ground from that also goes to the arduino ground (i.e. yes, I've read the forums). As these were never reliable, I've barely even attempted to daisy chain these, so at the moment all 4 7-seg displays have their data lines (DIN, CS and CLK) fed directly from dedicated arduino pins.



I tried writing some straight arduino code which initialises the boards and then sends '11111111', '22222222','33333333' etc to each display every second. I then swapped in and out lots of the displays (like I say, I have a pile of them...) to see if I could get a reliable set. Even with what I thought was a reasonably beefy DC supply, you can see a drop in reliability if I add displays (going from 1 up to 4). I don't think its the voltage of the arduino data lines as I set up another arduino as a primitive oscilloscope and the voltages looked good (and I even managed to decode the wire format and check it was sending the right signals - go me!).

I would write this method of running displays off as totally unreliable, but I can't help thinking that many people seem to have built MCPs and indeed entire cockpits from this type of setup, so I'm still assuming it will work, but I'm clearly missing something. 4 x 7-segment displays can't be beyond the wit of man surely?!

Help me Obi-mobiflight, you're my only hope!
2022-12-21 11:56
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hello pmasters,

First of all: Welcome to MobiFlight!

You can be on the safe side by supplying the MAX7219 PCBs with their own voltage. One problem I see is the 6V you are using. According to the data sheet, the MAX7219 can handle a maximum of 5.5V. Your luck is that if you use the Chinese MAX PCBs, these PCBs have a reverse polarity protection diode, otherwise you would have already destroyed your MAX7219. The protective function has a second effect, because since it is a silicon diode, it takes 0.7V of your operating voltage away, so that only 5.3V arrive at your MAX chips. If your voltage fluctuates because it is not stabilized, it is quite possible that the 5.5V will be exceeded. In this respect you should try to reduce the 6V to 5V. The MAX chips then only work with 4.3V, but need a minimum of 4.0V, i.e. sufficient voltage.
According to your schematic, you also put the 6V directly to each MAX chip, giving all MAX modules the same voltage. This diode means that in a daisy chain of the modules, too little voltage arrives at the 2nd module (5V-0.7V=4.3V - 1st MAX, 4.3V-0.7V=3.6V - 2. MAX - voltage below 4V, malfunction!)
What you should try to do is get a display working properly first. If you have, plug a module into an empty Mega, put firmware on it, set up a device and then see how it works. In the worst case, you will get 8.8.8.8.8.8.8.8. displayed. The MAX7219 is very sensitive on the 3 data lines and gets out of a rut even with the smallest interruptions. If the display stays dark, that's not bad at all. If you click on the Display tab in MF and there the Test button and you get 12345678 then you are on the right track.
Now define the output, set the offset and then you should get the correct values displayed. To check, you can look on the MF main screen in the Output tab on the right side, there is the "Flight Sim Value" column and next to it the "Output Value" column. Here you can already see what it should show without the display If that still matches the display, you've reached your goal.
Now test the other 3 modules in the same way. If they all work satisfactorily, you can dare to build them up as a daisy chain. You would then only have used 3 instead of 12 pins for the display. I myself operate a total of 14 displays with 5 digits each in 2 daisy chains (1 x 8 modules and 1 x 6 modules), which have been working error-free for more than 2 years.
I wish you the same with your displays.
If, contrary to expectations, you are not successful, you can contact me on Discord. There we can then tackle the problem directly with a split screen. This is much faster than if we exchange texts here.
Please tell us about your experiences here.
Grüße,
Stephan (Time: UTC+2)
2022-12-22 00:11
Avatar
pmasters
Posts: 2
Hi Stephan,

I think you were on the money there! I managed to spend a load of time this morning building the setup again away from everything else, and I managed to track down the problem based on what you said. I think it was a combination of issues, but the main one was the power. I found a 5v (1.5a) regulator so I used that with a 12v DC supply (it needed more than 7v to work, which might explain why plugging it into the 6v supply didn't work). I plugged that into the circuit and checked with a multimeter that everything had 5v and boom, it started to work. I still found a bad 3-line data cable and a bad display, but I've swapped things out now and I think we're fully working again.

Thank you very much for your help - I wish I'd done this before, but it's quite a relief to have this working and be able to use it for flying again now!

Happy Christmas!, Peter
2022-12-22 16:30
Avatar
StephanHo
Moderator
From: EDDG, Germany
Posts: 1867
Supporter
Hi Peter,

fine if it works now!
Grüße,
Stephan (Time: UTC+2)
2022-12-25 12:42
icon