indian institute of technology, guwahati · 2018. 9. 9. · indian institute of technology,...

7
INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI EE202 – DIGITAL CIRCUITS LABORATORY PROJECT REPORT Objective: 4*4*4 RGB LED CUBE GROUP NO. – 11 NAME ROLL No. ANMOL RAMRAIKA 120102079 SOMITRA BALDUA 120108034 RAJESH KUMAR 120108028

Upload: others

Post on 25-Aug-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI

EE202 – DIGITAL CIRCUITS LABORATORY

PROJECT REPORT

Objective: 4*4*4 RGB LED CUBE

GROUP NO. – 11

NAME ROLL No.

ANMOL RAMRAIKA 120102079

SOMITRA BALDUA 120108034

RAJESH KUMAR 120108028

Page 2: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

OBJECTIVE: TO DESIGN A 4*4*4 RGB LED CUBE FOR DISPLAYING VARIOUS TYPES OF PATTERN MOTIVES: A 3-D LED cube can be extremely useful in plotting 3 dimensional surface graphs (just like in MATLAB) and understanding their nature. Its importance also lies in 3-D projection of sketches or object.(However for all the above purposes a bigger version of the cube is needed like 8*8*8 or 10*10*10 This project deals with a small model of that cube) DESIGN APPROACH: There are two parts in designing this 3-D LED cube: 1) Construction of hardware (4*4*4 LED CUBE) 2) Connecting hardware to ATmega328 & programming it for displaying patterns accordingly ( NOTENOTENOTENOTE: ATmega328 microprocessor is used in this project instead of 8085 microprocessor because 8085 has slow execution speed so real time applications are not possible(ATmega328 microcontroller used in arduino has clock speed of16 MHZ while for 8085 ,clock speed is around 3.125 MHZ). Apart from that 8085 applications are also limited by physical address space and it can’t process analog signals directly). DESIGN: WORKING & DESCRIPTION OF CIRCUIT How to control 64 LEDs without using 64 individual wires? Multiplexing! Running a wire to the anode of each led would obviously be impractical, and would look really bad. One way to get around this, is to split the cube into 4 layers of 16x16 LEDs.

Page 3: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

All the LEDs aligned in a vertical column share a common anode (+). All the LEDs on a horizontal layer share a common cathode (-) ( in case of RGB LEDS one each for red ,blue and green). As a result we haveAs a result we haveAs a result we haveAs a result we have about 28 pins to control overall (16 anode pins for sourcing current and about 28 pins to control overall (16 anode pins for sourcing current and about 28 pins to control overall (16 anode pins for sourcing current and about 28 pins to control overall (16 anode pins for sourcing current and 12 cathode pins for sinking current).12 cathode pins for sinking current).12 cathode pins for sinking current).12 cathode pins for sinking current). So we need 16 pins sourcing current, and 12 pins sinking current. For this task we'll use some shift registers and some transistor arrays. For the sourcing we'll use the 74HC595 8-stage serial shift register, and for the sinking the ULN2003 7-transistor array. The 74HC595 is capable of sourcing 35mA per channel, as each of our channels (anodes) is supplying only one led with current (at a time), this is enough for a led (20mA typical consumption). For sinking, as we have to sink the current from max from 16 LEDS (one plane), so 16 *20mA = 320mA to be sunk per channel. The ULN2003 is capable of sinking 500mA per channel. All the 28 pins are thus (by the help of shift registers) is controlled by microprocessor. Microprocessor has maximum of 5mA current sourcing/sinking per pin, so as this current is not enough for our LEDS to be powered directly, we will use them to interface the 74HC595 shift registers that will power and control the channels. These shift registers are of the SIPO (serial in, parallel out) type that means you control them with a serial signal, and they output parallel signal. Parallel is what we need to control many channels at once. We have 25 channels to control the anodes of the LEDS (16 LEDS = one horizontal plane). We have 3 colour channels for each plane, this is 3(channels) x 4(planes) = 12 pins. We control the 16 anodes directly from 2 shift-registers( 8 from each) connected in series . And we need 12 pins to control the RGB channels, we will use 2 shift-registers that feed two ULN2003 transistor arrays. We will use these 12 colour channel to select which one is active at the moment, and we will cycle them just like: plane(1) – 1-R; 1-G; 1-B; 2-R; 2-G; 2-B ; 3-R; 3-G; 3-B; 4-R; 4-G; 4-B; 5-R; 5-G; 5-B; Once the plane is selected we load the 16 channels of the anodes with the pattern we want, cycle the colour channel again, again loading the appropriate pattern and so on... One important phenomena involved in working of led cube is PERSISTANCE OF VISION.

Page 4: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

HOW??? If I want to light up the LED in the upper left corner in the back (0, 0, 3), I just supply GND (-) to the upper layer, and VCC (+) to the corresponding colour of the column in the left corner. If I only want to light up one led at a time, or only light up more than one layer at the same time, this works fine. However, if I also want to light up the bottom right corner in the front (3, 3, 0),it becomes problematic. When I supply GND to the lower layer and VCC to the front left column, I also light up the upper right led in the front (3,3,3), and the lower left LED in the back (0,0,0). This ghosting effect is impossible to work around without adding 64 individual wires. The way to work around it is to only light up one layer at a time, but do it so fast that the eye doesn't recognize that only one layer is lit at any time. This relies on a phenomenon called Persistence of vision (phenomenon of the eye by which an afterimage is thought to persist for approximately one twenty-fifth of a second on the retina. It is believed to be explanation for motion perception). CONSTRUCTION OF HARDWARE STEP 1: Prepare our LEDS: Bending the legs of LEDS. In order to solder the led matrix easily, we must pre-bend our LEDS.

STEP 2: Soldering the LEDS in row and final cube

First, prepare the required number of straight wires and then solder it as per the circuit

requirements to get 16 rows of 4 LEDS each.

Page 5: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

Solder rows into planes to get the 4 planes and then solder planes to get the final cube.

FINAL CUBE CIRCUIT:

WITH LEDS ON:

Page 6: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led

PRECAUTIONS and CHALLENGES: 1) Wires must be straight as sufficient spacing must be there between each rail of straight wire in order to avoid short circuit. 2) Straight wires are also important in order to make final structre look actually like cube. 3) Soldering of LEDS must be done at uniform spacing to prevent cube from turning into cuboid!! 4) Resistors of appropriate value must be connected in series with branches that source current (current being sourced is about 35 mA while required value is about 20mA)………in case if after cube formation any led gets damaged, replacing it is almost next to impossible( because of this reason it is good if all LEDS are tested before being soldered)

Page 7: INDIAN INSTITUTE OF TECHNOLOGY, GUWAHATI · 2018. 9. 9. · indian institute of technology, guwahati ee202 – digital circuits laboratory project report objective: 4*4*4 rgb led