FPGA-based improved high brightness RGB LED matrix automation

6
FPGA-Based Improved High Brightness RGB LED Matrix Automation Carlos López, Lucía Costas-Pérez, Jesús Doval-Gandoy Dpt. Electronics Technology University of Vigo Vigo, Spain [email protected] Abstract— The extended use of LEDs is emerging in many areas traditionally restricted to different solutions. Not only simple lighting electronic controlled systems are demanded by industry and consumers, but light jockey user controlled solutions have become more important in theatrical and entertainment data distribution systems. This paper presents a complete FPGA-based hardware and software solution for remote driving of high brightness RGB LED matrices synchronized with environmental music rhythm, as an evolution of a previous work. This new system design substitutes to a precedent distributed microprocessor-based control, reducing complexity, development time, size and costs, allowing at the same time the implementaion of multiple running modes. Further skills of the developed device working, not only with LEDs but as an universal controller for lighting automation, are also proposed. Keywords— DMX512, lighting entertainment systems, lighting automation, RGB LED matrix. I. INTRODUCTION DMatriX FPGA RGB-70 module, belonging to DMatriX family products, arises as the evolution of its previous version DMatriX RGB-70 [1]. A FPGA-based design has substituted to the microprocessor-based previous development providing size reduction and cost benefits. The FPGA logic resources allow a modular and complete kernel system implementation and avoid some negative aspects of distributed or networked systems such as the need for a communication protocol between master and slave modules. A second relevant aspect comes from the inherent nature of reconfigurable devices. It is possible to improve, redefine or adapt some constitutive elements or to extend the original design functionalities in order to include different capabilities considered in the standard. The device main functionality is to provide independent control over 70 high efficiency super bright RGB LEDs (10x7 matrix). Users can get control over each pixel from a computer or a lighting console and play with colors and pre-designed figures, changing them gradually according to the environmental music rhythm [1]. Actually, as it will be shown, it covers widespread functionality. The design is ready to work in DMX512 networks and is full DMX compatible. DMX512 is the standard protocol used by lighting equipment. It consists in a serial protocol based on a daisy chained architecture and is designed to connect equipments to only one cable via the EIA485 industry standard interface. It supports up to 512 channels of 8 bits data, which are sent out sequentially from channel 1 to the highest numbered available from the console. The content of each channel of data is directly related to the duty cycle of PWM dimmer associated to that channel [2]. Fig. 1 shows DMatriX FPGA RGB-70 included into the DMX512 architecture. These features allow for the use of DMatriX as a powerful tool for theatrical control and entertainment data distribution systems. It can be applied to any kind of events in which light and colors are primordial in order to achieve synchronized and excellent performance shows, TV, cinema, discos, concerts, restaurants, parties or interactive publicity. Fig. 1. DMatriX FPGA RGB-70 module within DMX512 network architecture. 1902 978-1-4244-1666-0/08/$25.00 '2008 IEEE

Transcript of FPGA-based improved high brightness RGB LED matrix automation

FPGA-Based Improved High Brightness RGB LED Matrix Automation

Carlos López, Lucía Costas-Pérez, Jesús Doval-Gandoy

Dpt. Electronics Technology University of Vigo

Vigo, Spain [email protected]

Abstract— The extended use of LEDs is emerging in many areas traditionally restricted to different solutions. Not only simple lighting electronic controlled systems are demanded by industry and consumers, but light jockey user controlled solutions have become more important in theatrical and entertainment data distribution systems. This paper presents a complete FPGA-based hardware and software solution for remote driving of high brightness RGB LED matrices synchronized with environmental music rhythm, as an evolution of a previous work. This new system design substitutes to a precedent distributed microprocessor-based control, reducing complexity, development time, size and costs, allowing at the same time the implementaion of multiple running modes. Further skills of the developed device working, not only with LEDs but as an universal controller for lighting automation, are also proposed.

Keywords— DMX512, lighting entertainment systems, lighting automation, RGB LED matrix.

I. INTRODUCTION

