Always, I hate to do hardware stuff in my tiny room in Hanoi, but I was lucky, my friend - he is a maker too and he has every tools I need.
My Idea is to build a small 4x4x4 led cube with my Arduino Uno , make it as compact as possible.
The components I used:
- Arudino Uno
- 4x4x4 = 64 leds (I bought 100 for back up ) Price : 35000 VND ~ $1.5
- 4 resistor 100 ohm (I bought 50 instead) Price : 2000 VND ~ $0.1
- Plastic Box (To put everthing in) : Price : 40000 VND ~ $2
- 5V - 1A power supply for Arduino : Price : 40000 VND ~$2
- Wires
Tools:
- Soldering
- A piece of wood
- Drill
In this project, I used 5mm led with long pin. I calculated that the distance between the led will be 1.6 cm. With this distance, the led cube can fit with the Plastic box that I bought and it's small enough in palm of your hand.
Creating template:
First thing to do is making the template for soldering the 4 layers of led cube.
Drill holes with exact distance between the leds. Then I am ready to solder the first layer. Here is the trick: for the first column, hold two pin of the led on the same plane, then bend the Anode to the plane 90 degrees with the Cathode, then tilt to the left about 30 degree. The next three columns, just need to bend the Anode orthogonal with Cathode.
Creating led cube:
Creating led cube:
We will have 4 layers like this. Stack them together. We create 4x4x4 led cube.
Before wiring to the Arduino pins, you will need to create 4 pins for each layer. Now you will have 16 Cathode and 4 Anode pins.
Wiring to Arduino :
We have just created a matrix led, each led is defined by layer and column.
I use the same template form online source (instructable), let borrow this image for visualization the led cube:
Columns
[(X axis ,Y axis) - Arduino Pin]
(1,1)-13
(1,2)-12
(1,3)-11
(1,4)-10
(2,1)-9
(2,2)-8
(2,3)-7
(2,4)-6
(3,1)-5
(3-2)-4
(3-3)-3
(3,4)-2
(4,1)-1
(4,2)-0
(4,3)-A5
(4,4)-A4
Layers
[layer-Pin]
a-A0
b-A1
c-A2
d-A3
Programming :
(coming in detail next)
Result:








No comments:
Post a Comment