Professional Documents
Culture Documents
Led Cube: Complex Engineering Problem
Led Cube: Complex Engineering Problem
LED CUBE
MICROPROCESSOR SYSTEMS
2. INTRODUCTION
__
This project is based on microcontroller for the lightning scheme of led
cube. An LED cube is a three-dimensional arrangement of light emitting
THE ULTIMATE
diodes (LEDs) that can be used to create a variety of visual effects. The
LEDs are mounted on the surface of a cube-shaped frame, and can be DISPLAY OF
controlled to light up in a variety of patterns and sequences. LED cubes CREATIVITY AND
can be used for a variety of purposes, including decoration, art TECHNOLOGY:
installations, and as a tool for education and experimentation. THE LED CUBE!
THIS DYNAMIC
LED cubes can be made in a variety of sizes, ranging from small cubes
with just a few LEDs to large cubes with hundreds of LEDs. They can STRUCTURE IS
be powered by a variety of methods, including batteries, AC power, or MADE UP OF 16
even solar panels. The LEDs can be controlled using a microcontroller LEDS THAT CAN
or other electronic control device, which allows the user to program the BE PROGRAMMED
LED cube to display a wide range of patterns and sequences.
TO LIGHT UP IN
LED cubes can be used as a tool for teaching about electronics and AN ENDLESS
programming. They provide a hands-on way for students to learn about VARIETY OF
concepts such as microcontrollers, LED control, and programming PATTERNS AND
logic. LED cubes provide a platform for experimentation and SEQUENCES.
exploration. They can be used to try out different programming
techniques, test out new ideas, or simply play around with light and
color.
1
3. METHADOLOGY
Following are steps that were taken in making of LED cube:
We used a piece of wood to build the cube frame. This was done by drilling machine. 16 holes were made
in the wooden piece so that 16 LEDs can be fitted in those holes and can be connected in same manner.
As shown in Figure. 1
Using a soldering iron, LEDs were connected in a frame. 4 such frames were made to make a tower.
Each frame has 16 LEDs. Thee were two methods of making this frame, the first one was to connect the
LEDs own legs and the second was to connect two terminals of LEDs with separate conducting wires. We
felt ease at connecting a separate wire hence we took a conducting wire divide it into many small pieces
2
and started connecting it with our LEDs using soldering by firstly checking each led separately and then
place it in the wooden piece of wooden board. As shown in FigurE.2
Once the first frame wa completed, install the circuit board inside the frame and connect it to the LEDs.
By making it sure that all the LEDs are properly aligned with their corresponding holes in the frame. As
shown in Figure.
After making cube we had to make an assembly code in keil that will use STM32F407 to connect our
Cube with the code. Following things were consider before writing code.
3
We have to enable specific ports using GPIO MODE REGISTER, for that we checked the
datasheet and finalized the ports and pins that we were going to use.
After this we enabled particular ports and their respective pins so that we can use them to do a
connection between hardware and software.
Then we have to give instruction that what type of our output is whether it is push pull or is it
open drain using OUTPUT TYPE REGISTER. If our command is 0 that means we will select a
push pull output type but if we change it to bit 1 then our output type will be open drain.
Then we will move to OSPEEDER register to set the speed of the LEDs.
After this our focus will move towards PUPDR register and we will select our type i.e No Pull up
Pull Down.
Finally we will give command to ODR as 1 incase we want to make LED on.
Once simple code was completed we focused on the delay of the our project.
Different sequences were made to give a nice effect to the cube.
And finally after implementation and debugging of errors we were able to make a code that
matched our expectations.
When finally the cube was made and tested there were a few mistakes in our code that we resolved and
got our final project in this look.
4. RESULT
Our result of assembly code is shown below
4.1 Code
;********************************************GROUP#1****************************************************
4
;*****************************************2020-EE-634(L)************************************************
;*****************************************2020-EE-611***************************************************
;*****************************************2020-EE-626***************************************************
;*****************************************2020-EE-639***************************************************
;*******************************************************************************************************
; Code for LED cube
;*******************************************************************************************************
INCLUDE core_cm4_constants.s ; Load Constant Definitions
INCLUDE stm32f401xc_constants.s
MOV r4,#0x100
loop2
LDR r2, [r8, #GPIO_ODR] ;1
ORR r2, r2, #GPIO_ODR_ODR_0
LSL r2, #15
STR r2, [r8, #GPIO_ODR]
BL delay
SUB r4,#1
CMP r4,#0
BGT loop2
B stop
6. CONCLUSION
To conclude, making 4 by 4 cube was fun. There was a lot to learn, from soldering frames to making a
tower and from starting a code to finalizing it and giving it sequences. To create an LED cube, we gathered
the necessary materials and tools, including a microcontroller or development board, individual LED
12
modules, a prototyping board for soldering the LED modules, and wires for connecting everything
together. We also wanted to design and print a 3D enclosure for our LED cube to protect it and make it
more visually appealing. Once we had all materials, we solder the LED modules to the vero board, connect
everything to the microcontroller, and wrote and upload code to control the LED cube.
13