DMatriX FPGA RGB-70 module, belonging to DMatriX family products, arises as the evolution of its previous version DMatriX RGB-70 [1]. A FPGA-based design has substituted to the microprocessor-based previous development providing size reduction and cost benefits.

The FPGA logic resources allow a modular and complete kernel system implementation and avoid some negative aspects of distributed or networked systems such as the need for a communication protocol between master and slave modules.

A second relevant aspect comes from the inherent nature of reconfigurable devices. It is possible to improve, redefine or

adapt some constitutive elements or to extend the original design functionalities in order to include different capabilities considered in the standard.

The device main functionality is to provide independent control over 70 high efficiency super bright RGB LEDs (10x7 matrix). Users can get control over each pixel from a computer or a lighting console and play with colors and pre-designed figures, changing them gradually according to the environmental music rhythm [1]. Actually, as it will be shown, it covers widespread functionality.

The design is ready to work in DMX512 networks and is full DMX compatible. DMX512 is the standard protocol used by lighting equipment. It consists in a serial protocol based on a daisy chained architecture and is designed to connect equipments to only one cable via the EIA485 industry standard interface. It supports up to 512 channels of 8 bits data, which are sent out sequentially from channel 1 to the highest numbered available from the console. The content of each channel of data is directly related to the duty cycle of PWM dimmer associated to that channel [2]. Fig. 1 shows DMatriX FPGA RGB-70 included into the DMX512 architecture.

These features allow for the use of DMatriX as a powerful tool for theatrical control and entertainment data distribution systems. It can be applied to any kind of events in which light and colors are primordial in order to achieve synchronized and excellent performance shows, TV, cinema, discos, concerts, restaurants, parties or interactive publicity.

Fig. 1. DMatriX FPGA RGB-70 module within DMX512 network architecture.

1902978-1-4244-1666-0/08/$25.00 '2008 IEEE

By simply changing software application or reconfiguring the FPGA also other equipment different than lighting devices can be driven with the provided hardware such smoke machines, little motors, relays or media players. The product becomes powerful with these new possibilities.

In Section II the DMatriX basics are presented in order to explain the functionality of the control system to be implemented into the FPGA. Section III explains the architecture of the complete lightning system where it is embedded. Its internal structure and features are described in Section IV. The hardware implementation can be easily managed from a software application specially developed to provide the users a lightning design tool which is briefly shown in Section V. Finally, Section VI summarizes the contents of the paper and the main conclusions.

II. DMATRIX

A. Basics DMX512 protocol establishes the use of 512 channels.

DMatriX RGB-70 makes use of 210 of these 512 channels distributed in 70 channels for each RGB color, in order to drive a 70 pixel matrix. Each pixel is composed of four RGB LEDs parallel connected, so as to build a bigger pixel. This bigger one will have a common anode and three cathodes (R, G, B), each one associated to one DMX channel (Fig. 2). A huge amount of colors and effects are possible with the control of only these three channels per pixel, and it converts the LED matrix into a graphic display where any picture can be reflected. Fig. 3 shows the 10x7 pixel RGB LED matrix designed.

DMX input and output are optically isolated in order to provide electrical protection. This allows the use in networks with different kind of power sources and different grounds. A typical example can be a concert where part of the network is powered from a generator, other part from the electric means, and another from any non isolated ground supply [3].

Fig. 2. DMatriX RGB-70 channel distribution.

B. Running modes DMX512 architecture based networks adopt a daisy chained

topology. It is possible to configure the device as an optical

isolated single receiver (the target purpose), reflecting data values sent from the computer or console, but it can also work as an optical isolated in-line built-in repeater, which regenerates DMX signal electrical values (this allows the connection of many different modules, due to EIA485 only the connection of 32 load units is permitted). Another feature of the controller is the skill to regenerate DMX packets timing, synchronizing different DMX equipments or adapting slower devices to faster ones.

Fig. 3. 10x7 pixel RGB LED matrix.

In addition, patching function is also available, so as to

redistribute channels or data values for controlling other DMX devices, as if they were slaves of the master DMatriX module.

