Giter VIP home page Giter VIP logo

led-cube's Introduction

LED Cube - 4x4x4

The purpose of this project is to make a LED cube using a minimum amount of pins from the microcontroller. An Arduino Nano (clone) used for the Atmega328p chip as the microcontroller, and a USBASP is used for programming. An example serial test program is available here.

The main code starts in LED_Cube4.c. The LED_Defaults.h file contains macros and variables used in both files. The LED_Effects.c contains the code for the animations.

Test programs

There are three testing programs in the tests folder.

The 74HC595_Test program is for testing out the 74HC595 chips, and uses LEDs directly from each output of the chip. There is an included schematic for wiring.

The LED_Test tests each layer of the cube individually to be able to check the wiring of the LEDs. The Timer_Test is a simple test for the timing aspect of the code, along with having different presets for the FPS of the cube.

Hardware build

For the physical hardware, blue and green LEDs were used due to a shortage of green LEDs. This also created the pattern shown in the gif below where each corner and the middle LEDs are blue, with the rest being green.

It is highly suggested to test each LED before soldering, and to also use a jig (see right). This helps with placement of the image and also allows the structure to be layered on top of another. The jig was made by measuring the cathode (-) part of each LED, and finding that distance. Each cathode leg was then bent, and formed into a grid like pattern with 4 rows and two crossbeams on either end. The anodes are then connected together, with there being 16 inputs.

Top layer example: (middle layers use blue (b) in center instead of green (g)).

 Top layer:     Layer grid:     Side view:
 b--g--g--b     0  4  8  12     3 b--g--g--b
 |  |  |  |                       |  |  |  |
 g  g  g  g     1  5  9  13     2 g--g--g--g
 |  |  |  |                       |  |  |  |
 g  g  g  g     2  6  10 14     1 g--g--g--g
 |  |  |  |                       |  |  |  |
 b--g--g--b     3  7  11 15     0 b--g--g--b

A schematic is also available here.

Example

Other Resources

The 4x4x4 cube by chr.
74HC595 shift register tutorial by Protostack.
74HC595 capacitor and resistor setup by Nerd Ralph.

led-cube's People

Contributors

mwyoung avatar

Watchers

James Cloos avatar  avatar

Forkers

nifroidl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.