CN104166416B - Internet-of-things system for controlling indoor light illumination temperature - Google Patents
Internet-of-things system for controlling indoor light illumination temperature Download PDFInfo
- Publication number
- CN104166416B CN104166416B CN201410378039.7A CN201410378039A CN104166416B CN 104166416 B CN104166416 B CN 104166416B CN 201410378039 A CN201410378039 A CN 201410378039A CN 104166416 B CN104166416 B CN 104166416B
- Authority
- CN
- China
- Prior art keywords
- temperature
- motor
- module
- chip microcomputer
- value
- 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
Links
Abstract
The invention provides an Internet-of-things system for controlling the indoor light illumination temperature. The Internet-of-things system for controlling the indoor light illumination temperature comprises a temperature sensor, a photosensitive sensor, an A/D conversion module, a single-chip microcomputer, a motor, a serial port, a wifi module and an upper PC, wherein the temperature sensor is used for collecting the indoor temperature, the photosensitive sensor is made of a photosensitive resistor with the resistance value rapidly decreased under light illumination and is used for collecting indoor light rays, and the A/D conversion module is used for conducting analog-digital conversion on the output voltage value. The temperature sensor sends digital temperature signals to the single-chip microcomputer. After the analog-digital conversion is conducted on the resistance value change generated by the light rays through the A/D conversion module, the resistance value change is sent to the single-chip microcomputer through the photosensitive sensor. The single-chip microcomputer converts the resistance value change to high and low electric levels corresponding to pins according to the received signal, and the high and low electric levels are sent to the upper PC through the serial port by means of the wi-fi module to be displayed and stored. The upper PC obtains light illumination data and temperature data according to real-time measurement, conducts control optimization through a discrete particle swarm algorithm, and returns control instructions to control the motor to work in real time. The Internet-of-things system for controlling the indoor light illumination temperature is high in search speed and efficiency and simple in algorithm.
Description
Technical field
The invention belongs to internet of things field, the temperature controlled Internet of things system of more particularly, to a kind of indoor illumination.
Background technology
The temperature controlled cause of indoor illumination be indoor illumination condition mainly based on natural lighting, but utilization rate only has
The 40%~60% of open country environment.Therefore, the effective rate of utilization of illumination should be improved as far as possible.The interior arrived according to Real-time Collection
The numerical value such as temperature and illuminance carries out curtain motor control system thus utilizing Illumination adjusting indoor temperature to greatest extent.
Internet of Things is the important component part of generation information technology, using the communication technology handle such as localized network or internet
Sensor, controller, machine, personnel and thing etc. are linked togather by way of new, form people and are connected with thing, thing and thing, realize
Informationization, remote management and control and intelligentized network.
Content of the invention
It is an object of the invention to provide a kind of temperature controlled Internet of things system method for designing of indoor illumination it is intended to according to
In real time the indoor temperature of measurement and illuminance carry out the problem of the optimal control of curtain motor in greenhouse.
The present invention is achieved in that a kind of temperature controlled Internet of things system of indoor illumination, including for gathering interior
The temperature sensor of temperature, by the rapid photo resistance reducing of resistance under illumination make for gathering the photosensitive of indoor light
Sensor, for carrying out the A/D modular converter of analog-to-digital conversion, single-chip microcomputer, motor, serial ports, wifi mould by the magnitude of voltage of output
Block, and PC host computer, described single-chip microcomputer is connected with temperature sensor, A/D modular converter, motor and serial ports respectively, described
A/D modular converter is connected with light sensor, and described serial ports is connected with wifi module;Wherein,
Temperature digital signal is passed to single-chip microcomputer, the resistance that light is produced by described light sensor by described temperature sensor
Change is carried out passing to single-chip microcomputer after analog-to-digital conversion by A/D modular converter, and described single-chip microcomputer is converted to pin according to received signal
Corresponding low and high level is sent to PC host computer through serial ports by Wi-Fi module and is shown and store, and described PC host computer returns
Control instruction real-time control motor works.
Preferably, described PC host computer includes wireless router module, memory module and display module, wherein, described
Wireless router module and wifi module carry out wireless data, signal transmission, and the data of reception, signal are stored in storage mould
Block and being shown on display module, described display module issues instruction by controlling interface, and will instruction by described wireless
Router-module sends.
Preferably, described PC host computer also includes data processing module, and wherein, described data processing module is by wireless routing
The indoor temperature that device module receives and illuminance Data Data are set up motor operation and are controlled matrix, and obtain light according to real-time measurement
It is controlled optimizing with discrete particle cluster algorithm according to temperature data, it is real that described display module issues instruction according to optimum results
When controlled motor work.
Compare the determination with prior art and deficiency, the invention provides a kind of indoor illumination temperature controlled Internet of Things system
System, including the temperature sensor for gathering indoor temperature, the use made by the rapid photo resistance reducing of resistance under illumination
In the light sensor of collection indoor light, for the magnitude of voltage of output is being carried out the A/D modular converter of analog-to-digital conversion, monolithic
Machine, motor, serial ports, wifi module and PC host computer;Temperature digital signal is passed to single-chip microcomputer, light sensor by temperature sensor
The change in resistance that light produces is carried out passing to single-chip microcomputer after analog-to-digital conversion by device by A/D modular converter, and described single-chip microcomputer is according to institute
Receipt signal is converted to the corresponding low and high level of pin and is sent to PC host computer through serial ports by Wi-Fi module and shown and deposit
Storage, described PC host computer obtains illumination and temperature data according to real-time measurement and is controlled optimizing with discrete particle cluster algorithm,
And return the work of control instruction real-time control motor.
The present invention is according to the optimization mesh of each group temperature measuring in real time at the appointed time and photometric data and setting
Scale value determines direction and the angle of motor rotation, thus the function that the autonomous control reaching curtain motor controls and optimizes.This
The bright real-time sexual function taking full advantage of multiple-objection optimization in control algolithm, so that control process is fairly simple controls effect simultaneously
Fruit more optimizes.Meanwhile, the present invention further increases the data storage function of host computer, for data analysis from now on and optimal control mould
Type provides convenient approach.
Compared to the shortcoming and defect of prior art, the invention has the advantages that:Search speed of the present invention is fast, effect
Rate is high, and algorithm is simple, is suitable for real-valued type and processes.
Brief description
Fig. 1 is data collection station system block diagram in the embodiment of the present invention;
Fig. 2 is PC end display control program block diagram in the embodiment of the present invention;
Fig. 3 is particle cluster algorithm flow chart in the embodiment of the present invention.
Specific embodiment
In order that the objects, technical solutions and advantages of the present invention become more apparent, below in conjunction with drawings and Examples, right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only in order to explain the present invention, and
It is not used in the restriction present invention.
A kind of temperature controlled Internet of things system of indoor illumination, including data collection station system and PC end display control system
System, wherein, data collection station system is as shown in figure 1, include the temperature sensor 1 for gathering indoor temperature, by illumination
The light sensor 2 for gathering indoor light that the rapid photo resistance reducing of lower resistance is made, for the voltage that will export
Value is carrying out the A/D modular converter 3 of analog-to-digital conversion, single-chip microcomputer 4 (51 single-chip microcomputer), motor 5 (stepper motor), serial ports 6, wifi mould
Block 7;PC end display control program is mainly PC host computer 8;Described single-chip microcomputer 4 respectively with temperature sensor 1, A/D modular converter
3rd, motor 5 and serial ports 6 connect, and described A/D modular converter 3 is connected with light sensor 2, and described serial ports 6 is with wifi module 7 even
Connect;Wherein, temperature digital signal is passed to single-chip microcomputer 4 by described temperature sensor 1, and light is produced by described light sensor 2
Change in resistance carries out passing to single-chip microcomputer 4 after analog-to-digital conversion by A/D modular converter 3, and described single-chip microcomputer 4 is changed according to received signal
It is sent to PC host computer 8 through serial ports 6 by Wi-Fi module 7 for the corresponding low and high level of pin to be shown and store, on described PC
Position machine 8 returns the work of control instruction real-time control motor.
In the present invention, more specifically, as shown in Fig. 2 described PC host computer 8 includes wireless router module 81, storage
Module 82 and display module 83, wherein, described wireless router module 81 and wifi module 7 carry out wireless data, signal passes
Send, and the data of reception, signal are stored in memory module 82 and are shown on display module 83, described display module 83 leads to
Cross controlling interface and issue instruction, and instruction is sent by described wireless router module 81.
In the present invention, more specifically, described PC host computer 8 also includes data processing module, wherein, described data processing
The indoor temperature that wireless router module 81 is received by module and illuminance Data Data are set up motor operation and are controlled matrix, and root
When factually measurement obtain illumination and temperature data with discrete particle cluster algorithm be controlled optimize, described display module 83 basis
Optimum results are issued instruction real-time control motor 5 and are worked.
In the present invention, with STC89C52RC single-chip microcomputer as control chip, room is gathered using DS18B20 temperature sensor
Interior temperature, the sensor that the rapid characteristic reducing of resistance is made under the irradiation of sunshine using photo resistance is come to indoor light
It is acquired gathering, the magnitude of voltage of output is carrying out analog-to-digital conversion by A/D chip, high accordingly by reading single-chip microcomputer pin
Low level, obtains corresponding numerical value, reaches the purpose obtaining indoor light intensity.Transfer adjustment room by controlling the positive and negative of stepper motor
Interior ventilation.
Realize data acquisition and control function by 51 single-chip microcomputers 4, by Wi-Fi module 7, the data transfer of collection is arrived
PC host computer 8 is shown and is stored, and realizes host computer 8 simultaneously and carries out long-range real-time control function to the parameter of indoor environment,
The start and stop of user control device can be realized it is also possible to carry out the collection of data, such as temperature, light intensity etc. and motor control
Autonomy-oriented operation.
For the terminal of 51 single-chip microcomputers 4, the content of control mainly has and the motor control journey based on PSO Software for Design
Sequence and the measurement function of temperature and illuminance.Related driving includes needing to write the driver of stepper motor 5, AD conversion
The driver of module 3, driver of temperature sensor 1 etc..For the configuration of 51 single-chip microcomputer 4 serial ports, it is preferred that emphasis is
The baud rate of 51 single-chip microcomputers 4 and Wi-Fi module 7 will be consistent, and needs to write serial ports 6 driver.
For PC host computer 8, it is preferred that emphasis is the software of wireless router is realized, and writes host computer figure circle with C++
Face and the realization of Udp network communication protocol.PC end control system mainly realizes the network service with PC with Wi-Fi module.
Wherein, not only want programming realization to control storage and display interface in PC, also want software to realize the function of wireless router.
In the present invention, the process to data processing for the data processing module of PC host computer 8, more specific inclusion is following to be walked
Suddenly:
S1, the indoor temperature according to mensure and illumination degrees of data are set up motor operation and are controlled matrix
Temperature Ti that temperature sensor measurement obtains, according in front and back's moment measure difference △ Ti value be set as -2, -
1,0,1,2 }, wherein, 1 represent in each sample point temperature change in 0.10C;
The illuminance that light sensor measurement obtains be Li, according in front and back's moment measure difference △ Li value be -2, -
1,0,1,2 }, wherein, 1 represent in the change of each sample point illuminance in 10lm;
Motor rotational angle is Wi, is { -2, -1,0,1,2 } according to the value that in front and back's moment motor rotates difference Wi, its
In, 1 represents in each motor control moment rotational angle 180;
Work as Ti>During set temperature value (200), at sampling interval [t1, t2], temperature change and motor rotate between relation be as
Under:
△T1 | △T2 | △T3 | △T4 | △T5 |
W1 | W2 | W3 | W4 | W5 |
Work as Ti<During set temperature value (200), at sampling interval [t1, t2], temperature change and motor rotate between relation be as
Under:
△T1 | △T2 | △T3 | △T4 | △T5 |
W1’ | W2’ | W3’ | W4’ | W5’ |
Between sampling interval [t1, t2], illuminance change and motor rotation, relation is as follows:
△L1 | △L2 | △L3 | △L4 | △L5 |
W1 | W2 | W3 | W4 | W5 |
The real-time measurement of S2, basis obtains illumination and temperature data and is controlled optimizing with discrete particle cluster algorithm
In step s 2, as shown in figure 3, described discrete particle cluster algorithm is specially:
(1) position of each particulate and speed in random initializtion population;
(2) evaluate the fitness of each particulate, the currently position of each particulate and adaptive value are stored in the individual of each particulate
In body extreme value, the position of fitness value optimum individual and adaptive value in all individuality extreme values are stored in global extremum;
(3) position of more new particle and speed;
(4) to each particulate, its adaptive value is made comparisons with the desired positions that it lives through, if preferably, made
For current desired positions;
(5) more all individuality extreme values and global extremum, update global extremum, if meeting stop condition, search stops
Only, output result, otherwise continues search for.
In the present invention, PSO parameter and experience setting are as follows:
Population:Typically take the result that 10 particles can obtain enough, but for relatively more difficult problem or
The problem of person's particular category, population can get 100 or 200.
The length of particle:This is to be determined the length 2 it is simply that solution by optimization problem.
The scope of particle:Determined by optimization problem, often the one-dimensional different scopes of setting that can be belong to [- 10,10]
Vmax:Maximal rate, determines particle displacement maximum in a cycle, is typically set at the scope of particle
Width, in the design, particle (W1, W2) W1 belongs to [- 10,10], then the size of Vmax is exactly 20.
Studying factors:But c1 and c2 generally equal to 2. only also has other values in the literature. general c1 is equal to c2
And scope is between 0 and 4.
Termination condition:Largest loop number and minimal error require. and largest loop is set as 20.
Two groups of each sequences of motor control sequence can be obtained in sampling interval [t1, t2] and comprise 10 data, respectively
Being temperature control sequence { W1 } and illuminance control sequence { W2 }, min { W1+W2 } being calculated using particle cluster algorithm thus obtaining every
Minimum of a value WMIN that secondary motor rotates.
The present invention is processed to data by this discrete particle cluster control method, has that search speed is fast, efficiency high, calculates
The simple feature of method, is suitable for carrying out real time motor 5 further controlling.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.
Claims (1)
1. a kind of temperature controlled Internet of things system of indoor illumination is it is characterised in that include the temperature for gathering indoor temperature
Sensor, the light sensor for gathering indoor light made by the rapid photo resistance reducing of resistance under illumination, use
In the magnitude of voltage of output is being carried out the A/D modular converter of analog-to-digital conversion, single-chip microcomputer, motor, serial ports, wifi module, and PC
Host computer, described single-chip microcomputer is connected with temperature sensor, A/D modular converter, motor and serial ports respectively, described A/D modulus of conversion
Block is connected with light sensor, and described serial ports is connected with wifi module;Wherein,
Temperature digital signal is passed to single-chip microcomputer, the change in resistance that light is produced by described light sensor by described temperature sensor
Carry out passing to single-chip microcomputer after analog-to-digital conversion by A/D modular converter, it is corresponding that described single-chip microcomputer is converted to pin according to received signal
Low and high level through serial ports, PC host computer is sent to by Wi-Fi module and is shown and store, described PC host computer returns and controls
Instruction real-time control motor work;
Described PC host computer includes wireless router module, memory module and display module, wherein, described wireless router mould
Block and wifi module carry out wireless data, signal transmission, and the data of reception, signal are stored in memory module and are shown in
On display module, described display module issues instruction by controlling interface, and instruction is sent out by described wireless router module
Go out;
Described PC host computer also includes data processing module, and wherein, wireless router module is received by described data processing module
Indoor temperature and illumination degrees of data set up motor operation and control matrix, and illumination and temperature data fortune are obtained according to real-time measurement
It is controlled optimizing with discrete particle cluster algorithm, described display module issues instruction real-time control motor work according to optimum results
Make;
Wherein, described data processing module sets up motor operation control matrix according to as follows according to indoor temperature and illumination degrees of data
Method is carried out:Note temperature Ti that obtains of temperature sensor measurement, be set as according to the value that in front and back's moment measures difference △ Ti-
2, -1,0,1,2 }, wherein, 1 represent in each sample point temperature change at 0.10 DEG C;The illumination that light sensor measurement obtains
Spend for Li, be { -2, -1,0,1,2 } according to the value that in front and back's moment measures difference △ Li, wherein, 1 represents in each sample point
Illuminance changes in 10lm;Motor rotational angle is Wi, according to the value that in front and back moment motor rotates difference Wi be -2, -1,0,
1,2 }, wherein, 1 represent in each 180 ° of motor control moment rotational angle;Set and work as Ti>During set temperature value, in sample region
Between [t1, t2], between temperature change and motor rotate, relation is:It is Wi that the corresponding motor of △ Ti rotates difference;Set and work as Ti<Set
During temperature value, at sampling interval [t1, t2], between temperature change and motor rotation, relation is:The corresponding motor of △ Ti rotates difference
For Wi ';It is set in sampling interval [t1, t2], between illuminance change is rotated with motor, relation is △ Li corresponding motor difference in rotation
It is worth for Wi;
And data processing module according to real-time measurement obtain illumination and temperature data be controlled with discrete particle cluster algorithm excellent
Change and then carry out as follows:
The position of each particulate and speed in random initializtion population;Evaluate the fitness of each particulate, by currently each particulate
Position and adaptive value are stored in the individual extreme value of each particulate, by the position of fitness value optimum individual in all individuality extreme values
It is stored in global extremum with adaptive value;The position of more new particle and speed;To each particulate, its adaptive value is lived through with it
Desired positions make comparisons, if preferably, as current desired positions;More all individuality extreme values and overall pole
Value, updates global extremum, if meeting stop condition, search stops, and output result otherwise continues search for;
PSO parameter and experience setting are as follows:
Population:Take the result that 10 particles can obtain enough, for relatively more difficult problem or particular category
Problem, population can get 100 or 200;
The length of particle:This is to be determined the length 2 it is simply that solution by optimization problem;
The scope of particle:Determined by optimization problem, often one-dimensional scope belongs to [- 10,10];
Vmax:Maximal rate, determines particle displacement maximum in a cycle, is typically set at the wide ranges of particle
Degree, particle (W1, W2) W1 belongs to [- 10,10], then the size of Vmax is exactly 20;
Studying factors:C1 and c2 takes 2;
Termination condition:Largest loop number and minimal error require, and largest loop is set as 20;
Two groups of each sequences of motor control sequence can be obtained in sampling interval [t1, t2] and comprise 10 data, be temperature respectively
Degree control sequence { W1 } and illuminance control sequence { W2 }, calculate min { W1+W2 } using particle cluster algorithm thus obtaining electricity every time
Minimum of a value WMIN that machine rotates.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378039.7A CN104166416B (en) | 2014-08-01 | 2014-08-01 | Internet-of-things system for controlling indoor light illumination temperature |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378039.7A CN104166416B (en) | 2014-08-01 | 2014-08-01 | Internet-of-things system for controlling indoor light illumination temperature |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104166416A CN104166416A (en) | 2014-11-26 |
CN104166416B true CN104166416B (en) | 2017-02-15 |
Family
ID=51910277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410378039.7A Expired - Fee Related CN104166416B (en) | 2014-08-01 | 2014-08-01 | Internet-of-things system for controlling indoor light illumination temperature |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104166416B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104808619A (en) * | 2015-03-07 | 2015-07-29 | 上海恩辅信息科技有限公司 | Internet of things equipment control system based on automatic environment light control and method |
CN104714530A (en) * | 2015-03-07 | 2015-06-17 | 上海恩辅信息科技有限公司 | Internet-of-things device control system and method based on environment automatic control curtain |
CN104898417A (en) * | 2015-04-03 | 2015-09-09 | 滨州学院 | Internet-of-things optimization method for indoor light and temperature control |
CN105045107A (en) * | 2015-04-08 | 2015-11-11 | 袁川来 | Home environmental parameter acquisition method based on Kalman filtering |
CN105068776A (en) * | 2015-08-06 | 2015-11-18 | 深圳市同城快跑科技有限公司 | Customer display WiFi adapter |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2665893B2 (en) * | 1995-06-30 | 1997-10-22 | 財団法人電力中央研究所 | Plant cultivation apparatus and cultivation method |
US20110140880A1 (en) * | 2009-12-11 | 2011-06-16 | Allen Gerber | Power delivery with power source identification |
CN203220229U (en) * | 2013-04-15 | 2013-10-02 | 深圳市宁冠鸿科技有限公司 | Control device and system for intelligent home electric curtain |
CN103389720B (en) * | 2013-08-02 | 2015-06-24 | 大连交通大学 | System for achieving automatic control of shutter by applying mobile phone |
CN103932571A (en) * | 2014-04-22 | 2014-07-23 | 中国建筑股份有限公司 | Window shade control system and method |
-
2014
- 2014-08-01 CN CN201410378039.7A patent/CN104166416B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN104166416A (en) | 2014-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104166416B (en) | Internet-of-things system for controlling indoor light illumination temperature | |
CN108712809B (en) | A kind of luminous environment intelligent control method neural network based | |
CN208128532U (en) | A kind of multifunctional plant growth and habitat information monitoring system | |
Kumar et al. | Implementation of smart LED lighting and efficient data management system for buildings | |
CN105137950B (en) | A kind of warmhouse booth intelligence control system based on technology of Internet of things | |
CN104519076A (en) | Agriculture environment monitoring control system | |
CN106161646A (en) | A kind of intelligent agricultural system based on Internet of Things | |
CN110736231A (en) | Air conditioner control method and device, air conditioner, storage medium and processor | |
Wang et al. | Design of intelligent residential lighting control system based on ZigBee wireless sensor network and fuzzy controller | |
CN106249782A (en) | Warmhouse booth Internet of Things intelligent monitoring management system | |
CN101505058B (en) | Dual recursive neutral element sensitivity load network modeling apparatus and method based double network | |
CN204925782U (en) | Warmhouse booth intelligence control system based on internet of things | |
CN104770347A (en) | Portable and intelligent insect condition prediction system | |
CN107616079A (en) | Intelligent irrigation system design based on LoRa | |
CN105607152A (en) | Wireless-sensor-network-based microenvironment meteorological parameter acquisition system and realization method | |
CN205121386U (en) | Intelligence agricultural system based on thing networking | |
CN208766544U (en) | Using the long-distance intelligent Pet house of wechat | |
CN110428600A (en) | A kind of gas sensor data acquisition and wireless system for transmitting data based on FPGA | |
Mishra et al. | Energy-efficient design of wireless sensor mote using mobile-edge computing and novel scheduling mechanism for self-sustainable next-gen cyber physical system | |
CN105045107A (en) | Home environmental parameter acquisition method based on Kalman filtering | |
CN211233266U (en) | Indoor temperature control system based on high in clouds | |
CN115540488A (en) | Full-automatic industrial circulating water temperature control system | |
CN202870577U (en) | An intelligent control system used for building energy conservation | |
CN104597350B (en) | Based on the method that energy efficiency monitoring can automatically classify to building electricity consumption | |
CN204028651U (en) | A kind of monitoring of the industrialized agriculture based on Internet of Things and service system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170215 Termination date: 20170801 |