LED controller design and development

With the development of the Internet and technology, and the continuous progress of society, there are more and more tools for people to entertain and relax. The LED controller can be made into a high

With the development of the Internet and technology, and the continuous progress of society, there are more and more tools for people to entertain and relax. The LED controller can be made into a high-tech electronic toy that uses the "visual persistence effect" to work. Products such as manufactured rockers are one of the hot products. The controller is a sensory effect based on the principle of persistence of human vision. When shaking the LED controller, the persistence of human vision will produce a visual plane in the shaking area of the light-emitting diode. When implemented, the controller can make the above LED lights display text and graphics at the appropriate position across the air, so as to achieve the visual The role of conveying information on the plane. The finished product of this kind of controller is more and more common in various cultural and sports activities, increasing the effect of the event.

1. Design principle of LED controller

There is a phenomenon of persistence of vision in human eyes. It is because of the slow response of the eyes that it enriches the human visual experience. This system is designed based on this principle and is a high-tech product of linear array LED motion imaging developed by the latest patented electronic technology. . When the LED controller is shaking at different positions, the LEDs located in a straight line will display different rows of two-dimensional images, and use the visual persistence effect of the human eye to realize the graphic scanning display. The control of the output signal frequency is realized by FPGA, and 32 light-emitting diodes are used for refreshing with different frequencies. When shaking, due to the persistence effect of human vision, a visual plane will be generated in the light-emitting diode shaking area. The diodes in the visual plane will be refreshed at different frequencies to produce an image in the shaking area, so as to reach the visual plane. The role of uploading information. From the data analysis, the time required to move from one side to the other is 0.1s. If 0.1s is divided into 64 parts, the graphic display time of each column is 1562um. Each column corresponds to 32 LED light-emitting diodes, and then the corresponding column of the graph is displayed in each time, then a complete graph display can be obtained.

LED is the abbreviation of Light Emitting Diode (Light Emitting Diode, LED), also known as light emitting diode. This kind of semiconductor component is generally used as indicator light and display board. It can not only directly convert electrical energy into light energy with high efficiency, but also has The longest life span of tens of thousands of hours, and can save electricity and other advantages. The design adopts a common cathode connection method. When a voltage of 5V is applied to the anode of the LED, the LED will have current through it, and the LED will emit light. When the two ends of the LED are high, although there is a small voltage difference, the current generated by the small voltage difference cannot drive the LED lamp to emit light. Generally, the driving voltage of LED lamps is above 1.5V, and the current must be above 200mA. The driving voltage and current of different LEDs are different. In addition, for the mercury switch module, as a mode sensor, because of gravity, mercury droplets will flow with the lower part of the container. If two electrodes are contacted at the same time, the switch will close the circuit, turn on the switch, and control the system. Image display.

2. Analysis of LED controller system scheme

The realization of the LED control module is made by using the visual persistence characteristics of the human eye. The LED luminous tube is used as the display of each column of the screen, and the left and right shaking plays the role of scanning. The visual persistence phenomenon of the human eye makes what you see is a picture The complete picture. However, in the LED display module, if the number of LED lights is too small, the resolution will eventually be reduced when displaying text, and the displayed image is not delicate enough. Therefore, the original design uses 32 LED light-emitting diodes as Examples are explained.

In addition, when the controller is shaking, if the displayed text, image and other information are not symmetrical, reverse ghosting will occur when the image information continues to be displayed during the flyback process, resulting in image or information display Wrong, this design uses mercury switch or inertial switch to solve this problem. When the controller is shaking, through the gravity action of the mercury switch, the circuit will only be turned on when it is shaken in a certain direction, and graphics, text and other information will be displayed at the same time, and the switch will automatically turn off during the reverse sweep, and the LED will glow. The diode does not display the content, so it can be controlled by connecting a mercury switch, so that when the LED controller shakes from one direction to the other, the content is clearly displayed, eliminating the problem of ghosting.

Three, LED controller development method

3.1 Hardware design

The power supply VCC of the hardware circuit of this system is derived from FPGA. The 32 I/O interfaces in the system are connected to high-brightness LEDs and pull-up resistors in a common cathode manner. The I/O ports output high level to light up the small lights and switch with mercury. As a direction sensor, it sends a display status signal to the FPGA controller. The system hardware circuit includes 3 parts: mercury switch module, LED display module and I/O interface module. Hardware circuit module.

Among them, the mercury switch module realizes the function of the direction sensor to determine the shaking direction of the entire controller. The direction of the mercury switch is upward and slightly to the right. When the rocking stick is like a right shake, the sensor returns a rising edge signal through the I/O interface. Information link. After FPGA receives the rising edge signal of the sensor, it starts to execute a cycle of display code and transmits it to the LED display module through the I/O interface. This design FPGA experiment development board is based on EP3C5E144 of ALTERA company as the platform.

During a period of display time, FPGA automatically shields the sensor return value during this period, and when the display period end determination takes effect, FPGA receives the return value of the sensor module again. In this way, it is possible to avoid confusion in the displayed content when the joystick is shaken back and forth, for example, the double image of positive and negative fonts causes the correct content to be displayed clearly and accurately.