The in-line back-up configuration is also an interesting mode which provides protection for local matrix in addition to other DMX modules connected to DMX bus. If the master data source falls, DMatriX detects this event and can either switch off all devices or play a preprogrammed sequence replacing the master source. Line splitter or distribution amplifier abilities are possible too. These running modes are useful tools for driving parallel connected equipment in the same way.

Note that all these extra functions are only possible if DMatriX is placed in the first place of the DMX bus working as the master device. The rest of the DMX modules are instantly converted into DMatriX slaves and can be driven from the master source located in a computer or lighting console, or from the DMatriX module as desired. As the design is open, new additional functionalities may be added just reconfiguring the FPGA.

III. DMATRIX FPGA DEVELOPED SYSTEM

The controller includes three Printed Circuit Boards (PCBs). The first one is the DMX transceiver PCB. It is used for receiving DMX signals from the DMX line and feeding them

1903

into the FPGA control PCB. It also regenerates the DMX signal if the repeater functionality is enabled and behaves like a DMX transmitter in the case of the device acting as DMX packet generator or timing regenerator.

Fig. 4. XUP VIRTEX II PRO design board. The second one is the FPGA control PCB, a XilinX

University Program VIRTEX II PRO design board (Fig. 4) [4]. It contains a Xilinx FPGA (XC2VP30) and external resources that have been used for debug and development purposes but that are not included in the final control system. Only some LEDs are mapped to show the error indications, and a configuration switch allows users to choose the DMX channels (first 256 or last 256 of the 512 channels DMX universe) that the device must manage [3].

Fig. 5. DMatriX FPGA RGB-70 scheme. First, the FPGA controls communications and decodes the

DMX signal, and then, drives the 210 PWM units. It is a continuous process only broken if the DMX data flow from the

DMX line is interrupted for a time greater than one second. A more detailed description is developed in section IV. The third PCB constitutes the LED driving system. For this application, high brightness RGB LEDs have been used and the chosen drivers can manage up to 100 mA. A complete 70 pixel RGB LED matrix can demand up to 21 amperes when all the pixels are lighted in white color (red + green + blue) with the maximum intensity (210 channels activated, with duty cycle equal to 100%). As LEDs can also be voltage controlled, depending of the matrix resistors condition, this driver PCB is fully interchangeable and can be replaced for voltage drivers such Darlington arrays. The design provides scalability and modularity in order to connect multiple 70 pixel matrices or to build bigger ones. To create these big matrices users just need to join some base 10x7 pixel matrices and add the same number of DMatriX modules in the rack.

Fig. 5 represents an internal block diagram of the complete DMatriX FPGA design showing the three PCBs. It draws both isolated power sources and data flow.

Comparing the new system with the first version [1], many improvements can be noticed. Only one PCB containing a FPGA has been used to replace three PCBs with five microcontrollers each. Fig. 6 shows this previous structure where a microcontroller works as a master to select the R, G, or B frames and to send them to the slave ones by using the I2C internal protocol [5]. At least, four slave microcontrollers must be included because their internal resources can only manage a reduced set of values. In contrast, the FPGA provides the hardware support to implement a compact DMX receiver capable of generating all the modulated signals. The FPGA

processes the complete DMX packet eliminating the need for using one PCB for each color and an internal protocol for microprocessor communication, reducing hardware and firmware complexity. Therefore, the cost of resources,

1904

materials, manufacturing and power consumption are decreased and the development step is greatly eased, significantly reducing the time to market.

Fig. 6. DMatriX RGB-70 microprocessor technology module.

Regarding the conditioning PCB, it is also important to note an improvement in terms of efficiency. In the previous work, Darlington arrays were used for driving the LEDs so, resistors were needed in the matrix design. However, as it was mentioned, in this new version LEDs are current driven by using Linear Technologies Quad LED drivers.

IV. FPGA-BASED CONTROL MODULE

A. General Scheme As already mentioned, the complete control hardware has

been included in the FPGA for this implementation. The internal structure is shown in the Fig. 7. On the left the DMX processing unit is shown. Its functionality is very similar to that carried out by a typical Universal Asynchronous Receiver-Transmitter (UART) including also the verification of the protocol as well as the generation of some required signals for the later distribution of the frames.

