Build a 4x4x4 LED cube lesson plan
Sixty-four LEDs from twenty wires in three builds: a shift register, multiplexing slowed down, then a cube full of animations.
Objectives and materials
By the end, students can
- Get eight outputs from three pins, light the cube a layer at a time, then make it dance.
Materials for the whole unit
- 74HC595 shift register x 2
- Arduino Uno R3
- Full-size breadboard x 3
- LED x 64
- Pushbutton
- Resistor x 20
- Transistor (NPN or PNP) x 4
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
Shift, multiplex, animate
Get eight outputs from three pins, light the cube a layer at a time, then make it dance.
| Lesson | Time | What students do |
|---|---|---|
| Eight outputs from three pinsA 74HC595 shift register turns three Uno pins into eight outputs. The cube needs sixteen columns, so this is where it starts. | 55 min |
|
| One layer at a timeThe real cube, with its trick slowed down. Sixteen columns, four layer transistors, and the moment the layers start switching faster than your eye. | 55 min |
|
| Bring the cube to lifeThe finished cube: a frame of four 16-bit numbers, a refresh that never stops, and four animations, rain, a plane sweep, a spiral and sparkle. | 75 min |
|
Materials
- 74HC595 shift register x 2
- Arduino Uno R3
- Full-size breadboard x 3
- LED x 64
- Pushbutton
- Resistor x 20
- Transistor (NPN or PNP) x 4
Check for understanding
Each student finishes "Bring the cube to life" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Sparkle".
Teach this unit as a class
Start a class from this course and its 3 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.