{"id":9331,"date":"2014-10-29T21:05:28","date_gmt":"2014-10-30T01:05:28","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=9331"},"modified":"2016-09-15T22:06:24","modified_gmt":"2016-09-16T02:06:24","slug":"portable-bluetooth-enabled-scrolling-led-matrix-display-part-2","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/","title":{"rendered":"Portable Bluetooth-enabled scrolling LED matrix display- Part 2"},"content":{"rendered":"<p>In <a href=\"http:\/\/embedded-lab.com\/blog\/?p=9255\" target=\"_blank\"><strong>Part 1 of this project<\/strong><\/a>, we described the construction of Easy Matrix, which is a cascadable 8&#215;8 LED matrix display with MAX7219 chip on board. We developed an Arduino sketch for scrolling text display, whereby the Arduino receives text messages from its serial port and displays the message on a 8&#215;40 LED matrix constructed by daisy-chaining five Easy Matrix modules. The Arduino firmware is also capable of receiving user commands for controlling the scrolling speed and brightness level of the display. In this part, we will discuss about extending the project to cascade 8 Easy Matrix modules and control the display over a Bluetooth connection.<\/p>\n<div id=\"attachment_9436\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/reyplaying-2\/\" rel=\"attachment wp-att-9436\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9436\" class=\"size-full wp-image-9436\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ReyPlaying.jpg\" alt=\"My 3 year old son uses this often to learn alphabets and numbers\" width=\"585\" height=\"450\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ReyPlaying.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ReyPlaying-550x423.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9436\" class=\"wp-caption-text\">My 3 year old son loves to watch\u00a0scrolling alphabets and numbers on\u00a0the display<\/p><\/div>\n<p><!--more--><\/p>\n<h3><strong>Power supply and display driver circuits<\/strong><\/h3>\n<p>The 8&#215;84 LED matrix is powered using a LM7805-based 5V regulator circuit with 1.0 Amp current capacity. For the input supply, I am using a 9.6V rechargeable battery pack. A DC wall adapter can also be used as long as it is rated 1.0 Amp or higher. The power supply circuit is very simple and shown below.<\/p>\n<div id=\"attachment_9367\" style=\"width: 573px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/psupply\/\" rel=\"attachment wp-att-9367\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9367\" class=\"size-full wp-image-9367\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/psupply.png\" alt=\"asa\" width=\"563\" height=\"407\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/psupply.png 563w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/psupply-550x397.png 550w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/a><p id=\"caption-attachment-9367\" class=\"wp-caption-text\">Regulated 5V power supply for the display<\/p><\/div>\n<p>For the control circuit, I am using Arduino Nano version because of its smaller size. The following diagram shows the connections between the <a href=\"http:\/\/www.ebay.com\/itm\/Wireless-Bluetooth-RF-Transceiver-Module-serial-RS232-TTL-HC-06-for-Arduino-\/291087805062?pt=LH_DefaultDomain_0&amp;hash=item43c62f6a86\" target=\"_blank\">HC-06 Bluetooth module<\/a>, Arduino Nano, and the LED matrix display. The HC-06 module used in this project is the one with on-board regulator for 3.3V supply. It acts as a bridge between the Arduino serial port and the Bluetooth port on your smartphone. The UART Rx and Tx pins of HC-06 and Arduino are cross-connected through two 2.2K resistors. These resistors allows to update Arduino firmware without disconnecting the HC-06 module. A 6.8K resistor is used to connect the interrupt pin (2) and the Rx pin of Arduino. The Arduino digital pins 11, 13, and 10 are used to drive the input signal lines DIN, Clk, and LOAD, respectively of the MAX7219 chip on the right-most Easy Matrix module in the daisy-chain.<\/p>\n<div id=\"attachment_10194\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/circuit1-4\/\" rel=\"attachment wp-att-10194\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-10194\" class=\"size-medium wp-image-10194\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Circuit11-550x286.jpg\" alt=\"Control circuit\" width=\"550\" height=\"286\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Circuit11-550x286.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Circuit11.jpg 925w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><p id=\"caption-attachment-10194\" class=\"wp-caption-text\">Control circuit<\/p><\/div>\n<p>The following picture shows a complete setup of the power supply and control circuit. Note the male headers shown on left connect to the MAX7219 signal and power lines of the Easy Matrix module.<\/p>\n<div id=\"attachment_9361\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/arduinocircuit\/\" rel=\"attachment wp-att-9361\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9361\" class=\"size-full wp-image-9361\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ArduinoCircuit.jpg\" alt=\"Complete setup of Arduino control circuit and power supply\" width=\"585\" height=\"454\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ArduinoCircuit.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/ArduinoCircuit-550x426.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9361\" class=\"wp-caption-text\">Complete setup of Arduino control circuit and power supply<\/p><\/div>\n<p>The cascade of 8 <strong><a href=\"https:\/\/www.tindie.com\/products\/rajbex\/easy-matrix-a-cascadable-led-matrix-module-kit\/\">Easy Matrix modules<\/a><\/strong> along with the Arduino control circuit are enclosed into a customized box made out of\u00a0furring strip boards from the Home Depot. Two square cuts are made on one side to access to the power supply jack and USB connector.<\/p>\n<div id=\"attachment_9364\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/enclosure1\/\" rel=\"attachment wp-att-9364\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9364\" class=\"size-full wp-image-9364\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure1.jpg\" alt=\"asas\" width=\"585\" height=\"446\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure1.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure1-550x419.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9364\" class=\"wp-caption-text\">Cuts on side to access power supply and USB connectors<\/p><\/div>\n<div id=\"attachment_9365\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/enclosure2\/\" rel=\"attachment wp-att-9365\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9365\" class=\"size-full wp-image-9365\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure2.jpg\" alt=\"asas\" width=\"585\" height=\"176\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure2.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure2-550x165.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9365\" class=\"wp-caption-text\">Complete project inside the enclosure<\/p><\/div>\n<div id=\"attachment_9366\" style=\"width: 595px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/enclosure3\/\" rel=\"attachment wp-att-9366\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9366\" class=\"size-full wp-image-9366\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure3.jpg\" alt=\"asas\" width=\"585\" height=\"136\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure3.jpg 585w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Enclosure3-550x127.jpg 550w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><p id=\"caption-attachment-9366\" class=\"wp-caption-text\">The front side is covered with a transparent red plastic to enhance the visibility of the red LED pixels<\/p><\/div>\n<h3><strong><span style=\"font-size: 0.95em; line-height: 1.6em;\">Bluetooth SPP Pro App<\/span><\/strong><\/h3>\n<p>In this section, we will briefly discuss about the <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=mobi.dzs.android.BLE_SPP_PRO&amp;hl=en\" target=\"_blank\"><strong>Bluetooth SPP Pro App<\/strong><\/a> and its setting to meet the requirements of this project. It is a Bluetooth client communication tool developed by Jerry.Li for Android platform and it allows to transfer data from your smartphone to the HC-06 module in ASCII or HEX format. The App searches for surrounding Bluetooth devices and displays their class and RSSI information. Once connected to the HC-06 module, the main menu shows three data transfer options, namely Byte Stream, Keyboard, and Command line mode. The Command Line mode can be used to send the display data and commands to the LED matrix just like we did in Part 1 using the Arduino Serial Monitor. It could be little tedious to type in the characters on smartphone compared to using the PC keyboard. On the other hand, the Bluetooth SPP Pro App provides 12 touchscreen buttons in Keyboard mode, where the outputs of button presses can be easily\u00a0customized.\u00a0This mode is useful to store text messages and send them whenever you want by simply touching the buttons. I will show the demo of it here.<\/p>\n<div id=\"attachment_9371\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appconnect\/\" rel=\"attachment wp-att-9371\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9371\" class=\"size-full wp-image-9371\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppConnect.jpg\" alt=\"Connect\" width=\"580\" height=\"792\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppConnect.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppConnect-476x650.jpg 476w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9371\" class=\"wp-caption-text\">Three operation modes<\/p><\/div>\n<p>The picture below shows the 12 press buttons on screen that I have customized for this project. Six buttons are customized for the control commands we have implemented in the Arduino firmware, which are Brightness level up and down, Scrolling speed high and low, Pause, and Erase. Other buttons are used to store text messages.<\/p>\n<div id=\"attachment_9373\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appmenu\/\" rel=\"attachment wp-att-9373\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9373\" class=\"size-full wp-image-9373\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppMenu.jpg\" alt=\"menu\" width=\"580\" height=\"961\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppMenu.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppMenu-392x650.jpg 392w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9373\" class=\"wp-caption-text\">Customized buttons in Keyboard mode<\/p><\/div>\n<p>The customization is very easy. First you need to select the Button set option from the option menu on top right.<\/p>\n<div id=\"attachment_9375\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appsetting\/\" rel=\"attachment wp-att-9375\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9375\" class=\"size-full wp-image-9375\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSetting.jpg\" alt=\"Buttini setting\" width=\"580\" height=\"677\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSetting.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSetting-550x641.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9375\" class=\"wp-caption-text\">Buttini setting<\/p><\/div>\n<p>And then select which button you want to customize. A Button Function setting window shows up, where you can set the name of the button and the output data that you would like to send to the Bluetooth slave (HC-06 in this case) device when it is pressed. Remember that if you want to send a text message for display, it has to be enclosed inside two parenthesis as we discussed in Part 1.<\/p>\n<div id=\"attachment_9369\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appbutton1\/\" rel=\"attachment wp-att-9369\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9369\" class=\"size-full wp-image-9369\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton1.jpg\" alt=\"asa\" width=\"580\" height=\"593\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton1.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton1-550x562.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9369\" class=\"wp-caption-text\">Button settings<\/p><\/div>\n<div id=\"attachment_9370\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appbutton2\/\" rel=\"attachment wp-att-9370\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9370\" class=\"size-full wp-image-9370\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton2.jpg\" alt=\"asa\" width=\"580\" height=\"542\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton2.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppButton2-550x513.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9370\" class=\"wp-caption-text\">Button settings for brightness control<\/p><\/div>\n<p>Once you are done with all your button settings, you can go back to operation mode by selecting Buttons set complete option from the main menu.<\/p>\n<div id=\"attachment_9376\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appsettingcomplete\/\" rel=\"attachment wp-att-9376\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9376\" class=\"size-full wp-image-9376\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSettingComplete.jpg\" alt=\"setting omplet\" width=\"580\" height=\"604\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSettingComplete.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/AppSettingComplete-550x572.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9376\" class=\"wp-caption-text\">Button setting complete<\/p><\/div>\n<div id=\"attachment_9372\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/portable-bluetooth-enabled-scrolling-led-matrix-display-part-2\/appcontrol\/\" rel=\"attachment wp-att-9372\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9372\" class=\"size-full wp-image-9372\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Appcontrol.jpg\" alt=\"Control\" width=\"580\" height=\"348\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Appcontrol.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2014\/10\/Appcontrol-550x330.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-9372\" class=\"wp-caption-text\">Sending data and commands from smartphone<\/p><\/div>\n<p>And here is a video of the display in action.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/m_hgUKi5ydE\" width=\"480\" height=\"360\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Easy Matrix kits are now available on my <a href=\"https:\/\/www.tindie.com\/stores\/rajbex\/\" target=\"_blank\"><strong>Tindie store<\/strong><\/a>.<\/p>\n<h4><a href=\"https:\/\/www.tindie.com\/products\/rajbex\/easy-matrix-a-cascadable-led-matrix-module-kit\/\" target=\"_blank\"><strong>Buy Easy Matrix kit here!<\/strong><\/a><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>In Part 1 of this project, we described the construction of Easy Matrix, which is a cascadable 8&#215;8 LED matrix display with MAX7219 chip on board. We developed an Arduino sketch for scrolling text display, whereby the Arduino receives text messages from its serial port and displays the message on a 8&#215;40 LED matrix constructed by daisy-chaining five Easy Matrix modules. The Arduino firmware is also capable of receiving user commands for controlling the scrolling speed and brightness level of the display. In this part, we will discuss about extending the project to cascade 8 Easy Matrix modules and control<\/p>\n","protected":false},"author":1,"featured_media":9361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[150],"tags":[575,942,260,439],"class_list":["post-9331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-2","tag-android","tag-bluetooth-adapter","tag-led-matrix","tag-max7219"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/9331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=9331"}],"version-history":[{"count":28,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/9331\/revisions"}],"predecessor-version":[{"id":11765,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/9331\/revisions\/11765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/9361"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=9331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=9331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=9331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}