The central block stores the frames as they are received and classifies them according to the colour they represent, red, green or blue. This is comprised by three FIFO memories (FR, FG y FB) and some additional modules. Once the last frame of a packet has been processed, each single FIFO has to contain the whole set of values for R, G or B. Their position into the memory matches the index of the corresponding pixel into the matrix. The lateral elements represent arithmetical (a divider and a counter) and logic components included in order to coordinate both, the write/read processes to/from the FIFOs. Finally, on the right side the data distribution block is represented. A demultiplexer receives the stored frames and allocates them to the PWM units. The control signals for the FIFOs reading step come from the previous stage and they are

common to the R, G and B information processing because they are simultaneous.

The PWM units generate 210 (70x3) single modulated signals from the binary values previously received, validated, classified and stored. Two possible solutions have been proposed attending to the user defined priorities/restrictions, i.e. area or performance. The implementation details and the FPGA resources resulting from the synthesis of both solutions are shown in the following subsection.

The hardware configuration has been designed to achieve the highest level of parallelism in the data flow. When the last frame of a packet is decoded and stored, the reading, distribution and modulating steps for the R, G and B information start simultaneously. It takes to the system seventy clock cycles plus the modulation delay to generate the output values after the reception and validation of a new packet. The receiving step runs at 0.250 Mhz. but the reading one can be performed at 135 Mhz. so it runs at 100 Mhz, the frequency provided by the development board clock. In this way, the R, G and B values are provided to the PWM units during the intermediate states of the DMX protocol between the data reception of two consecutive frames. Parallelism between the writing phase of a new frame and the reading of the previous one is mandatory but as much time is saved more precision can be achieved by the PWM units.

Fig. 7. FPGA-implemented control internal scheme.

In the future, a Compact Flash Memory (CFM) will be

included in the PCB to store alternative configuration files (bitstreams) implementing different running modes included in the standard (section III). This enables the user to externally determine the bitstream to be loaded in the FPGA from eight possibilities sequentially stored in the eight available revisions of the CFM.

The described general scheme contained in a single board is a low cost version of a previous microprocessor-based solution. Even if the FPGA device is more expensive than the 15 microprocessors, the latest must deal with the R, G and B information separately. Due to this, the cost of this second

1905

option higher, as three independent boards must be implemented, together with the additional development effort of applying a communication protocol between a master and four slaves containing the PWM units. Under these conditions the cost saving reaches 66% in favor of the FPGA option presented here.

B. PWM Algorithm The available logic resources in a low cost FPGA

(Spartan2E) allow for the implementation of the complete set of 210 PWM units. The PWM units can be implemented by a timer from a binary counter and 210 comparators. In this way, the generation delay is minimized, as all of them work in parallel (the start point is nearly the same for the 70 PWM units processing only one colour information). However, they require a big amount of the logic resources. The complete system occupies 25% of the Xilinx FPGA (XC2VP30) resources and the modulation block takes up a high percentage of the required logic elements.

Generally speaking, when area restrictions are important, a different solution should be adopted. In this particular case it consists also of only one timer running at PWM frequency but checking sequentially the duty cycle of each PWM input. When the duty cycle is reached, the correspondent outputs are activated, being all deactivated at the end of the PWM period [1]. Repeating the structure as many times as desired, any number of PWM units may be implemented with the same basic hardware.

According to the already proposed scheme (parallel and independent processing for each colour), three timers have been included to provide 70x3 modulated signals from the values sequentially read from each FIFO.

In this second option the amount of internal resources is clearly smaller (the complete system needs only 9% of the FPGA logic components) but a delay between the generation processes of consecutive modulated signals is always present. The application of this methodology is possible because this delay does not become perceptible to the human eye. At the working frequency this effect remains imperceptible, even if an only timer is used to generate the set of 210 outputs.

As the available FPGA size is enough to contain all the parallel PWM units, the first solution has been selected to implement the final system that feeds the matrix.

At this point it is important to remark the cost saving achieved by using this new solution because of the already mentioned features. On the one hand, the complete system is implemented in a single device, allowing for the use of a single control PCB. On the other, because of this simple structure, a communication protocol between logic devices is avoided, clearly decreasing the development effort.

V. SOFTWARE INTERFACE

Although DMX channels are commonly generated through a lighting console, which only allows driving of a few channels,

a computer with the adequate software can also take control and drive up to 512 channels simultaneously. The DMXCreator-1024 development environment for Windows, created and distributed by VXCO Lightning Systems, is high performance professional software which allows the previous creation and debugging of shows to be played in a later performance [6].

But you can also use this powerful tool to create your own devices, and define the sliders or controls desired for playing with colors, strobe, dimmer, fade, pan, tilt, focus or rotation, and the corresponding distribution of associated channels.

In this case, a 70 pixel matrix has been created. Each pixel is composed of three sliders (one per color), and a color palette for automatically RGB mixing (Fig. 8). With only these three sliders associated to three consecutive channels, multiple effects like strobe, dimmer, flash and cross fade can be applied using any software of this kind within DMatriX.

For other lighting devices with different controls, new device templates can be added, and so, a multi-device scenario can be built, with all modules showed in the same screen. Previewing and debugging of shows is possible thanks to another useful tool provided by this software, a 3D Simulation Scenario, which allows a 3D preview of generated sequences in the composed multi-device scenario.

MIDI control is also supported, so users can drive complete system as a MIDI device through a MIDI port of computer or a MIDI console.

Multiple synchronization modes are also offered like internal adjustable synchronization, external, or manual triggering. As DMatriX is thought to work synchronously with music, a beat detector can be used, so as to increment sequence scenes by the rhythm of song BPMs (Beats Per Minute).

The DMatriX hardware driving the 70 pixel RGB matrix from the software interface in the laboratory is illustrated in Fig. 9.

VI. CONCLUSIONS

Nowadays, the use of LEDs lighting, innovative publicity or interior design in commercial areas is far extended. This work shows the effectiveness of a new FPGA-based implementation, the DMatrix FPGA RGB-70 module, as a complete hardware and software solution for driving a 70 pixel RGB LED matrix. As the design is completely modular and scalable, larger devices could be managed.

This work represents the evolution from a previous microprocessor-based version. Important improvements have been reached in terms of cost and hardware resources saving. The main advantages are related to the availability in the FPGA of enough logic elements to implement the complete control system at a low cost. It is also possible to include additional functionalities described in the standard like timing generation, data redistribution or a backup maintenance. In this way, an externally reconfigurable system is going to be prepared by means of a CFM available in the development

1906

PCB. This mechanism allows the user to change the controller functionality when the FPGA PCB starts. The design itself changes at the moment of powering the PCB or after modifying an existing logic configuration.

Fig. 8. DMatriX RGB-70 software screen capture.

Fig. 9. DMatriX implementation. This system could be also applied in the automation of

lighting of urban areas like large buildings. Centralized organization is fundamental to coordinate light sources

distributed through the complete building. Summarizing, dimming, focus repositioning, group managing or timer programming are only a few possibilities DMatriX FPGA RGB-70 can offer.

REFERENCES [1] C. López, J. Doval, M. Pereira, S. Pérez, J. Dios, O. López, “DMX512

Controller for High Brightness RGB LED Matrix”, in Proc. of the IEEE International Symposium on Industrial Electronics, ISIE’07, Vigo, pp. 3025-3029, 2007.

[2] American National Standard E1.11-2004, Entertainment Technology USITT DMX512-A, Asynchronous Serial Digital Data Transmission Standard for Controlling Lighting Equipment and Accessories, Entertainment Services and Technology Association, USA, 2004.

[3] Bennette, A., Recommended Practice for DMX512, PLASA, UK, 1994. [4] Xilinx University Program VIRTEX II PRO Reference Guide, Xilinx Inc.,

USA 2005. [5] Using the PICmicro MSSP Module for I2C Communications, AN735

Microchip Technology Inc., USA, 2002. [6] DMXCreator-1024 IDE PC Lighting Controller User Manual, VXCO

Lighting Systems, Switzerland, 2005.

1907