hlxldb

光立方制作全过程(四)

0
阅读(3546)

由于原文比较长,为了尊重原文,所以把每一个步骤都原封不动的转载。近期内估计就在转载这篇文章了。请有兴趣的同志们耐心一些。毕竟人家是一个比较大的项目,要提到的当然也就多一些,一边学习人家的创意,一边当作英语练习,想来也是还不错的。

今天继续贴上两个步骤吧,好像每次都这么晚,不解。。。。。

 

Step 5How does a LED cube work

How does a LED cube work

How does a LED cube work

How does a LED cube work

This LED cube has 512 LEDs. Obviously, having a dedicated IO port for each LED would be very impractical. You would need a micro controller with 512 IO ports, and run 512 wires through the cube.

Instead, LED cubes rely on an optical phenomenon called persistence of vision (POV).

If you flash a led really fast, the image will stay on your retina for a little while after the led turns off.

By flashing each layer of the cube one after another really really fast, it gives the illusion of a 3d image, when int fact you are looking at a series of 2d images stacked ontop oneanother. This is also called multiplexing.

With this setup, we only need 64 (for the anodes) + 8 (for each layer) IO ports to control the LED cube.

In the video, the process is slowed down enough for you to see it, then it runs faster and faster until the refresh rate is fast enough for the camera to catch the POV effect.

(备注:原文的视频链接不能用,等找到可以用的再贴上来,或者朋友们有看到的话,告诉一声,先谢谢了~不过看那图就觉得赏心悦目了说,呵呵)

 

Step 6The anatomy of a LED cube

The anatomy of a LED cube

The anatomy of a LED cube

The anatomy of a LED cube

We are going to be talking about anodes, cathodes, columns and layers, so lets take a moment to get familiar with the anatomy of a LED cube.

An LED has two legs. One positive (the anode) and one negative (cathode). In order to light up an LED, you have to run current from the positive to the negative leg. (If i remember correctly the actual flow of electrons is the other way around. But let's stick to the flow of current which is from positive to negative for now).

The LED cube is made up of columns and layers. The cathode legs of every LED in a layer are soldered together. All the anode legs in one column are soldered together.

Each of the 64 columns are connected to the controller board with a separate wire. Each column can be controlled individually. Each of the 8 layers also have a separate wire going to the controller board.

Each of the layers are connected to a transistor that enables the cube to turn on and off the flow of current through each layer.

By only turning on the transistor for one layer, current from the anode columns can only flow through that layer. The transistors for the other layers are off, and the image outputted on the 64 anode wires are only shown on the selected layer.

To display the next layer, simply turn off the transistor for the current layer, change the image on the 64 anode wires to the image for the next layer. Then turn on the transistor for the next layer. Rinse and repeat very very fast.

The layers will be referred to as layers, cathode layers or ground layers.
The columns will be referred to as columns, anode columns or anodes.