CN106231760B - A kind of family's lamp intelligent switch method based on Internet of Things - Google Patents

A kind of family's lamp intelligent switch method based on Internet of Things Download PDF

Info

Publication number
CN106231760B
CN106231760B CN201610824715.8A CN201610824715A CN106231760B CN 106231760 B CN106231760 B CN 106231760B CN 201610824715 A CN201610824715 A CN 201610824715A CN 106231760 B CN106231760 B CN 106231760B
Authority
CN
China
Prior art keywords
control
lamp
family
switch
motor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610824715.8A
Other languages
Chinese (zh)
Other versions
CN106231760A (en
Inventor
汪梅
赵海强
徐长丰
朱阳阳
张松志
牛钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Science and Technology
Original Assignee
Xian University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Science and Technology filed Critical Xian University of Science and Technology
Priority to CN201610824715.8A priority Critical patent/CN106231760B/en
Publication of CN106231760A publication Critical patent/CN106231760A/en
Application granted granted Critical
Publication of CN106231760B publication Critical patent/CN106231760B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/16Controlling the light source by timing means
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/175Controlling the light source by remote control
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/175Controlling the light source by remote control
    • H05B47/19Controlling the light source by remote control via wireless transmission
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The invention discloses a kind of family's lamp intelligent switch device and method of switching based on Internet of Things, the device includes switch state detector, switch controlling device and the data processing terminal being connected with switch controlling device, the light fixture by family's lamp is controlled to be controlled by mechanical switch;Switch controlling device includes the electric driving mechanism that main controller and driving mechanical switch are acted, and electric driving mechanism includes motor and motor-drive circuit by main controller control, electric driving mechanism;Switch state detector is connected with main controller;The method of switching includes step:First, data processing terminal sends switching control instruction;2nd, switching control instruction is received and switch control:Main controller by control family lamp to carrying out opening control or closing control.The present invention is reasonable in design and uses easy to operate, using effect good, and energy is easy, be rapidly completed family's lamp switch control process, and without to being adjusted by the mechanical switch structure of control family lamp with circuit is connected.

Description

A kind of family's lamp intelligent switch method based on Internet of Things
Technical field
The invention belongs to Household appliance switch control technology field, used more particularly, to a kind of family's lamp based on Internet of Things Intelligent switch method.
Background technology
The English name of Internet of Things is Internet of Things, is literal translated as article internet.China be in the world compared with The early country for carrying out extensive Internet of Things theoretical research and technological development, is also International Telecommunication Union's technology of Internet of things standard formulation One of main sponsor nation, and substantially promoted research and formulation in the world about technology of Internet of things standard.But it is near Several years, the research of the Internet of Things of China experienced Internet of Things research boom to the transformation of Internet of Things research low ebb, although with the world Internet of Things research gradually obtain it is academic pay close attention to some contradictions, but this also allows us to set aside all worries thinking Internet of Things academic research Essential connotation.Internet of Things is defined as " internet of connection article " learned, it is generally recognized that " network of connection article ". But the network of article " connection " is a very wide in range concept, with information and communication technology (ICT) (ICT) development, many articles It is all connected to device in network and forms internet of things equipment, the article for for example carrying radio frequency identification code (RFID) is all connected to net In network, many devices in Industry Control, environmental Kuznets Curves, traffic control are also coupled in network.But nowadays to Internet of Things When equipment is designed, there are still following several respects problem:
Firstth, the common internet of things equipment of in the market is substantially integrated good, to go here and there and be controlled in circuit when using System, therefore original equipment is dismantled, and transform original circuit;And to not dismantling, being inconvenient to dismantle and forbid dismounting Equipment then feel simply helpless, leverage the scope that internet of things equipment is used.
For example, generally, the control mode of internet of things equipment is:Produce and the electronic switch of controlled device is controlled The switch controlling signal of system, is controlled by the switch controlling signal to electronic switch, and controlled device is carried out so as to reach The purpose of control;For non-removable mechanical switch (be usually hand switch), the control mode used for:By manual Operation machinery switch motion, to be controlled to controlled device, thus can not be controlled using Internet of Things to the controlled device. Wherein, mechanical switch, refers to make the element of contact disconnection, connection or change-over circuit by mechanically actuated, need to be using machinery touching Mode changes the break-make of circuit, such as fills light switch on the wall.
When the secondth, being controlled to non-removable mechanical switch, traditional internet of things equipment is typically all not provided with detection The device of the mechanical switch state;
3rd, when traditional internet of things equipment is controlled mechanical switch, generally it is only capable of realizing to mechanical switch progress Switch control, function is more single.
The content of the invention
In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is that providing a kind of based on Internet of Things Family's lamp intelligent switch device of net, its is simple in construction, reasonable in design and good using easy to operate, using effect, energy simplicity, Family's lamp switch control process is rapidly completed, and without to being carried out by the mechanical switch structure and connection circuit of control family lamp Adjustment.
In order to solve the above technical problems, the technical solution adopted by the present invention is:A kind of family's lamp intelligence based on Internet of Things Energy switching device, it is characterised in that:Including the switch state detector to being detected by the on off state of control family lamp, To the data processing terminal for by control family lamp switch the switch controlling device of control and be connected with switch controlling device, institute It is the light fixture that is controlled by mechanical switch to state and controlled family's lamp, and the mechanical switch is serially connected in described by control family lamp In current supply circuit;The motorized motions machine that the switch controlling device includes main controller and drives the mechanical switch to be acted Structure, the electric driving mechanism is controlled by main controller;The electric driving mechanism include motor and with the driving Motor connection and the motor-drive circuit being driven to the motor, the motor-drive circuit are connected with main controller; The switch state detector is connected with main controller, between the data processing terminal and main controller in a wired or wireless fashion It is attached.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The data processing terminal is Panel computer or smart mobile phone.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The data processing terminal with Wirelessly it is attached between main controller.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The switch controlling device is also Including the first wireless communication module being connected with main controller;The data processing terminal includes data processor, by the data Display that processor is controlled and the second wireless communication module being connected with the data processor, the display and master Control device connection;Pass through the first wireless communication module and second radio communication between the main controller and the data processor Module is communicated.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The motor is laid in On the outside of the mechanical switch;The mechanical switch is plectrum switch, button switch or rotary switch, the power of the motor Is equipped with output shaft and the plectrum is switched the striking gear stirred, the press device pressed the button switch Or to screwing device that the rotary switch is screwed.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The main controller is chip STC89C52。
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The quantity of the motor For two, the motor-drive circuit is motor drive ic L298N, and motor drive ic L298N IN1 pins and IN2 draw Pin connects with chip STC89C52 P0.0 pins and P0.1 pins respectively, motor drive ic L298N IN3 pins and IN4 Pin connects with chip STC89C52 P0.3 pins and P0.4 pins respectively.
A kind of above-mentioned family's lamp intelligent switch device based on Internet of Things, it is characterized in that:The on off state detection dress It is set to infrared tube or the intensity of illumination detection means to being detected by the intensity of illumination of control family lamp.
Meanwhile, it is simple, reasonable in design and good using easy to operate, using effect the invention discloses a kind of method and step Family's lamp intelligent switch method based on Internet of Things, it is characterised in that this method comprises the following steps:
Step 1: data processing terminal sends switching control instruction:Sent using data processing terminal to main controller to quilt Opening control instruction or closing control instruction that control family lamp is controlled;
Step 2: switching control instruction is received and switch control:The main controller is sent out according to data processing terminal is received Opening control instruction or the closing control instruction sent, to carrying out opening control or closing control by control family lamp;
Wherein, when the main controller by control family lamp to open control, process is as follows:
Step 2011, control is initially opened, comprised the following steps:
Step 20111, motor rotate forward control:The main controller calls drive and control of electric machine module and by controlling the electricity Drive circuit is controlled to the motor, the power output shaft of the motor is rotated forward 180 °;Meanwhile, The main controller call number statistical module by the control times N of control family lamp to now being counted;In this step, N= 1;
Step 20112, on off state detection:Using switch state detector to now by the switch shape of control family lamp State detected, and by testing result synchronous driving to main controller;
Step 20113, motor reversal control:The main controller recalls drive and control of electric machine module and described by control Motor-drive circuit is controlled to the motor, the power output shaft of the motor is rotated backward 180 °;
Step 20114, control process complete to judge:The main controller is according to switch state detector in step 20112 Testing result, to whether completing to judge by the control process of control family lamp:When switch state detector is detected When being now in open mode by control family lamp, it is judged as completing by the control process of control family lamp, otherwise, is judged as not Complete by the control process of control family lamp, into step 2012;
Step 2012, next time open control, comprise the following steps:
Step 20121, motor rotate forward control:The main controller call number statistical module is to now by control family lamp Control times N is counted;Meanwhile, the main controller calls drive and control of electric machine module and drives electricity by controlling the motor Road is controlled to the motor, rotates forward the power output shaft of the motor and the anglec of rotation is A, wherein A=180 °+(N-1) × 45 °;
Step 20122, on off state detection:Using switch state detector to now by the switch shape of control family lamp State detected, and by testing result synchronous driving to main controller;
Step 20123, motor reversal control:The main controller recalls drive and control of electric machine module and described by control Motor-drive circuit is controlled to the motor, the power output shaft of the motor is rotated backward and angle of rotation Spend for A;
Step 20124, control process complete to judge:The main controller is according to switch state detector in step 20122 Testing result, to whether completing to judge by the control process of control family lamp:When switch state detector is detected When being now in open mode by control family lamp, it is judged as completing by the control process of control family lamp, otherwise, is judged as not Complete by the control process of control family lamp, return to step 20121;
When the main controller by control family lamp to carrying out closing control, process is as follows:
Step 2021, first closing control, comprise the following steps:
Step 20211, motor rotate forward control:Motor, which is carried out, according to the method described in step 20111 rotates forward control;
Step 20212, on off state detection:On off state detection is carried out according to the method described in step 20112;
Step 20213, motor reversal control:Motor reversal control is carried out according to the method described in step 20113;
Step 20214, control process complete to judge:The main controller is according to switch state detector in step 20212 Testing result, to whether completing to judge by the control process of control family lamp:When switch state detector is detected When being now closed by control family lamp, it is judged as completing by the control process of control family lamp, otherwise, is judged as not Complete by the closing control process of control family lamp, into step 2022;
Step 2022, next closing control, comprise the following steps:
Step 20221, motor rotate forward control:Motor, which is carried out, according to the method described in step 20121 rotates forward control;
Step 20222, on off state detection:On off state detection is carried out according to the method described in step 20122;
Step 20223, motor reversal control:Motor reversal control is carried out according to the method described in step 20123;
Step 20224, control process complete to judge:The main controller is according to switch state detector in step 20222 Testing result, to whether completing to judge by the control process of control family lamp:When switch state detector is detected When being now closed by control family lamp, it is judged as completing by the control process of control family lamp, otherwise, is judged as not Complete by the control process of control family lamp, return to step 20221.
The above method, it is characterized in that:Step 20111, step 20113, step 20121, step 20123, step 20211, In step 20213, step 20221 and step 20223, the rotating speed of the power output shaft is 350r/min~400r/min;
Data processing terminal described in step one includes data processor and the clock being connected with data processor electricity Road;
When data processing terminal sends switching control instruction in step one, delay is called to send mould using data processing terminal The block and time recorded according to the clock circuit sends to main controller and referred to the opening control being controlled by control family lamp Order or closing control instruction.
The present invention has advantages below compared with prior art:
1st, the intelligent switch device used is simple in construction, reasonable in design and installs laying simplicity, and input cost is relatively low.
2nd, the intelligent switch device used, can be easy, quick to being switched by control family lamp using easy to operate Control.
3rd, the intelligent switch device used by the structure and connection circuit of the mechanical switch of control family lamp without to being done Any adjustment, Internet of Things control program is provided for non-removable controlled device.
4th, the intelligent switch device using effect used is good and practical value is high, simple and convenient, without to by control pair As (i.e. mechanical switch) is adjusted, substantial amounts of time, money, manpower are saved, is conducive to the popularization of technology of Internet of things, is thing The development of networking provides a new direction.Existing things internet switch device, be mostly with the actuating of relay come controlling switch, The present invention performs action using mechanical structure, reaches the purpose of switch.The switch state detector used is not being damaged Originally under circuit conditions, the on off state of energy effective detection mechanical switch, and the infrared tube used and indirect detection Controlled device (i.e. mechanical switch), but by being realized the switch to mechanical switch by the on off state detection of control family lamp State is detected.Meanwhile, the infrared tube that the present invention is used is not that just detection level is changed, and by detecting by control man The light that the light of front yard lamp is reflected on the display of data processing terminal is detected, is realized to being opened by control family lamp The purpose that off status is detected.Meanwhile, the use function of family's lamp can further be widened using the present invention, family's lamp is worked as Used as alarm clock, existing alarm clock is mostly reminded with modes such as sound vibrations, can be synchronous using family's lamp after the present invention Reminded in the way of light source, reminder time can be set when actually used on mobile phone, when the time then, by control family Lamp will be opened, and stimulate the vision of people, remind people to get up, while the buzzer of mobile phone sounds, lamp and buzzer can be held simultaneously, together Shi Guan, sound and light alarm, until people gets up, has reached the purpose of alarm clock always.
5th, the method for switching step used is simple, reasonable in design and realizes conveniently, for current Internet of Things industry development Present in can very easily be controlled for integrated good internet of things equipment, and to not dismantling, being inconvenient to dismantle and forbid The problem of equipment of dismounting is felt simply helpless and leverages the popularization of Internet of Things need not dismantle former switch with regard to energy there is provided one kind The device that is detected and it can be automatically controlled to its on off state, with very big application prospect, be also simultaneously One developing direction of following Intelligent internet of things.When actually used, the motor can also be fixed on using bonding method Mechanical switch side, mechanical switch is acted by motor, and use manpower and material resources sparingly cost, and safety and environmental protection is convenient.Actually make Used time, normally only need to switch control twice, you can complete by the control process that opens or closes of control family lamp, actual control is non- It is often easy.Every time during switch control, first control motor is rotated forward, then controls motor reversion reset, each switch control Process processed is independent of each other.
Below by drawings and Examples, technical scheme is described in further detail.
Brief description of the drawings
Fig. 1 is the schematic block circuit diagram of intelligent switch device of the present invention.
Fig. 2 is the circuit theory diagrams of main controller of the present invention.
Fig. 3 is the circuit theory diagrams of motor-drive circuit of the present invention.
Fig. 4 is the circuit theory diagrams of infrared tube of the present invention.
Fig. 5 for the present invention to being controlled by control family lamp when method flow block diagram.
Description of reference numerals:
1-switch state detector;2-switch controlling device;2-1-main controller;
2-2-electric driving mechanism;The wireless communication modules of 2-3-first;2-4-data storage;
3-data processing terminal.
Embodiment
A kind of family's lamp intelligent switch device based on Internet of Things as shown in Figure 1, including to by control family lamp The switch state detector 1 that on off state is detected, the switch controlling device 2 to by control family lamp switch control With the data processing terminal 3 being connected with switch controlling device 2, the lamp by family's lamp is controlled to be controlled by mechanical switch Tool, the mechanical switch is serially connected in described by the current supply circuit of control family lamp;The switch controlling device 2 includes main controller The 2-1 and electric driving mechanism 2-2 for driving the mechanical switch to be acted, the electric driving mechanism 2-2 is by main controller 2-1 It is controlled;The electric driving mechanism 2-2 includes motor and is connected with the motor and to the motor The motor-drive circuit being driven, the motor-drive circuit is connected with main controller 2-1;The switch state detector 1 It is connected, is attached in a wired or wireless fashion between the data processing terminal 3 and main controller 2-1 with main controller 2-1.
In the present embodiment, the data processing terminal 3 is panel computer or smart mobile phone.
When actually used, the data processing terminal 3 can also be other types of data processing equipment.
In the present embodiment, wirelessly it is attached between the data processing terminal 3 and main controller 2-1.
When actually used, the switch controlling device 2 also includes the first wireless communication module 2- being connected with main controller 2-1 3;The data processing terminal 3 include data processor, the display that is controlled by the data processor and with the number The second wireless communication module connected according to processor, the display is connected with main controller 2-1;The main controller 2-1 with it is described Communicated between data processor by the first wireless communication module 2-3 and second wireless communication module.
In the present embodiment, the data processing terminal 3 is located at by the side-lower of control family lamp.
In the present embodiment, it is wireless that the first wireless communication module 2-3 and second wireless communication module are bluetooth Communication module.
When actually used, the first wireless communication module 2-3 and second wireless communication module can also use it Its type without communication module, such as 3G wireless communication modules, WIFI wireless communication modules.
In the present embodiment, the switch controlling device 2 also includes the data storage 2-4 being connected with main controller 2-1.
In the present embodiment, the data processing terminal 3 also includes the clock circuit being connected with the data processor.
When actually used, the motor is laid on the outside of the mechanical switch.
The mechanical switch is on plectrum switch, button switch or rotary switch, the power output shaft of the motor Equipped with switching the striking gear stirred, the press device pressed the button switch to the plectrum or to described The screwing device that rotary switch is screwed.
In the present embodiment, the mechanical switch is to be equipped with button switch, the power output shaft of the motor to institute State the press device that button switch is pressed.
In the present embodiment, the press device is the pressing iron plate of a finger type.
When actually used, the press device is driven to be pressed to the button switch downwards by the motor Pressure, and the power output shaft rotational angle of the motor is bigger, the press device it is bigger to bottom offset.
Similarly, when the mechanical switch is that plectrum is switched, it is equipped with the power output shaft of the motor to described The striking gear that plectrum switch is stirred, drives the striking gear to switch the plectrum and carries out by the motor Stir, and the power output shaft rotational angle of the motor is bigger, the press device to stir displacement bigger.And And, when the mechanical switch is to be equipped with to carry out the rotary switch on rotary switch, the power output shaft of the motor The screwing device screwed, drives the screwing device to screw the rotary switch by the motor, and institute The power output shaft rotational angle for stating motor is bigger, the screwing device to screw angle bigger.
In the present embodiment, as shown in Fig. 2 the main controller 2-1 is chip STC89C52.
When actually used, the main controller 2-1 can also use other types of controller chip, such as 51 serial monolithics Machine, main controller 2-1 can carry out rotating control by controlling the motor-drive circuit to the motor.
In the present embodiment, as shown in figure 3, the quantity of the motor is two, the motor-drive circuit is motor The P0.0 pins of driving chip L298N, motor drive ic L298N IN1 pins and IN2 pins respectively with chip STC89C52 Connect with P0.1 pins, the P0.3 of motor drive ic L298N IN3 pins and IN4 pins respectively with chip STC89C52 draws Pin and P0.4 pins connect.Two motors are respectively motor P2 and motor P3.When actually used, using described in one Motor, another described motor is used as standby motor.
In the present embodiment, the OUT1 pins and OUT2 pins of the motor drive ic L298N is electric with a driving respectively Two terminals connection of machine, the OUT3 pins and OUT4 pins of the motor drive ic L298N drive with another respectively Two terminals connection of motor;The OUT1 pins of the motor drive ic L298N respectively with diode D1 anode and two Pole pipe D9 negative electrode connects, the anode and diode of the OUT2 pins of the motor drive ic L298N respectively with diode D2 D10 negative electrode connection, the anode and diode of the OUT3 pin Pins of the motor drive ic L298N respectively with diode D3 D11 negative electrode connection, the anode and diode D12 of the OUT4 pins of the motor drive ic L298N respectively with diode D4 Negative electrode connection, diode D1, D2, D3 and D4 negative electrode connects VCC power ends, and diode D9, D10, D11 and D12 sun Extremely it is grounded.
The 8th pin of the motor drive ic L298N is grounded with its 1st and the 15th pin.Chip STC89C52's P0.2 pins and P0.5 pins are connected with motor drive ic L298N ENA pins and ENB pins respectively.
In the present embodiment, the motor-drive circuit is connected with motor steering indicating circuit, and the motor steering indicates electricity Road includes Light-Emitting Diode D5, D6, D7 and D8, Light-Emitting Diode D5 and D6 reverse parallel connections, and Light-Emitting Diode D7 and D8 is reverse simultaneously Connection.The OUT1 pins of the motor drive ic L298N divide two-way, and the anode with Light-Emitting Diode D6 after resistance R1 connects all the way Connect, negative electrode of another road with Light-Emitting Diode D5 after resistance R1 is connected, Light-Emitting Diode D6 negative electrode and Light-Emitting Diode D5 Anode connect motor drive ic L298N OUT2 pins;The OUT3 pin point two-way of the motor drive ic L298N, The anode with Light-Emitting Diode D7 after resistance R2 is connected all the way, and another road connects after resistance R2 with Light-Emitting Diode D8 negative electrode Connect, Light-Emitting Diode D7 negative electrode and Light-Emitting Diode D8 anode connect motor drive ic L298N OUT4 pins.
In the present embodiment, the P3.0 pins and P3.1 pins of the chip STC89C52 respectively with the first wireless communication module 2-3 two terminals connection.
Crystal oscillator X1 is connected on the X1 pins and X2 pins of the chip STC89C52, the two ends of the crystal oscillator X1 are respectively through electricity Hold and be grounded after C5 and C6.
When actually used, the switch state detector 1 is infrared tube or the intensity of illumination to being controlled family's lamp The intensity of illumination detection means detected.
In the present embodiment, the switch state detector 1 is infrared tube.Also, the infrared tube is to described The detection dress that reflection light after being reflected by the light of control family lamp on the display of data processing terminal 3 is detected Put.
As shown in figure 4, the infrared tube includes infrared transmitting tube D14 and infrared receiving tube Q4, the infrared transmitting tube D14 anode connects VCC power ends and its negative electrode is grounded after resistance R5, colelctor electrode and the triode Q3 of the infrared receiving tube Q4 Base stage connection, infrared receiving tube Q4 grounded emitter;Triode Q3 emitter stage connects VCC power ends and its colelctor electrode is divided to two Road, is grounded after resistance R7 and another road is connected with triode Q5 base stage, triode Q5 emitter stage is after resistance R8 all the way Ground connection, triode Q5 colelctor electrode point two-way, is connected with chip STC89C52 P3.6 pins and another road is through resistance R6 all the way It is followed by VCC power ends.Also, the P2.1 pins of the chip STC89C52 are grounded after resistance R9.
In the present embodiment, the VCC power ends are+5V power ends.
Meanwhile, a kind of method using the intelligent switch device to being switched by control family lamp as shown in Figure 5, Comprise the following steps:
Step 1: data processing terminal sends switching control instruction:Sent using data processing terminal 3 to main controller 2-1 The opening control instruction or closing control being controlled by control family lamp are instructed;
Step 2: switching control instruction is received and switch control:The main controller 2-1 is according to receiving data processing terminal The 3 opening control instructions sent or closing control instruction, to carrying out opening control or closing control by control family lamp;
Wherein, when the main controller 2-1 by control family lamp to open control, process is as follows:
Step 2011, control is initially opened, comprised the following steps:
Step 20111, motor rotate forward control:The main controller 2-1 calls drive and control of electric machine module and by controlling State motor-drive circuit to be controlled the motor, the power output shaft of the motor is rotated forward 180 °; Meanwhile, the main controller 2-1 call numbers statistical module by the control times N of control family lamp to now being counted;This step In rapid, N=1;
Step 20112, on off state detection:Using 1 pair of switch state detector now by the switch of control family lamp State detected, and by testing result synchronous driving to main controller 2-1;
Step 20113, motor reversal control:The main controller 2-1 recalls drive and control of electric machine module and by control The motor-drive circuit is controlled to the motor, rotates backward the power output shaft of the motor 180°;
Step 20114, control process complete to judge:The main controller 2-1 is filled according on off state detection in step 20112 Put 1 testing result, to whether completing to judge by the control process of control family lamp:When switch state detector 1 is examined When measuring now by control family's lamp in open mode, it is judged as completing by the control process of control family lamp, otherwise, judges Not complete by the control process of control family lamp, into step 2012;
Step 2012, next time open control, comprise the following steps:
Step 20121, motor rotate forward control:The main controller 2-1 call numbers statistical module is to now by control family The control times N of lamp is counted;Meanwhile, the main controller 2-1 calls drive and control of electric machine module and by controlling the electricity Drive circuit is controlled to the motor, the power output shaft of the motor is rotated forward and the anglec of rotation For A, wherein A=180 °+(N-1) × 45 °;
Step 20122, on off state detection:Using 1 pair of switch state detector now by the switch of control family lamp State detected, and by testing result synchronous driving to main controller 2-1;
Step 20123, motor reversal control:The main controller 2-1 recalls drive and control of electric machine module and by control The motor-drive circuit is controlled to the motor, the power output shaft of the motor is rotated backward and is turned Dynamic angle is A;
Step 20124, control process complete to judge:The main controller 2-1 is filled according on off state detection in step 20122 Put 1 testing result, to whether completing to judge by the control process of control family lamp:When switch state detector 1 is examined When measuring now by control family's lamp in open mode, it is judged as completing by the control process of control family lamp, otherwise, judges Not complete by the control process of control family lamp, return to step 20121;
When the main controller 2-1 by control family lamp to carrying out closing control, process is as follows:
Step 2021, first closing control, comprise the following steps:
Step 20211, motor rotate forward control:Motor, which is carried out, according to the method described in step 20111 rotates forward control;
Step 20212, on off state detection:On off state detection is carried out according to the method described in step 20112;
Step 20213, motor reversal control:Motor reversal control is carried out according to the method described in step 20113;
Step 20214, control process complete to judge:The main controller 2-1 is filled according on off state detection in step 20212 Put 1 testing result, to whether completing to judge by the control process of control family lamp:When switch state detector 1 is examined Measure when being now closed by control family lamp, be judged as completing by the control process of control family lamp, otherwise, judge Not complete by the closing control process of control family lamp, into step 2022;
Step 2022, next closing control, comprise the following steps:
Step 20221, motor rotate forward control:Motor, which is carried out, according to the method described in step 20121 rotates forward control;
Step 20222, on off state detection:On off state detection is carried out according to the method described in step 20122;
Step 20223, motor reversal control:Motor reversal control is carried out according to the method described in step 20123;
Step 20224, control process complete to judge:The main controller 2-1 is filled according on off state detection in step 20222 Put 1 testing result, to whether completing to judge by the control process of control family lamp:When switch state detector 1 is examined Measure when being now closed by control family lamp, be judged as completing by the control process of control family lamp, otherwise, judge Not complete by the control process of control family lamp, return to step 20221.
When actually used, step 20111, step 20113, step 20121, step 20123, step 20211, step 20213rd, in step 20221 and step 20223, the rotating speed of the power output shaft is 350r/min~400r/min.
In the present embodiment, step 20111, step 20113, step 20121, step 20123, step 20211, step 20213rd, in step 20221 and step 20223, the rotating speed all same of the power output shaft.
In the present embodiment, the rotating speed of the power output shaft is 375r/min, and the power output shaft is rotated one week Time be 160ms.
In the present embodiment, when data processing terminal sends switching control instruction in step one, adjusted using data processing terminal 3 The time recorded with delay sending module and according to the clock circuit is sent to being controlled by control family lamp to main controller 2-1 Opening control instruction or the closing control instruction of system.
Thus, when actually used, data processing terminal 3 can both send switching control instruction immediately, can also be according to pre- The time delayses first set send switching control instruction.Practical manner flexibly, and also be worked as by control family lamp Make alarm clock or timer is used.
In addition, in actual use, when the data processing terminal 3 sends switching control instruction, it would however also be possible to employ hand The mode of dynamic input switch control instruction is transmitted, and can also be transmitted in modes such as voices, occupation mode is flexible.
In the present embodiment, times N=1 is controlled in step 20111, when opening control next time is carried out in step 2012 afterwards, Control number of times gradually adds 1;It is to be done by after the control process of control family lamp, N is reset.Also, number of times is controlled in step 20211 N=1, controls number of times gradually to add 1 afterwards in step 2022;It is to be done by after the control process of control family lamp, N is reset.
The above, is only presently preferred embodiments of the present invention, not the present invention is imposed any restrictions, every according to the present invention Any simple modification, change and equivalent structure change that technical spirit is made to above example, still fall within skill of the present invention In the protection domain of art scheme.

Claims (9)

1. a kind of family's lamp intelligent switch method based on Internet of Things, the intelligent switch device of use is included to by control family The switch state detector (1) that the on off state of lamp is detected, the switch control to by control family lamp switch control Device (2) processed and the data processing terminal (3) being connected with switch controlling device (2), it is described to be controlled family's lamp to be opened by machinery The light fixture being controlled is closed, the mechanical switch is serially connected in described by the current supply circuit of control family lamp;The switch control Device (2) includes the electric driving mechanism (2-2) that main controller (2-1) and the driving mechanical switch are acted, described electronic Drive mechanism (2-2) is controlled by main controller (2-1);The electric driving mechanism (2-2) include motor and with it is described The motor-drive circuit that motor is connected and is driven to the motor, the motor-drive circuit and main controller (2-1) is connected;The switch state detector (1) is connected with main controller (2-1), the data processing terminal (3) and master control It is attached in a wired or wireless fashion between device (2-1), it is characterised in that:This method comprises the following steps:
Step 1: data processing terminal sends switching control instruction:Sent using data processing terminal (3) to main controller (2-1) The opening control instruction or closing control being controlled by control family lamp are instructed;
Step 2: switching control instruction is received and switch control:Main controller (2-1) basis receives data processing terminal (3) opening control instruction or the closing control instruction sent, to carrying out opening control or closing control by control family lamp;
Wherein, when the main controller (2-1) by control family lamp to open control, process is as follows:
Step 2011, control is initially opened, comprised the following steps:
Step 20111, motor rotate forward control:The main controller (2-1) calls drive and control of electric machine module and described by control Motor-drive circuit is controlled to the motor, the power output shaft of the motor is rotated forward 180 °;Together When, main controller (2-1) the call number statistical module by the control times N of control family lamp to now being counted;This step In rapid, N=1;
Step 20112, on off state detection:Using switch state detector (1) to now by the switch shape of control family lamp State detected, and by testing result synchronous driving to main controller (2-1);
Step 20113, motor reversal control:The main controller (2-1) recalls drive and control of electric machine module and by controlling State motor-drive circuit to be controlled the motor, the power output shaft of the motor is rotated backward 180 °;
Step 20114, control process complete to judge:The main controller (2-1) is according to switch state detector in step 20112 (1) testing result, to whether completing to judge by the control process of control family lamp:When switch state detector (1) When detecting now to be controlled family's lamp in open mode, it is judged as completing by the control process of control family lamp, otherwise, sentences Break not completing by the control process of control family lamp, into step 2012;
Step 2012, next time open control, comprise the following steps:
Step 20121, motor rotate forward control:Main controller (2-1) the call number statistical module is to now by control family lamp Control times N counted;Meanwhile, the main controller (2-1) calls drive and control of electric machine module and by controlling the electricity Drive circuit is controlled to the motor, the power output shaft of the motor is rotated forward and the anglec of rotation For A, wherein A=180 °+(N-1) × 45 °;
Step 20122, on off state detection:Using switch state detector (1) to now by the switch shape of control family lamp State detected, and by testing result synchronous driving to main controller (2-1);
Step 20123, motor reversal control:The main controller (2-1) recalls drive and control of electric machine module and by controlling State motor-drive circuit to be controlled the motor, the power output shaft of the motor is rotated backward and is rotated Angle is A;
Step 20124, control process complete to judge:The main controller (2-1) is according to switch state detector in step 20122 (1) testing result, to whether completing to judge by the control process of control family lamp:When switch state detector (1) When detecting now to be controlled family's lamp in open mode, it is judged as completing by the control process of control family lamp, otherwise, sentences Break not completing by the control process of control family lamp, return to step 20121;
When opening control next time is carried out in step 2012, control number of times gradually adds 1;Control process to be done by control family lamp Afterwards, N is reset;
When the main controller (2-1) by control family lamp to carrying out closing control, process is as follows:
Step 2021, first closing control, comprise the following steps:
Step 20211, motor rotate forward control:Motor, which is carried out, according to the method described in step 20111 rotates forward control;
Step 20212, on off state detection:On off state detection is carried out according to the method described in step 20112;
Step 20213, motor reversal control:Motor reversal control is carried out according to the method described in step 20113;
Step 20214, control process complete to judge:The main controller (2-1) is according to switch state detector in step 20212 (1) testing result, to whether completing to judge by the control process of control family lamp:When switch state detector (1) When detecting now to be controlled family's lamp be closed, it is judged as completing by the control process of control family lamp, otherwise, sentences Break not completing by the closing control process of control family lamp, into step 2022;
Step 2022, next closing control, comprise the following steps:
Step 20221, motor rotate forward control:Motor, which is carried out, according to the method described in step 20121 rotates forward control;
Step 20222, on off state detection:On off state detection is carried out according to the method described in step 20122;
Step 20223, motor reversal control:Motor reversal control is carried out according to the method described in step 20123;
Step 20224, control process complete to judge:The main controller (2-1) is according to switch state detector in step 20222 (1) testing result, to whether completing to judge by the control process of control family lamp:When switch state detector (1) When detecting now to be controlled family's lamp be closed, it is judged as completing by the control process of control family lamp, otherwise, sentences Break not completing by the control process of control family lamp, return to step 20221;
Number of times is controlled gradually to add 1 in step 2022;It is to be done by after the control process of control family lamp, N is reset.
2. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1, it is characterised in that:It is described Data processing terminal (3) is panel computer or smart mobile phone.
3. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1 or 2, it is characterised in that: Wirelessly it is attached between the data processing terminal (3) and main controller (2-1).
4. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 3, it is characterised in that:It is described Switch controlling device (2) also includes the first wireless communication module (2-3) being connected with main controller (2-1);The data processing is whole End (3) includes data processor, the display being controlled by the data processor and is connected with the data processor Second wireless communication module, the display is connected with main controller (2-1);The main controller (2-1) and the data processor Between communicated by the first wireless communication module (2-3) and second wireless communication module.
5. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1 or 2, it is characterised in that: The motor is laid on the outside of the mechanical switch;The mechanical switch is plectrum switch, button switch or rotary switch, Is equipped with the power output shaft of the motor and the plectrum is switched the striking gear stirred, to the button switch The press device pressed or the screwing device screwed to the rotary switch.
6. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1 or 2, it is characterised in that: The main controller (2-1) is chip STC89C52.
7. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 6, it is characterised in that:It is described The quantity of motor is two, and the motor-drive circuit is motor drive ic L298N, motor drive ic L298N's IN1 pins and IN2 pins connect with chip STC89C52 P0.0 pins and P0.1 pins respectively, motor drive ic L298N IN3 pins and IN4 pins connect respectively with chip STC89C52 P0.3 pins and P0.4 pins.
8. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1 or 2, it is characterised in that: The switch state detector (1) is infrared tube or the intensity of illumination to being detected by the intensity of illumination of control family lamp Detection means.
9. according to a kind of family's lamp intelligent switch method based on Internet of Things described in claim 1, it is characterised in that:Step 20111st, step 20113, step 20121, step 20123, step 20211, step 20213, step 20221 and step 20223 In, the rotating speed of the power output shaft is 350r/min~400r/min;
Data processing terminal described in step one (3) includes data processor and the clock being connected with data processor electricity Road;
When data processing terminal sends switching control instruction in step one, delay is called to send mould using data processing terminal (3) Block and the time recorded according to the clock circuit send the opening control to being controlled by control family lamp to main controller (2-1) System instruction or closing control instruction.
CN201610824715.8A 2016-09-14 2016-09-14 A kind of family's lamp intelligent switch method based on Internet of Things Expired - Fee Related CN106231760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610824715.8A CN106231760B (en) 2016-09-14 2016-09-14 A kind of family's lamp intelligent switch method based on Internet of Things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610824715.8A CN106231760B (en) 2016-09-14 2016-09-14 A kind of family's lamp intelligent switch method based on Internet of Things

Publications (2)

Publication Number Publication Date
CN106231760A CN106231760A (en) 2016-12-14
CN106231760B true CN106231760B (en) 2017-07-11

Family

ID=58075538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610824715.8A Expired - Fee Related CN106231760B (en) 2016-09-14 2016-09-14 A kind of family's lamp intelligent switch method based on Internet of Things

Country Status (1)

Country Link
CN (1) CN106231760B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106842027B (en) * 2017-03-22 2019-04-02 美的智慧家居科技有限公司 Curtain motor runnability detection device and detection method
CN107966940A (en) * 2017-12-30 2018-04-27 广东技术师范学院 A kind of method of controlling switch and device based on infrared remote control
CN109459983A (en) * 2018-10-22 2019-03-12 广州星迹科技有限公司 It is a kind of can automatic Prediction user behavior on-off control system and method
CN109523767A (en) * 2018-10-26 2019-03-26 阿里巴巴集团控股有限公司 Switched diffusion device and the system for controlling non intelligent switch
CN110402001A (en) * 2019-06-24 2019-11-01 南京信息职业技术学院 Portable universal multifunctional intelligent remote control switch
CN110471357A (en) * 2019-09-09 2019-11-19 深圳共创设计科技有限公司 A kind of Internet of Things power supply smart control module

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104619073A (en) * 2014-03-04 2015-05-13 侯增涛 Phone control based lamp control method and control system therefore
CN204741599U (en) * 2015-07-08 2015-11-04 东北大学秦皇岛分校 Intelligence switch
CN205491377U (en) * 2016-01-22 2016-08-17 深圳市飞比电子科技有限公司 Intelligence switch subassembly
CN205510499U (en) * 2016-03-01 2016-08-24 安徽理工大学 Intelligence remote control lamp switching system based on singlechip

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104619073A (en) * 2014-03-04 2015-05-13 侯增涛 Phone control based lamp control method and control system therefore
CN204741599U (en) * 2015-07-08 2015-11-04 东北大学秦皇岛分校 Intelligence switch
CN205491377U (en) * 2016-01-22 2016-08-17 深圳市飞比电子科技有限公司 Intelligence switch subassembly
CN205510499U (en) * 2016-03-01 2016-08-24 安徽理工大学 Intelligence remote control lamp switching system based on singlechip

Also Published As

Publication number Publication date
CN106231760A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN106231760B (en) A kind of family's lamp intelligent switch method based on Internet of Things
CN105249902B (en) A kind of solar energy outer wall cleaning robots people
CN103268697A (en) Intelligent meter reading centralized control system for PMI power system and teaching experiment platform based on centralized control system
CN206573910U (en) A kind of Intellective airer control system
CN206024208U (en) A kind of family's lamp intelligent switch device based on Internet of Things
CN206608027U (en) A kind of intelligent window control system based on Internet of Things
CN207067709U (en) Display device and tele-control system
CN205992136U (en) A kind of intelligent domestic system being controlled based on STM32 and Android
CN203228238U (en) Android-based robot motion control system
CN205540000U (en) Intelligent control system for household appliances
CN107808327A (en) A kind of umbrella using solar energy leasing system and method
CN202167216U (en) Modular test platform system for small and medium-sized liquid crystal display screens
CN201765800U (en) Display screen driving circuit
CN206790748U (en) It is a kind of that there is the infrared and self-power generation type light fixture control device of wireless of wireless communication function
CN105467905B (en) Reading intelligent agriculture monitoring system device
CN108553879A (en) A kind of remote control based on NB-IoT internet of things grabs doll machine
CN202003556U (en) Digital signal processor (DSP) application technology teaching equipment based on intelligent home control system project
CN201131248Y (en) A timing mosquito-repelling device
CN205778448U (en) A kind of automatic curtain based on Bluetooth control
CN206829893U (en) A kind of multi-functional automatic window shutter
CN208054426U (en) Wireless remote gas meter, flow meter circuit board detecting equipment
CN206759351U (en) A kind of permanent magnet synchronous motor control device
CN208781547U (en) Bus platform scrolling billboard control system
CN206503475U (en) A kind of new hospital's tailored version device for controlling automatic door
CN107387448A (en) A kind of intelligent fan control system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170711

Termination date: 20190914

CF01 Termination of patent right due to non-payment of annual fee