After all the kits are completed, they are connected together to the Arduino board as shown (LED matrices not installed for better view).



Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances.



With an SPI connection there is always one master device (usually a microcontroller) which controls the peripheral devices. Typically there are three lines common to all the devices:



• MISO (Master In Slave Out) - The Slave line for sending data to the master,

• MOSI (Master Out Slave In) - The Master line for sending data to the peripherals,

• SCK (Serial Clock) - The clock pulses which synchronize data transmission generated by the master

and

• SS (Slave Select) - the pin on each device that the master can use to enable and disable specific devices.





On Arduino Duemilanove/Uno and compatible boards such as the Nano the pins used are:

MOSI - 11 or ICPS 4

MISO - 12 or ICPS 1

SCK - 13 or ICPS 3

SS - 10. You can use other digital pins, but 10 is generally used as it is next to the other SPI pins.

On Arduino Mega1280/2560 the pins are:

MOSI - 51 or ICPS 4

MISO - 50 or ICPS 1

SCK - 52 or ICPS 3

SS - 53.

On Arduino Leonardo, the SPI pins are on the ICSP header pins:

MOSI - ICSP 4

MISO - ICPS 1

SCK - ICPS 3



Note that MISO, MOSI, and SCK are available in a consistent physical location on the ICSP header of Arduino boards.





The MAX7219 ICs used on the LED Matrix Driver Module does not fully support the standard SPI protocol. However, it is able to work with the Arduino software and libraries.



Using SPI for the interface between Arduino board and the display allows the entire display to be controlled with only 3 microcontroller I/O lines. Here, we use an Arduino Nano board to drive the display. You may instead use any other Arduino boards as long as the connections to the SPI lines are connected correctly.



Here, the Arduino Nano acts as a master and the display as a slave. As our display will not be sending any data to the master, there is no need to connect the MISO line. So the connections between the Arduino Nano and the displays are MOSI (Pin 11), SCK (Pin 13) and SS (Pin 10) at the Arduino side and Din, CLK and Load pins at the LED Matrix Driver Module respectively.



A HC-05 Bluetooth Wireless Serial Port Module is connected to the TX and RX pin of the Arduino Nano for Bluetooth communications between the display and the Android Smart Phone. The HC-05 module is configurable to operate in master or slave mode but is typically shipped to operate in slave mode which is the mode we need here. This Bluetooth Wireless Serial Port Module is not expensive, easy to work with and is quite easily available from online shops. You may instead use any Bluetooth Wireless Serial Port Modules you are familiar with.



Note that we employed a simple voltage level shift circuit (2Kohms and 1Kohms resistor) between the Arduino Tx pin and the HC-05 Rx pin as our Arduino is running at 5V and our HC-05 Rx pin is supposed to work at the 3.3V level.



Note the use of 10Kohms pull-down resistors on the DATA IN, CLK and LOAD input pins. When power is first applied to the micro-controller or when they are reset, their I/O lines float. The MAX7219 can see this as valid data and display garbage until the micro-controller gains control. The pull-down resistors prevent these problems. To reduce the part count for this project, you may try without the 10Kohms pull-down resistors for the DATA IN and CLK input lines.