Colorful lights play an important role in beautifying and brightening the city. As an important part of the color lamp, the color lamp controller has attracted much attention. The traditional color lamp control circuit is generally composed of digital circuits, so the structure is complex, the cost is high and the power loss is large. Moreover, the aging of the circuit and the change of the mechanical components will lead to the instability of the trigger circuit power switch, and eventually make the color lamp often fail. This paper designs a color lamp controller based on VHDL. Compared with the traditional design, the design has the advantages of fast speed, small size and light weight. Colorful lanterns play an important role in beautifying and brightening the city. Therefore, thermostatic element as a city decoration, the demand for color lanterns is increasing. People begin to pay attention to the pattern, creativity and other elements of color lanterns at this time. As an important part of color lanterns, the color lantern controller has attracted more and more attention. Based on the traditional mechanical and pure circuit control mode, there are very serious drawbacks. The traditional color lamp control circuit is generally composed of digital circuit. This kind of color lamp controller circuit has complex structure, high cost and high loss. Once the circuit is aging and the change of mechanical components, it will lead to the unstable power supply switch of trigger circuit, which makes the color lamp unstable. Faults often occur. This design is based on VHDL color lamp controller design, to achieve the control of LED color lamp. Mainly using the minimum system of the FPGA as the main control core and the circuit composed of light emitting diodes, resistors, switches and so on, using software compilation to achieve the effect of color lamp pattern conversion, can effectively remedy the shortcomings and shortcomings of the original traditional color lamp control circuit. The hardware of the color lamp controller can be divided into two modules: the main control core and the peripheral circuit. Through these two modules, the design of the whole color lamp controller can be realized. In order to simplify the design and reduce the design cost, the main control core of the color lamp controller is the smallest system of Altera’s FPGA, which carries the chip EP2C5Q208C8N of Cyclone II series. The peripheral circuit is divided into two parts: LED display circuit and switch control circuit.
The circuit of the LED display module is composed of eight LED light-emitting diodes, eight 300 ohm resistors. One end of the resistor is connected with the light-emitting diode, and the other end is directly grounded. The switch control circuit consists of four four four feet touch unlocked switches and four 10K ohms of electronics. One foot of the switch is grounded to the foot resistance, the other two feet are suspended, and the other end of the resistance is connected with another row of pins. Firstly, debug the external circuit of the system and the smallest system of the FPGA; under the condition that these two parts can work normally, the hardware part of the whole system is normal. The whole debugging process is divided into three debugging modules: circuit board on-off debugging, power circuit debugging and key selection debugging. In debugging PCB, it is necessary to compare whether PCB and PCB conform to each other intuitively. In particular, attention should be paid to whether the copper wire is broken, whether the through hole is opened, and whether the size of the solder pad conforms to the design rules. But in the actual test, it is impossible to explain the problem only by looking at it with the eyes.
Multimeter is needed to assist in debugging.
Put the universal transformer into the on-off gear, test whether all ground wires are connected or not, and test the on-off of copper wires in key parts. After testing, we can confirm that the PCB board is in line with the PCB board. But it does not mean that it can work, so the correctness of the board should be determined by combining with the module debugging. Looking at the power indicator intuitively, if it is bright, it indicates that the output voltage of the power supply is in the normal range, but this does not guarantee that the power supply is suitable for the external circuit.
So it is necessary to test the power supply on the other hand. Using multimeter or oscilloscope to test the value of power supply voltage, judging from data whether the voltage is suitable for the system I designed. When the power supply circuit is working normally, the power indicator lamp can glow normally, and the voltage measured by the multimeter is normal, which indicates that the power supply debugging is successful. The level of the output port when pressing the button; by comparing the two results, we can know whether the button can be turned on or off properly. The specific design process of the software can be summarized as design description, establishment of VHDL behavior module, VHDL behavior simulation, VHDL-RTL level modeling, front-end function simulation, logic synthesis, test vector generation, function simulation, structure synthesis, gate-level timing simulation, hardware testing, and finally the design is completed.
The top-level file is composed of two sub-modules: speed control module and color lamp display module. The speed control module is mainly composed of three parts: the initial frequency division part, the key control part, and the final clock output according to the speed adjustment process under any frequency division. The color lamp display module is displayed by eight LED color lights in the peripheral circuit. They are flow lamp, turn on in turn, from both sides to the middle, from the middle to both sides, odd number flicker, even number flicker with different patterns and self-circulating transformation, which can reset and clear zero. Next, download the program. After downloading the program, debug the software. At the same time, debug the software can further debug the correctness of the hardware. The debugging method of the software is to burn the program written before into the chip and run it directly. The driver program of each module is run, and then the successful debugging is illustrated by observing the normal operation of the peripheral circuit, i.e.
, the switch control circuit and the LED display circuit.