Summary of the invention
Technical problem to be solved by this invention is the above-mentioned deficiency at prior art, proposes a kind of use safety and LED control system easily.
The technical scheme that the present invention solves its technical problem employing is to propose a kind of LED control system, it comprises for light signal emission system and the reception of a plurality of light signal and treatment system according to user instruction emission light signal, described light signal is accepted and treatment system comprises for detection of described light signal and described light signal is converted to the optical signal detecting module of current signal, be used for described current signal is converted to the voltage signal modular converter of voltage signal, be used for described voltage signal is converted to the digital signal acquisition module of digital signal, to be used for described digital signal decoding be the decoder module of user instruction and be used for signal judge module according to described user instruction control apparatus on/off.
Further, described signal judge module also comprises comparing module, and it is pre-conditioned that described comparing module judges whether user instruction that the decoding of described decoder module obtains meets, if meet then according to described user instruction control apparatus on/off.
Further, described LED control system also comprises the second verification module, and whether the user instruction that described second calibration mode block check decoder module decoding obtains goes wrong.
Further, the described second verification module adopts the described user instruction of CRC check compute mode verification.
Further, described voltage signal modular converter adopts logarithmic amplifier that described current signal is converted to voltage signal.
Further, described digital signal acquisition module comprises operational amplifier and comparator, described voltage signal exports described operational amplifier and described comparator respectively to, described operational amplifier is exported the average volt value of described voltage signal to described comparator, described comparator is compared volt value and the described average volt value of described voltage signal, output digital signal " 1 " when the volt value of described voltage signal is higher than described average volt value, output digital signal " 0 " when the volt value of described voltage signal is lower than described average volt value.
Further, described light signal emission system comprises the light signal transmitter module, the instruction memory module that is used for the storage user instruction, be used for described user instruction is encoded to binary-coded coding module, be used for described binary coding is converted to the signal conversion module of lower edge triggering signal, be used for driving the driver module that described light signal transmitter module sends visible light signal according to the described lower edge triggering signal that goes up.
Further, described light signal emission system is integrated in remote controller, mobile phone, flashlight, MP3 or the panel computer.
The present invention also provides a kind of LED control method, comprises step:
User instruction is launched with visible light signal;
Receive described visible light signal, described visible light signal comprises the LED light signal;
Described visible light signal is converted to current signal, described current signal is converted to voltage signal, described voltage signal is converted to digital signal;
Be user instruction with described digital signal decoding and switch on or off appliances power source according to described user instruction.
Further, described user instruction is encoded as binary data, and described binary data is converted into the lower edge triggering signal, and the described lower edge triggering signal driving light signal transmitter module of going up sends visible light signal.
The present invention adopts the mode of visible light communication to realize controlling the function of public place electrical equipment break-makes such as hospital, supermarket, market, library, its transmission rate is up to the per second gigabit, and the transmission of visible light transmission of data is adopted in optical communication, its data should not be disturbed and be caught, simultaneously optical communication equipment make simply, not fragile or demagnetization.Compare radio-frequency technique, because the frequency range of wireless electromagnetic wave communication is occupied more, available frequency band is less, and the frequency spectrum resource of optical communication is abundant, the designer can choose at random that the frequency of suitable operative scenario designs, and optical communication can be used any communication protocol, be applicable to any environment.Further, light signal emission system of the present invention can be made as independent optical signal transmitter, also can be integrated in all kinds of portable equipments that can send visible light, for example be integrated in mobile phone, MP3, flashlight, the panel computer etc., the user who has promoted the user greatly experiences, and makes that operation is more convenient and quick.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Please refer to Fig. 1, Fig. 1 is the structural representation of LED control system of the present invention.Among Fig. 1, this system comprises that light signal emission system 1 and a plurality of light signal receive and treatment system 2.Light signal emission system 1 is launched user's operational order with the visible light form, this visible light can be LED light; A plurality of light signals receptions and treatment system 2 are also finally exported control signal to each electrical equipment with its decoding, comparison after receiving visible light signal.
Please refer to Fig. 2, the structural representation of Fig. 2 light signal emission system 1.Light signal emission system 1 comprises light signal transmitter module 10, and in the present embodiment, light signal transmitter module 10 is the LED lamp; The instruction memory module 11 that is used for the storage user instruction, the instruction of storage can be the open command of opening each electrical equipment and the out code of closing each electrical equipment in the instruction memory module 11, and the input of open command and out code can adopt button to import or touch modes such as control input; Be used for to instruct the user instruction of memory module 11 storages to be encoded to binary-coded coding module 12, in the present embodiment, can described instruction be encoded to binary data by the Manchester's code mode; Be used for described binary data is converted to the signal conversion module 13 of lower edge triggering signal; Be used for driving the driver module 14 that described light signal transmitter module 10 sends visible light signal according to the described lower edge triggering signal that goes up.Particularly, when driver module 14 receives the rising edge triggering signal, trigger light signal module 10 and light, when driver module 14 receives the trailing edge triggering signal, trigger light signal transmitter module 10 and extinguish.Preferably, for fail safe and the stability that guarantees to instruct, comprise also behind coding module 12 whether the first verification module, 15, the first verification modules, 15 check code modules, 12 encoded binary coding goes wrong.In the present embodiment, the first verification module 15 adopts CRC (Cyclic Redundancy Check) verification compute mode to the binary coding verification.
In the present embodiment, instruction memory module 11, coding module 12, signal conversion module 13, verification module 15 can be integrated among the MCU (Micro Control Unit).Light signal emission system 1 can be made as independent optical signal transmitter, also can be integrated in all kinds of portable equipments that can send visible light, for example is integrated in mobile phone, MP3, flashlight, the panel computer etc.
As shown in Figure 3, Fig. 3 is the structural representation of light signal reception and treatment system 2.Light signal receives and treatment system 2 comprises that optical signal detecting module 20, described optical signal detecting module 20 also are converted to current signal with this light signal for detection of the light signal of light signal emission system 1 emission; Be used for described current signal is converted to the voltage signal modular converter 21 of voltage signal, in the present embodiment, current signal is converted into voltage signal by logarithmic amplifier; Be used for institute's voltage signal is converted to the digital signal acquisition module 22 of digital signal; In the present embodiment, digital signal acquisition module 22 comprises operational amplifier 220 and comparator 221, voltage signal exports operational amplifier 220 and comparator 221 respectively to, wherein operational amplifier 220 obtains whole volt value derivation of voltage signal its average volt value and should average volt value export comparator 221 to, comparator 221 is differentiated voltage signal according to this average volt value, output digital signal " 0 " when the volt value of voltage signal is lower than average volt value, output digital signal " 1 " when the volt value of voltage signal is higher than mean value; Being used for digital signal decoding is the decoder module 23 of light signal emission system 1 instruction of sending, and the decoding process of decoder module 23 is corresponding with the coded system of coding module 12, is the manchester decoder mode in the present embodiment; Signal judge module 24 is used for the user instruction control apparatus on/off that obtains according to decoding.Preferably, also comprise comparing module in the described signal judge module 24, this comparing module is used for judging whether the instruction that decoding obtains meets pre-conditioned, if meet the operation of then according to instruction electrical equipment being cut off the electricity supply accordingly or connecting power supply, then can not select to be failure to actuate or output alarm information if meet.This is pre-conditioned can be that the instruction that obtains of decoding is consistent with the instruction that is stored in signal judge module 24 inside, also can be that the instruction that obtains of decoding and the instruction that is stored in signal judge module 24 inside exist corresponding relation.
Preferably, comprise also behind decoder module 23 whether the instruction that 23 decodings of the second verification module, 25, the second verification modules, 25 verification decoder modules are come out goes wrong.In the present embodiment, the 25 same CRC (Cyclic Redundancy Check) of the employing verification compute mode instruction verifications that 23 decodings are come out to decoder module of the second verification module.
The present invention adopts the mode of visible light communication to realize controlling the function of public place electrical equipment break-makes such as hospital, supermarket, market, library, its transmission rate is up to the per second gigabit, and the transmission of visible light transmission of data is adopted in optical communication, its data should not be disturbed and be caught, simultaneously optical communication equipment make simply, not fragile or demagnetization.Compare radio-frequency technique, because the frequency range of wireless electromagnetic wave communication is occupied more, available frequency band is less, and the frequency spectrum resource of optical communication is abundant, the designer can choose at random that the frequency of suitable operative scenario designs, and optical communication can be used any communication protocol, be applicable to any environment.
The present invention also provides a kind of method of LED control apparatus break-make, and the flow chart of this method as shown in Figure 4.This method comprises:
S1: user instruction is launched with visible light signal;
Particularly, this user instruction can be to be connected the appliances power source instruction or cuts off the appliances power source instruction, and this user instruction is compiled as binary data earlier, and compile mode can be the Manchester's code mode; Binary data is converted into the lower edge triggering signal, and last lower edge triggering signal drives the light signal transmitter module and sends visible light signal.
S2: receive described visible light signal, described visible light signal comprises the LED light signal;
S3: described visible light signal is converted to current signal, described current signal is converted to voltage signal, described voltage signal is converted to digital signal;
Particularly, voltage signal is at first solved the average of its magnitude of voltage, then distinguish each magnitude of voltage and this average of comparative voltage signal, output digital signal " 1 " when the magnitude of voltage of a certain voltage signal in the voltage signal is higher than average is when the magnitude of voltage of a certain voltage signal in voltage signal output digital signal " 0 " during less than average.
S4: be user instruction with digital signal decoding and switch on or off appliances power source according to this user instruction;
To instruct the coded system of encoding corresponding among decoding process and the step S1 of digital signal decoding for instruction, in the present embodiment, all adopt Manchester's code mode or decoding process.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosed is preferred embodiment of the present invention only, can not limit the present invention's interest field certainly with this, and therefore the equivalent variations of doing according to claim of the present invention still belongs to the scope that the present invention is contained.