3.2 Software design

This design adopts the combination of FPGA-based VHDL language and schematic diagram to realize the design in a bottom-up engineering sequence. First of all, the bottom layer is composed of 7 modules, namely: phase-locked loop, frequency divider, sensor signal level one determiner, sensor signal level two determiner, feedback device, timing controller and output data selection and decoder.

(1) Frequency divider and timing controller module design: The frequency divider module divides the input signal by 100 through the CLK clock signal input. The input signal is the phase-locked loop output signal. The output signal FREOUT is used as the timing controller input. The controller receives the 1MHZ frequency signal output by the frequency divider, receives the enable signal of the timing controller output by the center controller, outputs the timing execution end signal to the center controller, and outputs the font code data selection signal to the output data selection and decoding This module is generated by programming in VHDL language.

(2) Sensor signal determiner module design: The sensor signal determiner has two levels. The first level determiner realizes the preliminary determination of the return value of the mercury switch, and makes necessary preparations for the second level determiner to determine the rising edge. It also integrates There are three intelligent judgment units, including two high-level timing intelligent judgments and one low-level timing intelligent judgment. The high-level intelligent judgment generates a 2-second and 4-second timing trigger signal, and the low-level intelligent judgment realizes the occurrence of a 2-second timing reset signal. The sensor signal second-level determiner strictly determines the rising edge of the first-level signal. If it is a rising edge, the central controller with integrated feedback is enabled, and the feedback clear signal is received as one of the determination conditions.

(3) Design of the central controller module with integrated feedback: this module receives the end signal of the timing controller and the enable signal of the central controller output by the second arbiter, and outputs the enable signal of the timing controller and the feedback clear signal to The second determiner. The controller receives the cycle display end signal from the timing controller, and outputs the display clear signal after processing, so that the LED controller is active in one direction when it is moving, and the display in the other direction is invalid.

(4) Software top-level design: all seven modules are successfully written by seven independent VHDL programs and generate schematic components. Secondly, the top part is designed based on the schematic diagram. The VHDL components at the bottom are connected to a complete circuit after adding input and output ports according to the corresponding principles. There are two inputs and 32 outputs, which are: FPGA 20MHZ input, mercury switch return Value input, 32 LED anode output.

Fourth, the design concept of smart LED desk lamp

There are many kinds of lamps on the market now, ordinary desk lamps are powered by 220V AC power, fluorescent tubes, incandescent bulbs as light sources, manual switches or touch-sensitive switches to control.

Now desk lamps are almost a necessities of ordinary family life, there are two modes of desk lamps, manual and automatic. People in modern society often forget to turn off the lights and cause energy consumption. As a necessity, it must have a beneficial impact on people's lives. It can prevent you from worrying about turning on the lights in the dark, and it can correct people's sitting posture. The infrared sensor senses the intensity of the infrared light of the human hand to control the single-chip microcomputer. The single-chip microcomputer controls the LED drive circuit to control the brightness of the LED light. In addition, the infrared sensor sensing system and the timing system can calculate the learning time of reading, which exceeds the time on the timer. An alarm will be issued and the brightness of the LED light will be reduced to remind learners of the learning time and eye protection. When the power fails, the LED light can be powered by a 5V rechargeable lithium battery.

(1) Functional principle: In the design of desk lamps, lighting requirements must be met. Different lighting methods and lamps should be selected according to different spaces, different places, and different tools, and the illumination and brightness should be maintained. For example: the lighting design of the reading and writing desk should adopt vertical lighting, so that the brightness is evenly distributed, and prevent glare; in order to attract the attention of a large number of customers, strong lights are generally used for prominent lighting , Its brightness is about 3 to 5 times higher than normal lighting brightness. In order to make the products more three-dimensional, texture and advertising effect, many businesses often use directional lighting lamps and use color light to make the products more Has artistic appeal.

(2) The principle of economy: When designing lighting, you can't just think about more. The key is to be scientific and practical, and use it reasonably. The lighting design is mainly to satisfy people's visual enjoyment and aesthetics, to maximize the beauty of the indoor space, and is the unity of utilization and aesthetics. Some lighting in the society not only can not increase the beauty, but self-defeating, resulting in power consumption, causing economic losses, and most likely to cause light environmental pollution and harm the body. According to the lighting standards of modern society, the scales used are also different because of the differences in usage and resolution.

(3) The principle of safety: Lighting design should not be used at will, design at will, and safety must be paid attention to. Because lamps use power sources, the harm of electricity to the human body can be imagined, so relevant safety measures such as anti-shock and anti-breaking must be taken to prevent accidents as much as possible and minimize the incidence of accidents.

Five, the component design of the LED desk lamp solution

(1) Drive circuit: LED driver: In order to meet the requirements of different input voltage, output current and different number of LEDs, semiconductor device companies have developed various types of white light LED drivers. In addition to driving white LEDs, the driver can also drive blue LEDs or LEDs of other colors. In addition, the driver has the characteristics of constant output or programmable constant current output, so the driver can be used as a regulated power supply or a programmable constant current source.

(2) Requirements for LED drivers: LEDs are not only used for LCD backlighting, but in recent years are slowly used as lighting, flashlights and strobe equipment. White LED has also developed from low power to medium power and high power (current up to 100mA). The flashlight of the light uses high-power white LED to produce dazzling light in the night sky, and the advertising effect is obvious. The driver can be regarded as a special power supply for the LED. It can drive white LEDs with a forward voltage drop of 3.0V to 4.3V, and can drive multiple white LEDs in series, parallel or series/parallel as required to meet the drive current requirements.

(3) Commonly used LED power drive schemes: There are many schemes for LED power drive, and there are different schemes in the technical realization of LED power converters. According to the level of power supply voltage, LED power drivers can be divided into low voltage drive (power supply voltage is 0.8 ~ 1.65V), transition voltage drive (power supply voltage is 4V), high voltage drive (power supply voltage is greater than 5V) and mains power supply.

6. Debugging and solutions of smart LED desk lamp circuit

6.1 The problem of LED lighting angle of desk lamp

Many LED lens packages are different even if they have a uniform light-emitting angle (nominal angle), the result is different, making the extraction of the condenser more difficult, and it is still not universal.

In this design, if there is no treated light directly, it must be uneven, and the spacing between the LEDs will also affect. The light in the emitting angle of the LED is not uniform, but gradually weakened in the middle and around. This is why LED light products use LENS or reflector cups for light treatment.

6.2 Low LED efficiency of desk lamp (luminous rate)

The luminous efficiency of the LED of this design is really divided into two major blocks: internal quantum force and external quantum effect. Generally speaking, the internal quantum effect is the effect of electron transition to generate photons. Decrease non-radiative transitions-reduce non-radiative recombination centers (mainly if crystal defects) to form a constant necessary energy level difference-(1) effective doping; (2) lower junction temperature.

6.3 Insufficient LED brightness of desk lamp

This design uses different grades of chips to package the brightness to be different, and the LED can be made brighter by increasing the current. When the circuit is low, the brightness is darker.

6.4 Dead lights appear

The LED dead light phenomenon in this design mainly has the following two situations: open-circuit dead light and short-circuit dead light.

The reasons for the open-circuit dead light are: (1) The solder joints in the LED are unreliable; the chip solder joints are contaminated; the bracket's electrical layer does not meet the standard, and the wire is too thin, resulting in insufficient solder joint tension; internal stress caused by not completely fixed Lead to the loosening of solder joints, etc.; (2) Caused by virtual soldering during the LED and PCB soldering process.

The reasons for the short-circuit dead lamp are: (1) The anti-static (ESD) of the LED chip is poor, and the direct mode withstand voltage is less than 300v; (2) The reliability of the power supply is insufficient or mismatched to cause the LED overcurrent and overvoltage. .

During debugging, the open circuit dead light caused by the instability of the solder joints in the LED is the cause of the material and process in the LED production process, and the quality problem of the LED. I passed the temperature test, thermal shock test, High-temperature and high-humidity aging experiment to screen out reliable solder joints. The dead light caused by the virtual welding in the LED and PCB welding process of this design is caused by the process when using the LED to process the product, so the problem should be solved from the following aspects: (1) The welding temperature is maintained at about 260 degrees Celsius, and the time is controlled at 3S Within 5S; (2) Before the soldering temperature returns to normal, be sure to prevent any jitter or other external force from the LED; (3) The soldering point is above 2.5mm from the bottom of the colloid; (4) When the LED is bent or folded Attention should be paid to the gap of more than 2mm connected with the colloid to prevent the inner bracket of the LED colloid from being separated from the gold wire.

In the design process, the reliability of the power supply is insufficient or mismatched will cause LED overcurrent, overvoltage and lead to damage to the LED, so when selecting, we must pay attention to the reliability of the LED power supply and the matching with the LED: (1) Under voltage In terms of matching, the LED is driven by a low voltage of about 2-3 volts, and a complicated conversion circuit must be designed. The LED lights for different purposes must be equipped with different power adapters. Therefore, the design is very careful in application; (2) In terms of current matching, the normal working current of the LED is 15mA-18mA. When the power supply current is less than 15mA, the luminous intensity of the LED is not enough, and when it is greater than 20mA, the luminous intensity will be weakened. , At the same time, the heat is greatly increased, the aging is accelerated, and the life is shortened. After the test, it will be damaged quickly when it exceeds 40mA.

to sum up

This article uses high-brightness LED light-emitting diodes and mercury switches to design an FPGA-based LED controller model. The controller can not only illuminate, flash patterns, but also be used as a commercial product. Refresh the high and low levels of the output ports connected to 32 LEDs in time sharing to realize the display of text, patterns and other information, which greatly shortens the development cycle, improves the stability of the system, and improves the system upgrade and expansion conditions.