RadioLocman.com Electronics ru
Advanced Search +
  

11-01-2011

Arduino expansion board used for controlling large numbers of LEDs

Overview:
The Voxel Shield is an Arduino "Sheild" (or expansion board) used for controlling large numbers of LEDs. The Voxel Shield can drive up to 512 LEDs, making it possible to make an LED cube up to 8x8x8 voxels, or an LED screen of 64×8 pixels.

Arduino expansion board used for controlling large numbers of LEDs

Summary:

  • Shift registers used: M74HC595B1R
  • Shift registers recommended: 74HC595
  • Header Input Voltage: Regulated 5V
  • Digital I/O pins used: d2, d3, d4, d5
  • Positive Outputs: 64
  • grounding pins: 8
  • Max grounding current: 0.5A Per pin
  • Built in resistors: 330 ohms
  • LED indication: Power, D13
  • Buttons/switches: Reset

Schematics:

Arduino expansion board used for controlling large numbers of LEDs
Click to enlarge

Power:
Due to the large number of LEDs additional current may be needed. The connector can be used to supply 1.5 A to drive the LEDs. Please note that this MUST be regulated 5 volts as there is no on-board voltage regulator. It is recommended that you only use one method of inputting power, meaning you shouldn't supply power via the header and the barrel jack on the arduino. One method of supplying power to the header is Sparkfun's Regulated 5V Wall Wart, used with this adapter. Please note that this is only rated for 1A of power, so you must account for the power the Arduino draws and how much the LEDs draw. One way of supplying all the current you may need is using an ATX power supply, with Sparkfun's adapter board(you need this too) and this adapter. You would solder the red wire to 5v on the adapter board, and the black wire to ground. Please note that you must also connect PS_ON to ground.

Calculating the power needed for an LED cube:

To calculate the power the LEDs draw, use the following equation:

((Number of LEDs)×(current LEDs draw)) / Number of layers

For example, for an 8×8×8, you use 64 LEDs per layer and if each draws 20mA:

((512)×(20)) / 8 = 1.28 Amps

Connecting the LEDs:
The LEDs are controlled by using shift registers, 8 of which can supply positive current, and the 9th controls 8 MOSFETs that allow you to ground groups of LEDs. In order to control the maximum number of LEDs, the LEDs should be connected so that the positive leads are in 64 groups of 8 and the negative leads in 8 groups of 64. This way, you can control the 64 positives directly with the shift registers, and ground the 8 negatives with the MOSFETs controlled by the shift register.

Interfacing with the shift registers:
You first must write the latch pin (d5) low, then load the registers using the shiftOut() function to send 9 bytes of data, the first 8 controls which of the 64 positives will be on and the last byte which of the 8 negatives will be connected to ground. Next you must write the latch pin low for the change to take effect. Finally you must repeat this 8 times for the 8 layers to display 1 frame of an animation. It is important to note that only 1 layer should be on at a time.

For example, to draw the largest box possible, first send 11111111, then 10000001 6 times, then 11111111 for the first and last layers. Then send 10000001, then 00000000 6 times, then 10000001 for the 2nd - 7th layers.

Layer 1
Layer 2
Layer 3
Layer 4
Layer 5
Layer 6
Layer 7
Layer 8
11111111
10000001
10000001
10000001
10000001
10000001
10000001
11111111
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
10000001
00000000
00000000
00000000
00000000
00000000
00000000
10000001
11111111
10000001
10000001
10000001
10000001
10000001
10000001
11111111

Example Sketch - download

Battery:
A battery can be used to supply the additional current, but should NOT be directly connected to the header, as battery voltage varies. A 5 volt voltage regulator, if your battery outputs more than 5 volts, or a voltage stepper, if you battery outputs less than 5 volts, must be used.

mushroo.me

Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus