{"id":16,"date":"2023-01-07T19:39:36","date_gmt":"2023-01-07T19:39:36","guid":{"rendered":"https:\/\/blog.hslracing.com\/electronics\/2023\/01\/4x4x4-charlieplexed-led-cube.html"},"modified":"2023-01-07T19:39:36","modified_gmt":"2023-01-07T19:39:36","slug":"4x4x4-charlieplexed-led-cube","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/electronics\/2023\/01\/4x4x4-charlieplexed-led-cube.html","title":{"rendered":"4x4x4 Charlieplexed LED Cube"},"content":{"rendered":"<p>I am a firm believer in &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Standing_on_the_shoulders_of_giants\">standing on the shoulders of giants<\/a>&#8221; and borrowing ideas that already exist and combining, building on them or delivering your own take on them &#8211; after all why re-invent the wheel, just because you happen to want to use a wheel in your design? This was good enough for <a href=\"http:\/\/en.wikipedia.org\/wiki\/Isaac_Newton\">Sir Isaac Newton<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Linus_Torvalds\">Linus Torvalds<\/a>, so why not ordinary people like me?<\/p>\n<p>I have wanted to build an LED cube for a while now and thought that an RGB version would be good and after my experiences with <a href=\"http:\/\/en.wikipedia.org\/wiki\/Charlieplexing\">Cherlieplexing<\/a> with my <a href=\"https:\/\/blog.hslracing.com\/3dprinters\/2013\/06\/26\/binary-clock\/\">Binary Clock<\/a>, I thought I would give this a go.<\/p>\n<p>The best example I have found is that by <a href=\"http:\/\/aglick.com\/charliecube.html\">Asher Glick<\/a>:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/cube-edit.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-84 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/cube-edit-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/cube-edit-300x169.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/cube-edit.jpg 355w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>This was also used as the foundation for the one built by <a href=\"http:\/\/g33k.blogspot.co.uk\/2013\/03\/charlieplexed-4x4x4-rgb-led-cube.html\">Hari Wiguna<\/a>:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/IMG_7318.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-85 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/IMG_7318-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/IMG_7318-300x225.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/IMG_7318-768x576.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/IMG_7318.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>I have decided that I will use a bare <a href=\"http:\/\/www.atmel.com\/devices\/atmega328p.aspx\">ATmega328P<\/a>, as I can buy these from <a href=\"http:\/\/uk.rs-online.com\/web\/p\/products\/738-0435\">RS<\/a> for \u00a32.14 each, I can probably do away with the requirement for an external crystal or resonator by running at 8MHz from the internal clock, so the only other costs will be a suitable perfboard and some LEDs.<\/p>\n<p>I am using\u00a0some perfboard I bought from\u00a0<a href=\"http:\/\/www.ebay.co.uk\/\">Ebay<\/a>\u00a0&#8211; 10 pieces of 7x9cm at \u00a31.80, or \u00a30.18 each.<\/p>\n<p>The LEDs came from an <a href=\"http:\/\/www.ebay.co.uk\/\">Ebay<\/a> auction for 100 x 5mm RGB LEDs that I won for \u00a35.65 (inc P&amp;P) which makes for \u00a30.0565 each or \u00a33.616 for the 64 required for this project.<\/p>\n<p>This makes the total cost of this project, excluding any additional wire or solder, to be just under \u00a36.00.<\/p>\n<p>I have drawn up the schematic in <a href=\"http:\/\/www.cadsoftusa.com\/\">Eagle<\/a>:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.21.49.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-86 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.21.49-300x90.png\" alt=\"\" width=\"300\" height=\"90\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.21.49-300x90.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.21.49-768x231.png 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.21.49.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">I have also drawn it out using <a href=\"https:\/\/code.google.com\/p\/diy-layout-creator\/\">DIY Layout Creator<\/a>\u00a0(this was done using the perfboard mentioned above):<\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.23.04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-87 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.23.04-300x260.png\" alt=\"\" width=\"300\" height=\"260\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.23.04-300x260.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/Screen-shot-2013-10-13-at-17.23.04.png 603w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">The colours are those used by\u00a0<a href=\"http:\/\/aglick.com\/charliecube.html\">Asher Glick<\/a>\u00a0on his website, I intend for the horizontal and vertical connections to be additional structural wiring, hence why I have turned the spires by 45 degrees.<\/div>\n<div style=\"clear: both; text-align: left;\"><\/div>\n<div style=\"clear: both; text-align: left;\">Here are some shots of the LED spires in various stages of construction:<\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-88 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs1-300x182.jpg\" alt=\"\" width=\"300\" height=\"182\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs1-300x182.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs1-768x467.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs1.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>Legs bent out at 90 degrees:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-89 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs2-300x158.jpg\" alt=\"\" width=\"300\" height=\"158\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs2-300x158.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs2-768x403.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs2.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>Legs bent back around ready for soldering:<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-90 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs3-300x177.jpg\" alt=\"\" width=\"300\" height=\"177\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs3-300x177.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs3-768x452.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2014\/01\/LEDs3.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">A completed spire<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I am a firm believer in &#8220;standing on the shoulders of giants&#8221; and borrowing ideas that already exist and combining, building on them or delivering your own take on them &#8211; after all why re-invent the wheel, just because you happen to want to use a wheel in your design? This was good enough for&hellip;<\/p>\n","protected":false},"author":2,"featured_media":84,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":5,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"predecessor-version":[{"id":156,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/16\/revisions\/156"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/media\/84"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}