{"id":44,"date":"2006-11-26T05:21:29","date_gmt":"2006-11-26T05:21:29","guid":{"rendered":"http:\/\/130.61.186.249\/index.php\/2006\/11\/26\/leddisplay-blinkenled-2\/"},"modified":"2006-11-26T05:21:29","modified_gmt":"2006-11-26T05:21:29","slug":"leddisplay-blinkenled-2","status":"publish","type":"post","link":"http:\/\/130.61.186.249\/index.php\/2006\/11\/26\/leddisplay-blinkenled-2\/","title":{"rendered":"LEDDisplay \/ BlinkenLed"},"content":{"rendered":"<p><span style=\"font-size: medium;\">My newest project; LED Display.<\/span><br \/>\n<a href=\"http:\/\/www.youtube.com\/watch?v=GHMd2JFMvOw\" target=\"_blank\" rel=\"noopener\"><span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/ATT00293.jpg\" alt=\"\" \/><\/span><\/a><br \/>\n<a href=\"http:\/\/www.youtube.com\/watch?v=GHMd2JFMvOw\" target=\"_blank\" rel=\"noopener\">Youtube video of it<\/a><br \/>\nThe idea came from germany, where the group &#8220;CCC&#8221; or Chaos Computer Club, created a matrix of lights in the &#8220;Haus des Lehrers&#8221; building at Alexanderplatz in Berlin. They installed computer controlled lights in 144 windows spanned over 8 floors (18 windows per floor). This was done first in 2001. You can look at their webpage at <a href=\"http:\/\/blinkenlights.de\/\" target=\"_blank\" rel=\"noopener\">BlinkenLights.de<\/a>.<br \/>\nIf you search for Blinkenlights on video.google.com or youtube you will find a really interesting documentary about the Blinkenlights project. I saw this video a few years ago, but when I saw it again now recently, I ignited on all my sparks. I had to make my own small scale version.<br \/>\nSo I surfed the web, and I found, amongst others, <a href=\"http:\/\/www.jalcds.de\/blinkenleds\/\" target=\"_blank\" rel=\"noopener\">BlinkenLEDs<\/a>. These guys had done almost exactly what I wanted to do. I saw that they were using a 4094 Bit-shift register. I myself would have used a 74xxx series chip, but since they had done it perfectly with this chip, and since it looked like it worked perfectly even without resistors for each LED, I incorporated the 4094 chip in my plans.<br \/>\nMy plan differs from theirs in two ways. I wanted mine to be able to run without a computer connected. For this I planned using the PIC16F628. Someone might wonder why I wouldn&#8217;t use the cheaper &#8220;less cmos&#8221; version PIC16F84. But the answer is also the answer to the other way my project differs. I wanted to use the serial port, instead of the LPT(read: printer) port. And the PIC16F628 has hardware USART capability, which makes RS232 connection simple.<br \/>\nThe part-list for mye circuit is as follows:<\/p>\n<pre escaped=\"true\">  1     PIC16F628\n  1     18-PIN socket (for the PIC)\n  1     MAX232\n  1     95128 SPI controlled EEPROM (128KB memory)\n  1     20MHz Crystal for the PIC\n  1     33uF electrolyte capacitor (noise reduction for PIC)\n  2     22pF capacitors for 20Mhz crystal\n  2     Veroboards (prototyping boards)\n  3M    Flat cable\n  4     1uF electrolyte capacitors (for the MAX232)\n  18    4094 Bit shift registers\n  144   Red 3mm Leds (I've got 4000 spare :P)\n  misc  Wires<\/pre>\n<p>The circuit was planned live inside my head \ud83d\ude09 I have regretted this a bit as the project evolved, but all in all, I&#8217;m pretty happy\/proud about the result.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image1.jpg\" alt=\"\" \/><\/span><br \/>\nHere you can see a picture of the controller-card when I had completed the wiring of 3 bit-shift registers, the PIC16F628 and the MAX232. I were planning on having two rows of bitshift registers filling the whole left side of the board, spacing just enough to have 8 wires up to the LED board from each register.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image2.jpg\" alt=\"\" \/><\/span><br \/>\nHere you see how I wired the first 4 bit-shift registers. I found out later, that I wanted the first register to be on the next row. Even though here you can see that I have connected the first register on this &#8220;second row&#8221; to the PIC16F628 processor. If you are really observant, you can tell that I have changed my mind a few times on the wiring of the bottommost row ;P<br \/>\nIt also prooved later that I should have thought it over just one more time. Because here lies the root of all evil! I wired up all the STROBE pins to +5v, and wired together all the OUTPUT ENABLE pins, to one of the ports of the PIC processor. This was not what I meant to do. Because of this, my display will flicker a bit each time it updates the screen. But since it is a 20MHz processor, it&#8217;s hardly noticable.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image3.jpg\" alt=\"\" \/><\/span><br \/>\nThis is a picture of all the 18 Bit-shift registers wired up.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image4.jpg\" alt=\"\" \/><\/span><br \/>\nThis is all the registers wired up. You can see I have moved the control-cable from the processor to the leftmost registers. I tested the circuit with a program on the processor that lit one row by one, and all of them worked at the first try! \ud83d\ude00<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image5.jpg\" alt=\"\" \/><\/span><br \/>\nIt was then over to the LED card. Here I have drilled out 144 holes. Pretty boring work I can tell you&#8230;. You see that I have wired the ground from the 9 first LEDs.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image6.jpg\" alt=\"\" \/><\/span><br \/>\nThis is how it looks when all 144 LEDs are connected. This took very long time, especially afther the first few rows. Since my friend had to leave, and so I was two hands short. But I got it done at the end. I wish this board was pre-tinned like the controller-vero board, since this made it even harder to solder the LEDS with only my own two hands.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image7.jpg\" alt=\"\" \/><\/span><br \/>\nThen I started wiring up the leds to the shift registers. I am glad that I saw how terrible the wiring looked at the projects at BlinkenLEDS. So that I bought flat cable for my project. I&#8217;m pretty satisfied with how I wired up the leds to the flat cable. Even though it took quite a long time. After each new row, I powered up the circuit to check if there were any &#8220;dead pixels&#8221;. There were a few (read: totally 4-5), mostly since the board wasn&#8217;t pre-tinned, and I don&#8217;t have flux other than what the tin provided. But since I was in lack of hands, the flux evaporated before I got to actually solder the leds to the board.<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image8.jpg\" alt=\"\" \/><\/span><br \/>\nHere you see the board running a program that alternates between all the leds. The display works! It was time for celebration with a &#8220;blm&#8221; movie from the BlinkenLights project. So I wrote a parser in perl that converted a .blm file to .c code for my PIC16F628.<\/p>\n<pre escaped=\"true\" lang=\"perl\" line=\"0\">#!\/usr\/bin\/perl\nuse strict;\nmy $ttl=100;\nmy @arr;\nmy @outarr;\nmy $out;\nwhile(&lt;&gt;) {\n  if (m\/^@(\\d+)$\/) {\n    $ttl = $1;\n  }\n  if (m\/^[01]{18}$\/) {\n    push @arr, $_;\n  }\n  if (scalar(@arr) == 8) {\n    print \" PORTB &amp;= ~SHOW; \/\/ Hide display\\n\";\n    for my $pos (0..17) {\n      for my $ari (0..7) {\n        push @outarr, substr($arr[$ari],$pos,1);\n      }\n      print \" sendbyte(0b\".join(\"\",@outarr).\");\\n\";\n      @outarr = ();\n    }\n    @arr = ();\n    print \" PORTB |= SHOW; \/\/ Show display\\n\";\n    print \" delay_ms($ttl);\\n\\n\";\n  }\n}<\/pre>\n<p>The result was a moving version of this:<br \/>\n<span class=\"imgcenter\"><img decoding=\"async\" src=\"http:\/\/130.61.186.249\/wp-content\/uploads\/2014\/08\/image9.jpg\" alt=\"\" \/><\/span><br \/>\nSource of the BLM file, and moving GIF of the animation can be found <a href=\"http:\/\/www.blinkenlights.de\/gallery\/speedit.en.html\" target=\"_blank\" rel=\"noopener\">here<\/a>.<br \/>\nI have now coded the RS232 support and I first modified the above code to send the animation directly to the display. And then I coded myself a perl module to control the display live. I called it &#8220;Acme::LEDDisplay&#8221; and using some quick hacks. I have support for pset (pixel set), pget (pixel get), line, circle and text.<br \/>\nWith this I can create live output from just about everything. The sky is the limit \ud83d\ude00<br \/>\nHere is a video sample of &#8220;<a href=\"http:\/\/www.blinkenlights.de\/gallery\/spin.en.html\" target=\"_blank\" rel=\"noopener\">spin.blm<\/a>&#8221; on my display: <a class=\"attach\" href=\"http:\/\/files.myopera.com\/lunatic\/blog\/MOV00315.avi\" target=\"_blank\" rel=\"noopener\">MOV00315.avi<\/a><br \/>\nThe project is almost done. I have made it possible to send blm movies directly from the PC, and control the display in simple perlcode. But the &#8220;offline-playing&#8221; part is not done. I had a few problems getting the SPI&lt;-&gt;EEPROM communication to work, so I have ordered some more EEPROMs to check if the one I have is broken. I really hope that, because it would be fun to be able to upload a few &#8220;movies&#8221;, and let it run for itself on batterypower. Maybe show off a few christmas greetings for example \ud83d\ude09<br \/>\nI also might wire it to my recently bougt Bluetooth module, so I can control it without any wires whatsoever \ud83d\ude42<br \/>\nIf you want more info about how I wired things up, sourcecode, etc. Give me a reply!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My newest project; LED Display. Youtube video of it The idea came from germany, where the group &#8220;CCC&#8221; or Chaos Computer Club, created a matrix of lights in the &#8220;Haus des Lehrers&#8221; building at Alexanderplatz in Berlin. They installed computer controlled lights in 144 windows spanned over 8 floors (18 windows per floor). This was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,13,17,21,25,26,33],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-blikenlights","category-blinkenled","category-electronics","category-hobby","category-led-display","category-pic","category-pic-microcontroller","category-video"],"_links":{"self":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":0,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}