You are on page 1of 1

Home Shop Geting Started Blog Downloads Members Videos Forum

1 Log In

Arduino Components -  Max7219 & 7 Segment Displays

Wiring And Basic Tutorial for Mobiflight & Prosim using Ardunio Mega
Top of Page
General
Wiring 7 segment displays (MAX7219 boards) to Mobiflight & Prosim can be a little taxing at times. However, 7
Daisy Chain Reliabilty
segment displays play a very important part in the sim and make various panels come to life. At the start I was
Which Max7219 Board?
fascinated by them. It took a little while to get my head around how you could have so many led segments light
Purchasing Displays up using just 5 pins.  I had each 7 segment display using 3 pins each of the Arduino. At that rate, it would have
Displays with external power needed a lot of interface cards. I soon learned that the 7 segment displays could be daisy chained and up to 8
Wiring 3 & 5 Digit Displays units (Mobiflight limit for daisy chaining) can be controlled by just 3 pins on the Arduino. 
Wiring Multiple LED's
iring Single Digit Displays

7 Segment Display - General


The first thing you need to know about standard 7 segment displays
from eBay or other providers that come with the attached PCB is
that they are driven by a MAX7219 chip at 5VDC. The displays are
normally Common Cathode! 7 Segment
colour

To view thisDuring
content,my
click reload.
prototyping
and my build of version 1
SIM, I was not bothered
about the colour of the
LED segments, as this
was just a prototype to
see if i could get it to
work. It was more a
matter of getting it done
cheaply and effectively.
 
Red is the most common
  colour and readily
This is important if you want to connect different size/amount of segments or colour of segments to the boards.If available. It also appears
you want to change the colour/size/amount of digits you will need to purchase these from eBay or elsewhere to be the cheapest. Red
seperately and wire them to the boards instead of the two, 4 digit-seven segments. usually comes with the
Max7219 Boards. As time
progressed, I discovered
I have had a few people state that, "they are running up to 30 max 7219 boards direct off there Arduino Mega
other colours. Blue,
Board". However, from my personal experience and a lot of testing. I can only get a max of 6 working in one daisy chain Yellow/Amber & white,
and that nearly pulls the maximum allowable current from the Ardunio. Running all those LED’s, 7 segment display’s and depending on your
encoders, I have found is just too much for the Arduino mega on the current draw. preference. I now have a
blue MCP, but also have
When i first tackled this hurdle, I connected as many boards in daisy chain to minimise pin usage, but strange the option of yellow as I
things started to happen, I would turn an encoder and the whole unit would switch off and restart. Very annoying at bought multiple colours,
best. The other fault was that the 7 segment displays started to indicate gibberish. This was all fixed by wiring the recently.
encoders and 7 segment displays to an external 5v power source. 

7 Segment Display - Daisy Chain Realiabilty


After several weeks of testing every combination possible, I came to the conclusion that the more modules you
daisy chain together, the less reliable they become. This is regardless, if you are powering from the Ardunio direct
or external power source.
 
Here are my current recommendations for Daisy Chaining 7 Segment displays:

Which Max7219 Board?


Predominately, there are three different types available on
eBay. They are colour coded by PCB. 

A green PCB normally has detachable displays, and comes


with attaching hardware. This is great for ease of removal so
you can then change the size or color as required.
 
This also allows you to place the two halves (4 digit
displays) anywhere you like. These are my preferred type.

The Blue backed PCB's are great when you have a narrow
space top and bottom. But the displays will need to be
removed with a heat gun.

The Red backed PCB's are great for applications where


space at the ends is a priority. They have the shortest width.
Again, if you want to separate the displays you will require a
heat gun.

Purchasing Max7219 Boards


When buying from eBay I tried several variants from eBay.
This is where I learned the quality really does depend on Here’s some tips on buying the right
who you buy from. Make no mistake, I went cheap from MAX7219:-
china and it took several attempts to find the right one.
 
