Summary of the invention
For the ease of installing, the present invention proposes method and apparatus air quality monitoring and time showing combined, and function when there is satellite school, original elapsed time clock can be made full use of, be both convenient to install, again reduced cost.
Technical scheme of the present invention is: device is made up of power supply unit, housing unit, time display, driving circuit, perpetual calendar chip, adjustment button, interface circuit, Single Chip Microcomputer (SCM) system, time source, air mass sensor and air quality display.Power supply unit provides power supply for each several part, the mechanical structure portion of housing unit then component devices.Perpetual calendar chip exports and is connected to driving circuit, and driving circuit exports and is connected to display, and perpetual calendar chip is connected with adjustment button; When needs carry out time adjustment to time set, by manually operating button.Button is connected with monolithic processor controlled interface circuit, and the output of time source is connected with single-chip microcomputer.Air quality sensing module is connected with Single Chip Microcomputer (SCM) system, and air quality display is connected with Single Chip Microcomputer (SCM) system.Time source can be: Beidou receiver, GPS, GALILEO receiver, GLONASS receiver, network time, radio wave receiver etc., the connected mode of time source and single-chip microcomputer can be: serial ports, SPI, I2C, wireless, WIFI, network interface etc.
The course of work of device is as follows: perpetual calendar chip operation, carries out timing, and driving time has shown the time of carrying out, date display; Air mass sensor works, and Real-Time Monitoring current air mass, sends Single Chip Microcomputer (SCM) system to, and Single-chip Controlling air quality display shows.
Automatic correcting time step is as follows: time source gives single-chip microcomputer after obtaining reference time, after single-chip microcomputer obtains this time, output signal to interface circuit, interface circuit produces simulation manual calibration signal, and perpetual calendar chip upgrades internal time after obtaining simulation manual calibration signal; After time upgrades, perpetual calendar starts timing, the time now exported namely be synchronous after time.
The advantage of this invention is air mass sensor to be made in time set inside, make use of the general perpetual calendar chip of time set and display section, chip microcontroller is to the renewal of perpetual calendar time and the detection and the display that control air quality, single assembly can realize detection and the clock count of air quality, easy for installation, cost is low, is convenient to large-scale promotion.
Specific embodiments
As shown in Figure 1, time set is made up of power supply unit, housing unit, time display, driving circuit, perpetual calendar chip, adjustment button, interface circuit, single-chip microcomputer, time source, air quality sensing module and air quality display the composition of time set.Input power is converted to the electrical energy form that each several part needs by power supply unit, for each several part provides power supply; Housing unit then forms the mechanical structure portion of time set, can be the framed structure of aluminum alloy frame composition, also can be sheet metal to be carried out bending to form box body.Perpetual calendar chip is that one can carry out time counting automatically, exports the chip of the information such as date, Hour Minute Second, week; Driving circuit is a kind of power amplification circuit, and display can show current time and date, can be numeral method, LED pipe display and liquid crystal display; The output of perpetual calendar is connected to driving circuit, and the output of driving circuit is connected to display.Interface circuit presents high resistant or short-circuit condition by the control of single-chip microcomputer, and triple gate integrated circuit can be adopted to realize, and the modes such as relay also can be adopted to realize, all within the protection domain of this patent.Interface circuit has multiple output, regulates the pin of button to be connected one by one with the output pin of interface circuit.
Air quality sensing module is a kind of sensing module that can detect material concentration in the air such as PM2.5 or PM10 or formaldehyde in air, air quality sensing module is connected with single-chip microcomputer, its connected mode can be the digital forms such as serial data, may also be the signal of pulse width variation, also the simulating signal etc. of changes in amplitude represents the electric signal of gaseous substance concentration.
Air quality display adopts numeral method, and its display of Single-chip Controlling, its control mode has multiple, for known.
Button is regulated to be one group of button, can time of manual shift timer, the timer that existing market is sold all has, and belongs to known content.Perpetual calendar chip is connected with adjustment button; When needs carry out time adjustment to time set, by manually operating button, the time of setting arbitrarily can be modulated.
As shown in Figure 2, the bipod of perpetual calendar chip is connected with adjustment button bipod annexation between perpetual calendar, interface circuit, single-chip microcomputer, regulates the bipod of button to be connected with the bipod of interface circuit; The output of single-chip microcomputer is connected with interface circuit, and interface circuit can present high resistant or short-circuit condition under the control of single-chip microcomputer.Interface circuit, under the control of single-chip microcomputer, can simulate the signal that manual control regulates button to produce, achieve the Timing to perpetual calendar chip.
Single Chip Microcomputer (SCM) system comprises the parts such as single-chip microcomputer, reset, oscillatory circuit, is known content.The input/output port of single-chip microcomputer is connected with regulating one end of button.Time source refers to the device that can obtain special time, can be: Beidou receiver, GPS, GALILEO receiver, GLONASS receiver, network time, radio wave receiver etc., time source exports temporal information to single-chip microcomputer after obtaining special time.The connected mode of time source and single-chip microcomputer can be: serial ports, SPI, I2C, wireless, WIFI, network interface etc.
The automatic synchronization process of time set as shown in Figure 3, is described below:
1, single-chip microcomputer executive routine, differentiates the need of carrying out time synchronized;
2, single-chip microcomputer communicates with time source, obtains current time;
3, perpetual calendar has an initial time, and single-chip microcomputer, according to the time source time of initial time and acquisition, calculates the time needing adjustment, generates regulating impulse;
4, single-chip microcomputer output signal initialization perpetual calendar, then Drazin inverse pulse, is updated to current time by the time of perpetual calendar.
Fig. 4 is pulse regulation time principle, and when input switch pulse, then current adjustment is arranged on " year ", " moon ", " day ", " time ", " dividing ", switch between " second ", as current adjustment is set to " year ", then now input adjustment pulse, then value changes year;
Fig. 5 is the Computing Principle of adjustment umber of pulse, is described below:
Subtracted each other with initial year when the year before last, obtained year adjustment pulse;
The current moon and the initial moon subtract each other, and obtain moon adjustment pulse;
Subtract each other when the day before yesterday and initial day, obtain day adjustment pulse;
Subtract each other time current and time initial, when obtaining, adjust pulse;
Current point is subtracted each other with initial point, obtains a point adjustment pulse;
Current second and initial second subtract each other, and add second adjustment process time, obtain adjusting pulse second.
Refer to that perpetual calendar chip is from the total number of seconds be initialised between adjustment tailend second adjustment process time, when perpetual calendar chip is only supported to regulate for whole minute, can by preset whole minutes calculating regulation time second.
The observation process of air quality as shown in Figure 6, is described below:
1, single-chip microcomputer reads the numerical value of air mass sensor;
2, single-chip microcomputer carries out data processing;
3, Single-chip Controlling display display;
4, single-chip microcomputer time delay a period of time.
In sum, the present invention proposes a kind of time set with air quality monitoring, and have employed and change is carried out to perpetual calendar chip realize time synchronized, add the function of time set, be convenient to install, reduce costs, there is very strong practicality and wide application prospect.
Although content of the present invention has done detailed introduction, will be appreciated that above-mentioned description should not be considered to limitation of the present invention.After those skilled in the art have read foregoing, for multiple amendment of the present invention with substitute will be all apparent.Therefore protection scope of the present invention should be limited to the appended claims.