Sie sind auf Seite 1von 5

Led Matrix controller for Pharmacies

In this project we already have a 16x16 led-matrix and were implementing the controller
and the user-interface to update animations on the controller. Were using an ATMega32 as the
main controller running at 20MHz.

Schematics PCB prototype


Board 3d-simulation, before implementation


Our led-matrix have actually 8x8x2 leds, because its using 2 leds per pixel. It uses shift registers to
stream data from processor to the leds.
A quick reverse on the led matrix showed the way that data must flow through registers and how a
few transistors controlled some block-areas inside the matrix.
Matrix is built from 4x2 small-blocks of leds, each small-block controlled by a NPN transistor and a
shift register. In the following figure we have indexed leds by register data-pins.

In the following figure, we have the back-side view of the led-matrix, with 2 bus-drivers for signal
amplification, 2 molex sokets for input and output, and 8 shift registers, each controlling a 4x4 small led-
matrix. Data enters at SIN (serial in), bottom-left, and exists at SOUT (serial out), top-right. The 4 colors
used in passing signals from one register to another are control signals for all registers, which are used
to clock data through them and to enable/disable output latches. The numbering of registers reflects the
order of data-flow inside the matrix at runtime.
Leds are connected in series of 2 (each 2 representing a single final pixel) , in a common-anode
Each numbered square represents a led driver circuit, capable of running up to 16 groups of 2 leds.
Before lightining leds, all data must be shifted over the 8 led-drivers (shift-registers). After the shift
operations, an ENABLE signal, latches data to leds.


In the following table we have the smallest led-matrix block controlled by a single led-driver
C1 C2 C3 C4
L1 3 2 1 0
L2 7 6 5 4
L3 11 10 9 8
L4 15 14 13 12

In the following table we have the make-up of the entire led-matrix, and an example of data to light
only the border of the matrix given. Because leds are in common-anode, we have to supply ground
to leds, so leds may light. Each color stands for each led-driver circuit.
5 6 7 8
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16
L1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
L2 0 0
L3 0 0
L4 0 0
L5 0 0
L6 0 0
L7 0 0
L8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 2 3 4
To light only the border, we need to provide the following data sequence to shift-registers:

S8=~0b0001000100011111 = ~0x111F
S7=~0b0000000000001111 = ~0x000F
S6=~0b0000000000001111 = ~0x000F;
S5=~0b1000100010001111 = ~0x888F;
S4=~0b1111000100010001 = ~0xF111;
S3=~0b1111000000000000 = ~0xF000;
S2=~0b1111000000000000 = ~0xF000;
S1=~0b1111100010001000 = ~0xF888;

A tool was made to easily replace and modify animations inside our controller. Tool was built
using Delphi 7, for its fast time of model and code-writing, and it provides basic graphic elements,
along with graphic manipulation, animation control and device-update functions.

A singe frame of data to light the entire matrix is made of a stream of 8 consecutive 16 bit
WORDS. Thus we have an entire frame lighted up, using only 16 bytes of data.

Screenshot while working on a new animation




In the Controller Menu, were able to reprogram the animations inside the microcontroller. The
feature is based on a listening loop inside the processor. It sends from time to time, a single byte to
the computer on the serial line, and if the application will acknowledge the received byte with
another specific byte, then the device will enter the programming mode, overwriting the Flash-Area
where animations are stored.
Animations may be loaded or stored to a file, and inside the controller the data is stored as
structure with some additional information like: how many times an animation should be played
before going to next one. That way we may repeat certain frames without the need to store them
physically (similar to tiles)




Animation example provided with documentation.

For additional informations or questions please mail to
craciun.vlad@yahoo.ie

Das könnte Ihnen auch gefallen