The biggest problem I found, was that they worked fine
•Ensure it has 5 pins at both ends to allow daisy
individually, but some just refused to daisy chain. Push on
chaining.
the PCB and it would work fine. Release the pressure and
utter disaster. Some just decided they would rather heat  
up and burn out. •Look for the units that have the display units with
sockets rather than soldered (usually the PCB is
Once I found the right supplier of MAX7219, I bought in coloured green). This will allow you to split the
bulk, 20 in fact, at an incredibly cheap price and free displays and place them where ever you want by
shipping. Your going to need plenty of these when you full using additional wiring.
on, From MCP to radios and other panels. It also means
you have spare for when you find an unserviceable one. •Its great when you also find the ones that come
with the PCB mounting screws and stand offs
included.

7 Segment Wiring - Using Ardunio Power


There are generally 5 input pins and 5 output pins on each board. The 5v VCC must be connected in parallel to
each board and not daisy chained through the board itself, like the other pins. This VCC line has a diode fitted and
will reduce the voltage through each board until it stopps working.

The ground can be daisy chained but I prefer to wire in parallel like the VCC.

The next 3 input pins (DIN,CS,CLK) can be daisy chained through the board by using the same output pins, as
shown below.

7 Segment Wiring - Using External Power


Wiring the MAX7219, 7 segments displays boards to an
external power supply helps reduce the current draw on the
Arduino.

As you can see from the diagrams, the 5v VCC line is


connected in parallel to all 3, 7219 PCB's.

The GND line in also connected in parallel and also


connected to the Arduino.

The data pins are then daisy chained as normal.

Test, Test
& Test
Again!

Test, Test & Test


Again!
COMMON GROUND Always test your 7
Please Note: You must connect the ground cable segments in the
from the 7 segment boards, the external power configuration your
supply and the Ardunio board for everything to going to use before
putting them into
work.
anything. This
includes the length or
the cables, the
amount you wish to
daisy chain. Are you
still having problems
with strange digits
after all this? One final
thing to check is the
power at the last 7
segment unit. Ensure
its at 5V. If not adjust
your power supply
until it reads 5V.
“CAREFULLY!”

MAX7219 - WIRING 3 & 5 DIGIT DISPLAYS


Letters
As stated before, you dont have to stick with 4 & 4 displays. You can have any combination:
A to G 7 DP

3 & 5 Digits You can connect the


2,2,2,2 (4 sets of 2 digits) letters A-G & DP from
4,2,2 (one four digit and 2, 2 digit displays) one side of the max
6 Digit Display, etc. board  by daisy
chaining them to the 3
& 5 digit dispalys. You
Below is how to wire up a 3 & 5 Digit display to the MAX7219 board to be controlled by the Ardunio and Mobiflight.
do not need to
The first diagram are the pin allocation of the MAX7219 Boards. (D#=Digit Common Cathode Number one to eight, connect wires from
the letters represent the segment letter) the right to the 3 digit
display, and the wires
from the left side of
board to the 5 digit
display. They are
common or
connected together!

Please note!
YOU CAN NOT
DAISY CHAIN  THE
D1 TO D8 COMMON
CATHODES!

3 DIGIT, 7 SEGMENT DISPLAY, Picture, Segment diagram and pin layout.

Daisy
Chained
Grounds
5 DIGIT, 7 SEGMENT DISPLAY, Picture, Segment diagram and pin layout.
There are only 3 or 4
grounds on the Arduino
Mega to connect all your
devices too.

Sometimes its easier to


connect all the grounds
in daisy chain
configuration. Linking
devices to one and
another using a single
ground back the Arduino
Mega.

Another way would be to


used a break out board
Converting a 4 & 4 digit display to a 3 & 5 Digit Display WD with a common ground
connected line.

But by daisy
chaining grounds, the
wiring loom can reduced
drastically.

MAX7219 - WIRING 3 & 5 DIGIT DISPLAYS


Up to 50 switches can then be added. I have shown only two switches to help keep the diagrams simple. But the
principle is the same. You can see how the ground is simply daisy chained. This is to keep the wiring back to the
Arduino to a minimal amount. The looms already can get quite big in size with 52 wires.

MAX7219 - WIRING OTHER DIGIT DISPLAYS


Wiring Diagram for replacing a 4 digit display to four, single digit displays.

Seen an error?
Want something changed?
Need Get
extra help?
In Touch>

Fancy helping the website


or buying us a thank you
beer?

+673 7207616 EMAIL: HelenWatersClarke@Hotmail.com

You might also like