Introduction: Handwritten Clock Cube 8x16x8
I do not know why I especially liked to do some projects about lighting and sound. Here is one of LED projects, as called "Handwritten Clock Cube 8x16x8", that actually made me very excited. And I hope you will be enjoyable what I wanna to share on this instructable.
This cube has a total of 1024 leds, with 512 red leds and 512 green leds. They are same as two separated 8x8x8 led cubes and assembled into an 8x16x8 cube block. Let's take a look at some beautiful effects through the following videos:
- Handwritten Clock Mode: It can shows year, month, day of month, day of week, hour, minute & second & temperature by reading real time value from DS3231.
*** Version 1.0: For this demo video, it only show hour, minute & second.
*** Version 2.0: It show all information that got from DS3231.
- Animations Mode:
- Spectrum Analyzer Mode: It can also read music analog signal via stereo audio jack, with FFT transformation, then show volume unit on this cube.
Step 1: BILL OF MATERIAL
For handwritten clock mode, I bought one more RTC module - DS3231 & Arduino Mega 2560 to expand storage memory and program.
Step 2: WOODEN CUBE TEMPLATE
Firstly, I printed out the cube base design, sticked on wooden plate then drilled with 64 holes, diameter 5mm. This is an important preparation step to get a beautiful and symmetrical cube. Here is the download link for cube template: CUBE TEMPLATE
Step 3: LED SOLDERING
This step took the most time and effort. Before and after every single led soldering, I had to check it carefully. Otherwise when these leds were pieced together into cube block, it would cause us lot of troubles if there were some broken leds in the middle of led cube.
Step 4: CUBE BASE BOARD
For cube base PCB and wooden cube template, distance between leds is the same together. After soldering 64 leds on wooden cube template, we can place them exactly on print circuit board of cube base.
PCB Eagle design & pictures:
PCB real size download file: CUBE BASE PCB
Step 5: LAYER BOARD
I used 2x74HC238 (with active HIGH outputs) to control 16xNPN - 2N2222 + 16xPNP - TIP42C Transistors. You can download real size PCB picture above.
PCB layer board
PCB real size download file: LAYER BOARD
Step 6: SHIFT REGISTER BOARD
Shift Register Board include 8x74HC595, 8xULN2803, 64xR100, 10x0.1uF decoupling capacitors.
PCB file: SHIFT REGISTER BOARD
Finally, I joined Layer Board & Shift Register Board into one cooper glad A4 size. It's really well-fitting in A4 size.
Step 7: CUBE ASSEMBLY
- Soldering LEDs to 1st cube base PCB:
- Testing every single LED:
- Soldering LEDs to 2nd cube base PCB & testing:
- Installing Shift Register Board & Layer Board:
Step 8: CUBE BOX
- Preparation
I made one small adapter board for connecting between Arduino and PCB boards.
*** For Arduino Uno version: This version only included animations & spectrum analyzer functions with female audio jack, 3 way toggle switch & push button.
*** For Arduino Mega 2560 version: This update version included one more function "handwritten clock" so I added RTC DS3231 as picture
- Bottom box
Making a bottom cube box to contain: Power Supply, Arduino Uno/ Mega, Shift Register Board, Layer Board. At back side of cube box, I mounted power switch, push button, 3 ways toggle switches & female stereo audio jack.
- Top box
- Connecting all together
Step 9: PROGRAME
Led cube size is defined:
- X = 8
- Y = 16
- Z = 8
We have total of 8 layers for this cube. With my hardware, we have to convert 16 rows to 8 layers as follow:
- Z0 = Layer 0 = Row 0 + Row 8
- Z1 = Layer 1 = Row 1 + Row 9
- Z2 = Layer 2 = Row 2 + Row 10
- Z3 = Layer 3 = Row 3 + Row 11
- Z4 = Layer 4 = Row 4 + Row 12
- Z5 = Layer 5 = Row 5 + Row 13
- Z6 = Layer 6 = Row 6 + Row 14
- Z7 = Layer 7 = Row 7 + Row 15
See picture below:
For Y axis, we also do some modification in program to get correct coordinates:
For detail, let see example above for command setvoxel(6, 10, 0).
For Arduino handwritten clock program, you can download at GitHub link:
Step 10: HANDWRITTEN TEMPLATE
Creating ASCII code in handwriting is a time-consuming work. Luckily, Microsoft Excel can help me do this job very well, not only create fonts but also create programming codes for Arduino. You can download my excel template file at link: Excel Handwrtten Template
This file has a total of 4 sheets:
- Sheet "TEMPLATE_8X8": be used to create 8x8 ASCII fonts for leds or look up from this font library after all symbols are created. And then specific symbol is converted to coordinates (x, y). With this sheet, you can make a font or image with size 8x8 for yourself. See image below for capital letters "E".
- Sheet "DIY_FONT": contains the entire ASCII font that was created
- Sheet "EXAMPLE_E": is a typical example of creating handwriting character. Based on coordinates of capital letter "E" in step 1, we will create handwritten letter by allowing which coordinate to be displayed firstly and which coordinates are displayed secondly, thirdly... and endly. I used the “&” (ampersand) operator to combine coordinates from multiple cells in order of showing priority. Result for handwritten capital letter “E” is: {{6, 1},{6, 0},{5, 0},{4, 0},{3, 0},{2, 0},{1, 0},{1, 1},{2, 1},{2, 2},{1, 2},{1, 3},{2, 3},{2, 4},{1, 4},{2, 5},{1, 5},{0, 6},{1, 6},{2, 6},{3, 6},{4, 6},{5, 6},{6, 6},{6, 5},{3, 3},{4, 2},{4, 3},{4, 4}}; // E
- Sheet “TOTAL_HANDWRITTEN”: contains the entire handwritten letters that I created. I used Microsoft Excel to create an Arduino subroutine in this case. Otherwise, it will take time to write down 180 command lines like this: