Embodiment
In order that those skilled in the art more fully understand the technical scheme in the present invention, below in conjunction with of the invention real
The accompanying drawing in example is applied, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described implementation
Example only a part of embodiment of the invention, rather than whole embodiments.Based on the embodiment in the present invention, this area is common
The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to protection of the present invention
Scope.
Join shown in Fig. 1, the invention discloses a kind of Multifunctional LED curtain wall control system based on K64-MCU, the control system
System includes:
PC 10, for every frame picture to be divided into multiple pieces and the file of specified format is generated, is distributed to each LED acts
The physical storage device of wall controller;
LED curtain walls controller 20, including some physical storage devices 21 and and physics for being used to store PC distribution of document
File content is parsed into DMX signals by the one-to-one control chip 22 of storage device, control chip 22, and defeated according to channel number
Go out, control chip is the K64-MCU chips of Cortex M4 kernels;
LED curtain walls 30, are connected with LED curtain wall controllers by bus, LED curtain walls by multiple block LED luminescence units and
Corresponding DMX decoders composition, DMX decoders recognize and control the colors of RGB tri-, realize that 256 gray levels are controlled.
The global design of Multifunctional LED curtain wall control system relies on the existing technology of Internet of things frame in laboratory in the present invention
Frame ISMTA is " internet+intelligence manufacture " Technical Architecture, but there is many difference therewith.Provided making full use of existing software
It is adjusted on the basis of source according to actual project demands, accelerates the development rate of system, it is ensured that the feasibility of system
And stability.
The user software of PC 10 can be divided into light fixture wiring software, web terminal control program and network transmission instrument these three
Part:It is the PC control end of system, and user can imitate data format generation according to specified lamp by wiring software and adjust
Light file is used for controller;By sending instructions under Web control programs, LED acts of remote control is realized using network transmission instrument
Wall updates the functions such as light modulation file;
LED curtain walls controller 20 is the core component of the system, and control is used as from the K64-MCU of Cortex M4 kernels
Core, carries MQX-Lite real time operating systems, realizes ethernet communication, SD card read-write, the function such as at GPS pairs, reads simultaneously
Light modulation file in SD card simultaneously exports multigroup DMX signals according to DMX512 agreements, realizes effective control to LED curtain walls;
LED curtain walls 30 are formed by connecting by many DMX light fixtures or lamp bar, and its kernel is exactly DMX decoders, are to realize that light is imitated
The basic part of fruit.DMX decoders are mainly used in receiving the DMX signals that LED curtain walls controller is sent, and are assisted according to DMX512
View is parsed, and is realized control and is managed each LED.
The overall flow of control system is as follows:
PC 10 will be divided into multiple pieces according to the hardware installation scenarios of Practical Project per frame picture, and generate specified format
File, the corresponding physical storage device of each control chip is distributed to by TCP or manual mode;Control chip is by text
Part Context resolution is exported to RS485 buses into DMX signals, and according to channel number, is recognized and is controlled by the DMX decoders of lamp interior
The colors of RGB tri- processed, realize that 256 gray levels are controlled.
The present invention uses distributed storage technology, by the light modulation data storage after video file dividing processing in each LED
In curtain wall controller, make its load balancing;The data volume of very little is only needed to can be achieved with together between each LED curtain wall controller
Step, does not interfere with overall execution efficiency;Desalinate host-guest architecture, under offline mode, master controller only serves synchronous effect,
Do not do centrally stored;And a LED curtain wall controller is gone wrong and does not interfere with whole system, and this mode is not only increased
Reliability, concurrency and the access efficiency of system, are also easy to extension, and zmodem breaches the bottleneck of original system.
The present invention is a distributed system realized by multi-controller, and the cascade necessarily involved between a controller is asked
Topic.Original scheme is by the way of Ethernet cascade, and reason is high-speed communication, and 10Mbps bandwidth is used for quick transmission and adjusted enough
Light data and control signal.But after employing distributed storage technology, it is not necessary to transmit substantial amounts of light modulation data, it is only necessary to transmit
Synchronizing signal, data volume is minimum.So the solution of the present invention selection is communicated using RS485 buses, communication the advantage is that
Mode is simple, easy exploiting, anti-interference, and cost is with respect to ethernet communication reduction a lot.RS485 traffic rates are configured to after tested
2Mbps can comply fully with requirement with proper communication.
It is a main trend of LED curtain wall control system future developments to support isomery layout.Nowadays many related LED curtain walls
Control system, when engineering is laid out, requirement light fixture is arranged according to the shape of rule, and some are with the M*N of rule rectangle LED
Module is used as display medium.The design that LED curtain walls control based on DMX512 agreements is laid out to isomery is then more rare, but
It is the one kind applied as Landscape Lamp, the roof of the characteristics of generally requiring according to building, such as ball-type, the wall of column type etc.,
Illuminant arrangement is carried out, so the present invention devises a kind of LED curtain wall control systems for supporting isomery to be laid out, so as to greatly improve it
Practicality.
The function needs to coordinate host computer light fixture wiring software to use, and according to engineering demand, user can be with arbitrarily devised cloth
The wiring of line mode, such as S types, Z-type wiring or other any-modes.User can import arbitrary format video file, wiring
Software, which can be serialized, to be output as binary file and dims file.Whether LED curtain walls controller can enable according to DMX passages
And the data length sent controls the bright dark and number of LED, so as to support isomery to be laid out.
Join shown in Fig. 2, the LED curtain walls controller 20 based on K64-MCU in the present invention, including spread footing 23 and positioned at solid
Dingan County is loaded on the control chip 22 on spread footing, and control chip is the K64-MCU chips of Cortex M4 kernels
(MK64FX512), it be grace intelligence Pu (NXP) company newest release in 2014 a 32 based on Cortex M4 kernels
Microcontroller, with FLASH and 256KB RAM on 512MB pieces;Dominant frequency highest is configured into 200MHz;24 tunnels are single-ended and 4 tunnels are poor
The A/D module (16 high accuracy) divided;8 PWM passages;1 SDHC (SD card) controller;5 UART modules;1 USB
2.0OTG interface;Up to 100 I/O pins.In addition, chip supports voltage range to be 1.71V~3.6V, operating temperature is -40
DEG C~105 DEG C.
In addition, telescopic backboard 23, which contains core board, externally provides basic interface and other functions, including for realizing SD
Block the SD card interface 231, the Ethernet interface 232 for realizing network transmission, the DMX for realizing DMX signal imitations of read-write
Interface 233, for realizing the GPS interface 234 at GPS pairs.
SD card interface 231:SD card interface is carried out data transmission with SD card by SD mode bus, SD bus packets containing main frame to
The clock signal of storage card transmission, two-way command/response signal, 4 two-way data-signals and power supply and earth signal.SD
Bus includes a main frame and multiple slaves, and using synchronous star topology, and SD buses are provided with some pull-up electricity
Resistance.
SD card is big as a kind of memory capacity, and read or write speed is fast, the cheap and physical storage device that is convenient for carrying,
It is widely used in various LED curtain walls control systems.By set these registers can so that K64 be used as main frame and SD card from
Machine is communicated.SDHC is the storage card of new generation for meeting the specifications of SD 2.0, and feature is high power capacity (being more than 2G, less than 32G), its
Corresponding file system is also from FAT16 liftings to FAT32.SD card defines two kinds of communication protocols:SD mode bus and SPI are total
Ray mode.Because SPI mode is single wire transmission, SD patterns can select 4 lines to transmit, by contrast, the transmission of SD mode bus
Speed is higher, so the SD patterns of the present invention 4 position datawires of selection, the total line frame graphs of SD such as Fig. 3.
According to SD v2.0 agreements, SD bus packets contain signals below:(1)CLK:The clock signal that main frame is sent to storage card;
(2)CMD:Two-way command/response signal;(3) DAT0~DAT3:4 two-way data-signals;(4)VDD、VSS1、VSS2:
Power supply and earth signal.
SD buses have the multiple slaves of main frame and using synchronous star topology.All storage card common clocks,
Power supply and earth signal, order (CMD) and data (DAT0~DAT3) signal are the special signals of storage card, for all card companies of offer
Continuous point-to-point connection, typical circuit connection such as Fig. 4.Many chip internals use the design method of open-drain, therefore
When exporting high level, it is necessary to which extraneous pull-up resistor, otherwise can not export high level.When selecting pull-up resistor, it can choose
The larger resistance of some resistances, it is possible to reduce stand-by power consumption.Wherein, DATA3 lines must be pulled up, and so enter SD after the power-up
Mode bus.
Ethernet interface 232:Ethernet interface include W5500 chips, W5500 chips as Ethernet interface control core
Piece.K64-MCU chips can be communicated provided with 3 SPI interfaces for same W5500 chips, the MOSI letters of K64-MCU chips
Number line connects with the MISO signal wires of W5500 chips, the MISO signal wires of K64-MCU chips and the MOSI signals of W5500 chips
Line connects.W5500 chips include TXN/TXP and RXN/RXP two paths of differential signals lines, two paths of differential signals line and Ethernet interface
In network transformer connection.
The network communications technology relies on the characteristics such as its transmission speed is fast, network configuration is simple, and industry is controlled as LED curtain walls
Study hotspot.Traditional Ethernet chip such as ENC28J60, DDM900, only encapsulate physical layer (PHY) and medium access control
Preparative layer (MAC), is required for software to realize, for example protocol stack sofeware since Internet.The system resource right and wrong that protocol stack takes
Chang Keguan's, if operated on the processor of low performance, processor will be unable to timely respond to the request of user.In order to meet
While functional requirement, programming efficiency is improved, simplifies circuit design, the system selects the W5500 chip conducts of WIZnet companies
Ethernet control chip.W5500 is a devices at full hardware TCP/IP embedded ethernet control chips, is provided for embedded system
Eased internet connection scheme.W5500 is integrated with ICP/IP protocol stack, 10/100M ethernet data link layers and thing
Layer is managed, and is equipped with RAM on up to 32K piece and is cached as data transmit-receive, the processing work of network traffic data is all turned
Move on in W5500 integrated hardwares and carry out, such main control chip only needs to undertake the logic task of application layer control information, carried significantly
High system development efficiency so that user can just expand network connection in the application using single-chip.In addition hardware TCP/IP
Can not be aggressive, it is ensured that the security for the gateway built on this basis.W5500 chips use efficient SPI protocol, support
80MHz speed, so as to preferably realize that express network is communicated.Its schematic diagram is designed according to chip handbook as shown in Figure 5.
K64-MCU has 3 SPI interfaces, can be communicated for same W5500, and wherein K64 is used as main frame, W5500 conducts
Slave.SPI protocol typically has 4 lines, wherein one is chip select line, low level is effective.Other three signal wires CLK, MOSI and
MISO.It should be noted that as main frame, K64 MOSI signal wires need and W5500 MISO connects, K64 MISO signals
Line needs and W5500 MOSI connects.This two paths of differential signals of the TXN/TXP and RXN/RXP of W5500 chips connects with network respectively
Network transformer connection in mouth HR911105A.
DMX interfaces 233:DMX interfaces include RS-485 transceivers, and RS-485 transceivers are SP3485 transceivers, SP3485
Transceiver is connected with UART modules, and UART modules Tx pins and Rx pins be respectively equipped with current-limiting resistance be connected to SP3485 receipts
Send out the DI pins and RO pins of device.RS-485 transceivers carry out communications using twisted-pair feeder, and the terminal of RS-485 transceivers is set
There is terminal resistance to eliminate the reflex by distributed inductance and distribution capacity generation.DMX interfaces also include protection circuit, protection
Circuit includes the transient voltage suppressor diode being connected in SP3485 transceiver output ends and is connected to SP3485 transceivers
Pull-up resistor and pull down resistor in output end.
The electrical characteristic of DMX interfaces is to surround industrial standard EIA-RS-485 Interface designs, corresponding to the thing in osi model
Layer is managed, using differential transfer mode.Therefore it is exactly the design to RS-485 interface circuits in fact for the design of DMX interfaces.It is right
For RS-485, it merely specify the electrical characteristic of receiving terminal and transmitting terminal, and any data protocol is not provided.
The communication interface circuit of DMX512 agreements, as shown in Figure 6.
Most basic as the present invention is also most important part, and the quality of DMX interface circuit designs is related to whole system
Stability and high efficiency, only the following aspects is reasonably designed, circuit design could be more effectively reduced
Difficulty and the cost of later maintenance.
(1) RS-485 transceivers are selected
RS-485 transponder chips are a kind of conventional communication devices.At present, received in the RS-485 of many semiconductor companies
Corresponding model can be found in hair device series of products, and these products possess good compatibility, and can directly replace makes
With, but should reasonably be selected according to different application scenarios.For example, for external device, because it is to electromagnetism or thunder
Hit impact more sensitive, defencive function can be strengthened from integrated ESD (Electro-Static discharge Electro-static Driven Combs)
RS-485 transceivers;For multi-node system, the RS-485 transceivers of optional enhanced I/O unit loads;Should for 3.3V
With system, it should from 3.3V RS-485 transceivers.It is 3.3V operating voltage in view of this controller, is supported from a
3.3V voltage supply, low-power consumption, semiduplex transceiver SP3485.It complies fully with RS-485 serial protocol electrical code, it is allowed to
Up to 128 transceivers are connected on same bus, and its message transmission rate is reached as high as in the case of load-carrying
10Mbps, with driver output short circuit protection function, can be very good to meet the design requirement of this controller.
(2) switching of RS-485 transceiver modes
The Tx pins and Rx pins of UART modules connect respectively a current-limiting resistance be connected to SP3485 chips DI pins and
RO pins.RS485 transceivers can only operate in one of " reception " or " transmission " both of which simultaneously, and RE/DE signal clocks are
During high level, transmitter effectively, forbid by receiver;When RE/DE signal clocks are low level, receiver effectively, forbid by transmitter.
Generally, the level height of the pin can be directly controlled with a pin of selection control, here for saving control
The pin resource of device, can increase a transceiver logic control circuit to it, using a triode s8050, received and dispatched
During data, automatic switchover transceiver mode.
(3) selection of terminal resistance
Actual signal transmssion line all has distributed inductance and distribution capacity, thus can produce a kind of reflex, so that
Cause system out of control.In order to eliminate this reflex, it is ensured that the reliability of RS-485 communication systems, the anti-interference of system is improved
Ability, generally installs suitable terminal coupling resistance to the end points of RS-485 communication systems.The size of the terminal resistance is depended on
The characteristic impedance of transmission cable, because RS-485 communications generally use twisted-pair feeder, and its characteristic impedance is 120W.Cause
This, the terminal coupling resistance R55 as shown in Figure 6 selected by the system also takes 120 Ω.
(4) protecting circuit designed
To improve the security of RS-485 communications, RS-485 buses are protected from the impacting with high pressure such as thunderbolt, surge, Jin Erzao
Damage into RS485 interface circuits is, it is necessary to add appropriate protection circuit, KE48 circuit parts as shown in Figure 6 to system.
KE48 is a kind of transient voltage suppressor diode, is mainly used in the standard RS-485 multicast systems of asymmetry protection
In.It protects voltage range to be -7V~+12V.The KE48 elements of the system need its No. 1 and No. 2 pins being connected to
On two output signal lines of RS-485 communication interfaces, i.e., in A the and B pins output of SP3485 chips, and No. 3 pins directly connect
Meet GND.In addition, output terminals A, B add a 4.7K pull-up resistor and pull down resistor there is provided network failure protection respectively,
Ensure to can guarantee that the stable of low and high level is exported during no signal, to improve the reliability of RS-485 nodes.
GPS interface 234:GPS interface includes NEO-7M chips, the use position for carrying out time synchronized and supervisory control device
Put.
GPS (Global Position System global positioning systems) is 1970s by land, sea, and air of the U.S.
The Aerospace Satellite navigation positioning system of new generation of joint research and development, its main purpose is provided in real time, entirely for the big field in land, sea and air three
Weather and global navigation Service, and for some military purposes such as information acquisition, Nuclear detonation monitoring and emergency communications.GPS exists
The cesium-beam atomic clock of precision is equipped with every satellite, and is calibrated by ground monitoring station, is realized and UTC (Coordinated
Universal Time world's unified times) time synchronized.GPS receives the signal of at least four satellites, according to satellite
The positional information of offer, when can calculate receiver position on earth and receiver by EMITTER LOCATION METHOD USING
Between and UTC time deviation, and carry out time synchronized calibration.
The GPS-OEM of this controller is from micro- snow electronics NEO-7M modules, and it is that the Superminiature GPS of a low-power consumption connects
Module is received, the product employs U-blox chips of new generation, hypersensitivity, precision height, accurate positioning, with comprehensive work(
Can, the smart mobile phone serviced using GPS is embedded in, tablet personal computer is mainly used in personnel positioning management, and equipment tests the speed, logistic car
The fields such as track and localization., both can be for doing time synchronized applied in this controller, and this controller can be monitored
Use position.
In order to allow GPS module to play peak performance, the actual fabric swatch of GPS interface circuit is most important.Its RF pin
The tie point of microstrip line to antenna should be as short as possible, within 2.5cm.Wrapped up around microstrip line with complete GND, in order to subtract
Few signal reflex, should try one's best and avoid 90 degree of wirings, and straight line and circular wiring are ideal.Microstrip line part PCB bottoms need paving
Complete copper.Hole is stamped in rf signal line both sides, the interference of outer bound pair signal wire is reduced, is further provided with 100M magnetic beads, specially
For suppressing signal wire, the high-frequency noise on power line and spike interference, also with the ability for absorbing electrostatic pulse.
DMX decoders in the present invention in LED curtain walls 30 include the decoding chip based on DMX512 agreements.Decoding chip is
SM16512 chips, it is the SM16512 chips of Shenzhen City Sunmoon Microelectronics Co., Ltd production, and the chip is for full-color
LED and the decoding chip researched and developed, possess 4 independent output driving passages control colors of RGBW tetra-, can be defeated by software design patterns
Go out the selection (this problem only uses tri- passages of RGB therein) of port number, for realizing 256 grades of gray-scale Control;Output is adopted
SPWM technologies are used, stable electric current output is ensure that, driving current is up to 3~60mA.Chip SOP16 encapsulating structure is such as
Shown in Fig. 7, its pin definition such as table 1.
The SM16512 pins of table 1 are defined
Data transfer is compatible and extends DMX512 agreements, and DMX signals can be recognized from two pin input chips of A, B
The frequency range of signal is 250kbps to 800kbps.Each built-in chip type EEPROM device, for the address of storage chip, leads to
Cross signal wire bus and write the multiple SM16512 chips of the disposable coding automatic of yard mode.
Each decoding chip based on DMX512 agreements is required for being endowed a numeral startup address number, this address
Numbering is the initial address of the decoding chip, and stepping address is exactly to refer to the decoding chip simultaneously to produce a few field DMX signals
Raw control action.Initial address is used for the addressing of DMX signals, to ensure that decoding chip only produce to belonging to by " oneself " control signal
Raw reaction.When the field sequence number of DMX packets is that assigned initial address sequence number is identical with the address code of certain decoding chip,
Several field DMX signals that decoding chip begins to the field and its afterwards are decoded and produce control action.It is same with this
When, other decoding chips being on same link are not reacted DMX signals.Until the control word segment number of DMX packets
When being transitioned into identical with the initial address sequence number that next decoding chip is assigned, decoding chip stopping is controlled, while next
The address code of decoding chip plays a role, in slave mode.
Examination is as an example, it is assumed that certain DMX control port drives some decoding chips, then the initial address of first decoding chip
It is 001, the initial address of second decoding chip is exactly the stepping address of 001 plus first decoding chip, it is assumed that all solutions
The stepping address of code chip is all 3, then, the initial address of second decoding chip is exactly 004, by that analogy, the 3rd solution
The initial address of code chip is exactly 007, under standard DMX512 agreements, the initial address of last light fixture and its stepping address
It is added no more than 512, but for the light fixture in this experimental subjects, its end value can be more than 512.Certain address can also
It is arranged to discontinuous, the data user rate of such words DMX packets is not just high.
The chip is mainly decorating building and stage-lighting effect LED illumination System and designed, and is highly suitable for needing
LED illumination System that will be in parallel is designed, and its application principle is as shown in Figure 8.The exception of some decoding chip does not influence it completely
Reliability and security are had more for the normal work of his chip, the constant current decoding chip concatenated compared to market, it is easy to maintenance
The features such as.
It can be seen from above-mentioned technical proposal the invention has the advantages that:
Whole system needs to support isomery layout, and software operation needs simple;
Controller supports online control function, and online use Ethernet is communicated using ICP/IP protocol, under on line state
The effect files in light units switch lamp, information inquiry, light modulation and long-range more new memory can be realized;
Controller supports unit function, each machine in system can hosted, controller can be according to software and hardware
Configure automatic identification the machine and be in Host Status either slave status, all slaves of host synchronization read the effect in memory
File is played out;
SD or TF cards are supported to be used as storage medium;
The DMX signals of controller output are capable of the DMX light fixtures of compatible in the market, and its signal baud rate can configure.Every control
Device rear end processed is directly connected to DMX light fixtures, it is not necessary to other sub-controls;
Calculated according to each DMX packets 23ms, the limit of the play frame rate based on DMX512 agreements is 44 frames/second, control
Device processed can realize freely adjusting for play frame rate;
Controller can carry out write once location to most DMX decoders of in the market.
It is obvious to a person skilled in the art that the invention is not restricted to the details of above-mentioned one exemplary embodiment, Er Qie
In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, embodiment all should be regarded as exemplary, and be nonrestrictive, the scope of the present invention is by appended power
Profit is required rather than described above is limited, it is intended that all in the implication and scope of the equivalency of claim by falling
Change is included in the present invention.Any reference in claim should not be considered as to the claim involved by limitation.
Moreover, it will be appreciated that although the present specification is described in terms of embodiments, not each embodiment is only wrapped
Containing an independent technical scheme, this narrating mode of specification is only that for clarity, those skilled in the art should
Using specification as an entirety, the technical solutions in the various embodiments may also be suitably combined, forms those skilled in the art
It may be appreciated other embodiment.