CN100534256C - Respiration lamp controlling method and its device - Google Patents

Respiration lamp controlling method and its device Download PDF

Info

Publication number
CN100534256C
CN100534256C CNB2006100017188A CN200610001718A CN100534256C CN 100534256 C CN100534256 C CN 100534256C CN B2006100017188 A CNB2006100017188 A CN B2006100017188A CN 200610001718 A CN200610001718 A CN 200610001718A CN 100534256 C CN100534256 C CN 100534256C
Authority
CN
China
Prior art keywords
timer
brightness value
duty ratio
unit
illuminometer
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
CNB2006100017188A
Other languages
Chinese (zh)
Other versions
CN1802065A (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.)
Feitian Technologies Co Ltd
Original Assignee
Beijing Feitian Technologies Co Ltd
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 Beijing Feitian Technologies Co Ltd filed Critical Beijing Feitian Technologies Co Ltd
Priority to CNB2006100017188A priority Critical patent/CN100534256C/en
Publication of CN1802065A publication Critical patent/CN1802065A/en
Application granted granted Critical
Publication of CN100534256C publication Critical patent/CN100534256C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

Present invention relates to a luminescence indicating equipment controlling means and device, in particular a breath lamp controlling means and device. Said invention adopts timer with maximal cycle less than or equal to less than or equal to 100 ms to obtain precision control, through outputting different duty ratio luminescence, extinct signal gating luminescence unit and light and shade periodic control, matching it with hominine respiratory cycle. Said invention does not regulate LED light and shade by directly controlling current output or output voltage, but through software means controlling LED light and shade time ratio, thereby having higher stability and benefit to each parametric adjustment.

Description

Breath lamp controlling means and device thereof
Technical field
The present invention relates to a kind of control method and device thereof of luminous indicating equipment, particularly a kind of breath lamp controlling means and device thereof.
Technical background
Luminous indicating lamp is used in the various electronic equipments very general, but in the existing product, common illumination effect is all more single, for example only continue to send solid color light or glimmer with fixed frequency, and in order to address the above problem, on November 16th, 2005 disclosed CN1696999A patent, a kind of LED indicating device and method are provided, can send different indicating effects according to the electronic equipment user mode, but described device control procedure is comparatively complicated, and the memory headroom that takies is also bigger, can't be applicable in the low side single-chip microcomputer, the scope of application is less, and cost is also higher relatively.
Summary of the invention
The present invention has overcome above-mentioned shortcoming, provides a kind of simple in structure, can realize breath lamp controlling means and device thereof as chiaroscuro effect as breathing.
The present invention solves the technical scheme that its technical problem takes: a kind of breath lamp controlling means comprises the steps
1) the first timer interrupt service routine obtains a brightness value successively according to the index direction to illuminometer;
2) the second timer interrupt service routine adds up according to described brightness value and preceding once luminous duty ratio variable and brightness value, obtains current luminous duty ratio variable;
3) according to the comparison of current duty ratio variable and threshold value, control the luminous of luminescence unit and extinguish.
Also can comprise in the described step 1) and judge illuminometer index direction step.
Described illuminometer can be self-defining a series of brightness value, or an algorithmic function.
Described first timer can be realized by the second timer simulation.
The maximum cycle of described second timer can be less than or equal to 100ms.
A kind of breath light comprises a control unit and a luminescence unit, comprises an illuminometer unit and two timer units in the described control unit,
The first timer unit obtains a brightness value successively according to the index direction to described illuminometer unit;
The second timer unit adds up according to described brightness value and preceding once luminous duty ratio variable and brightness value, obtains current luminous duty ratio variable;
According to the comparison of current duty ratio variable and threshold value, control the luminous of described luminescence unit and extinguish.
Described first timer unit can be realized by the second timer unit simulation.
Described control unit can be the microprocessor that comprises CPU, MCU or single-chip microcomputer.
Described luminescence unit can comprise a light-emitting diode and an isolation resistance, and the control output end of described control unit links to each other with described light-emitting diode through described isolation resistance.
Compared with prior art the invention has the beneficial effects as follows: the present invention is by adopting the accurate control of timer to the time, and the minimum period of described timer is less than or equal to 100ms, by luminous, the signal controlling luminescence unit that extinguishes of the different duty of output with the time duty ratio that becomes constantly glimmer, make maximum time luminous or that extinguish be less than or equal to 100ms at interval.Change regularly from visually then being shown as light and shade, promptly by dark to bright, by bright to dark, again by dark to bright, go round and begin again, the variation of this light and shade by people feel be linear, change uniformly, can be by control to the light and shade cycle, match with people's respiratory cycle, illumination effect is very lively.And the present invention directly controls the light and shade that the size of output current or output voltage is regulated LED, but the time scale of the control of the means by software LED on and off is regulated brightness, and stability is higher, also is more conducive to the adjusting to each parameter.The present invention also is applicable to the control mode that adopts the low side single-chip microcomputer, as long as controller chip inside includes at least one timer and can realize its function, therefore adoptable chip range is wider, and the employed cost of above-mentioned effect is also lower reaching.
Description of drawings
Fig. 1 is the circuit theory diagrams of embodiment 1 among the present invention
Fig. 2 is the curve synoptic diagram of illuminometer among the present invention
Fig. 3 is the control flow chart of timer 1 interrupt service routine among the present invention
Fig. 4 is the control flow chart of timer 2 interrupt service routine among the present invention
Fig. 5 is brightness change curve schematic diagram among the present invention
Fig. 6 is the circuit theory diagrams of embodiment 2 among the present invention
Embodiment
The circuit theory of a preferred embodiment of the present invention as shown in fig. 1, comprise a control unit and a luminescence unit, described control unit mainly is made of a controller chip U1, described controller chip can be microprocessors such as CPU, MCU, single-chip microcomputer, the I/O end of described controller chip U1 connects the negative electrode of a LED through a resistance R, one anode of described light-emitting diode connects the Vcc power supply, and the communication ends of described control chip U1 or control end connect the corresponding communication ends or the control end of electronic equipment.
Be provided with two timer interrupt locations and an illuminometer unit among the described controller chip U1, described timer interrupt location and illuminometer unit are realized by software, and are controlled the on and off of described LED by the I/O end.Wherein the interrupt cycle of timer 1 more much bigger than the interrupt cycle of timer 2, described two kilsyth basalts are self-defining a series of brightness value, or the algorithmic function by appointment obtains.Be 10ms the interrupt cycle of setting timer 1 in the present embodiment, and be 1ms the interrupt cycle of timer 2, and illuminometer is the self-defining illuminometer of determining according to test, its brightness value curve as shown in Figure 2, abscissa is the illuminometer index position, ordinate is a brightness value, and from 0~255, wherein the T point is the gauge outfit position, and the B point is not difficult to find out from figure for table tail position, when brightness value index point gauge outfit position, the brightness value minimum, when brightness value index point table tail position, the brightness value maximum.To the table tail, brightness begins to be non-linear increase by gauge outfit from gauge outfit, and to gauge outfit, the brightness value of preservation is non-linear minimizing from the table tail.The index of described illuminometer is two-way, both can be from gauge outfit to having shown the tail direction, and also can be from the table tail to the gauge outfit direction.
Described timer 1 interrupt service routine is used to obtain brightness value, described brightness value is searched by the illuminometer index, illuminometer index during beginning is in gauge outfit, enter this timer interruption at every turn and obtained brightness value, all to change the illuminometer index, if the order of tabling look-up be from gauge outfit to the table tail, the illuminometer index increases progressively so, if the order of tabling look-up be from the table tail to gauge outfit, the illuminometer index successively decreases so.Its concrete workflow as shown in Figure 3, behind the interrupt service routine 301 that enters timer 1, obtain a brightness value by the illuminometer index, as step 302, judge the index direction 303 of illuminometer then, if index direction is to showing tail from gauge outfit, then the illuminometer index is increased progressively and add 1, as step 304, judge again whether the index of illuminometer has arrived table tail 305, if, then change index direction, promptly,, then directly withdraw from interrupt service routine 310 if arrive the table tail from showing tail to gauge outfit direction 306; If index direction is the direction of successively decreasing from the table tail to gauge outfit, then the illuminometer rope is successively decreased and subtract 1, as step 307, whether the index of judging illuminometer has again arrived gauge outfit 308, if, then change index direction, promptly become from gauge outfit and increase progressively direction 309 to what show tail, if do not arrive the table tail, directly withdraw from interrupt service routine 310 yet.Through the interrupt cycle of a timer 1, promptly behind the 10ms, repeat said process again.
The respiratory cycle that described timer 1 is responsible for the control breathing lamp, and obtain brightness value by searching illuminometer, described timer 3 is responsible for the flicker frequency of control breathing lamp, and is responsible for adjusting by brightness value the bright lamp duty ratio of breath light, and then the brightness of definite breath light.
Described timer 2 interrupt service routine flow process as shown in Figure 4, behind the interrupt service routine 401 that enters timer 2, be written into the brightness value 402 that from described timer 1 interrupt service routine, obtains, carry out sum operation with previous duty ratio variable again, the value 403 of the duty ratio variable that the result who obtains writes a composition new, afterwards, whether the value of judging current duty ratio variable is greater than a threshold value, step 404, threshold value described in the present embodiment is 255, if surpass described threshold value, then will subtract value after 256 as working as the duty ratio variate-value, as step 405 with this duty ratio variate-value, control described I/O interface output low level control signal simultaneously, it is luminous to control described LED, as step 406, withdraws from timer 2 interrupt service routine 408 at last.If judge that in step 404 current duty ratio variable is less than or equal to threshold value, then by described I/O interface output high level, described at ordinary times LED extinguishes, and also withdraws from timer 2 interrupt service routine 408 at last.Through the cycle of a timer 2, promptly behind the 1ms, repeat said process again.Described threshold value is generally got with maximum brightness value and is equated.
For example, when entering the timer 2 interrupt service routine, the current brightness value that gets access to is 128, current duty ratio variable is 0, has no progeny in entering so, and the result of brightness value and duty ratio addition of variables is 128, this result is kept in the duty ratio variable again as new duty ratio variate-value, because this result less than 255, so just extinguishes LED, withdraws from the timer 2 interrupt service routine; Through next interrupt cycle, when entering the timer 2 interrupt service routine once more, brightness value is 128, the duty ratio variable is 128, enter interrupt routine so after, the result of brightness value and duty ratio addition of variables is 256, this result〉255, to subtract 256 result be 0 to the duty ratio variable so, preserves in the duty ratio variable with 0 again, and bright then lamp withdraws from the timer 2 interrupt service routine; Again through an interrupt cycle, enter when flow process entered with the above-mentioned first time behind the timer 2 interrupt service routine identical once more.Like this, short of change brightness value, the bright lamp duty ratio of breath light is exactly 0.5 so, is equivalent to the median of brightness.Promptly get 128 10ms in the time at brightness value, every through 1ms, described LED is shinny or extinguish once with 0.5 duty ratio, and is when passing through next brightness value again, shinny or extinguish according to the duty ratio of next brightness value correspondence.Like this, when getting brightness value and be 255, according to top logical process, the luminous duty ratio of described light-emitting diode is exactly 254/255, and it is the brightest to be equivalent to brightness; When getting brightness value is 0, and according to top logical process, the luminous duty ratio of described light-emitting diode is exactly 0, and it is the darkest to be equivalent to brightness.
Like this, by described light-emitting diode with the time duty ratio that becomes ceaselessly glimmer because the frequency of flicker is very high, on visual effect, the light and shade of light-emitting diode changes regularly, promptly by dark to bright, by bright to secretly, again by secretly to bright, go round and begin again, circulation is carried out, and the variation of this light and shade, by people feel be linear, change uniformly.The brightness change curve of correspondence as shown in Figure 5 in one-period, described one-period correspondence be exactly the index of brightness value from gauge outfit to showing tail again to the process of gauge outfit, abscissa is the illuminometer index position, and ordinate is brightness, and wherein the T point is the gauge outfit position, the B point is table tail position, be not difficult to find out that from figure when brightness value index point gauge outfit position, brightness is the brightest, when brightness value index point table tail position, brightness is the darkest.And, the maximum cycle of timer 2 is less than or equals 100ms, make the flicker that duty ratio luminous or that extinguish takes place when minimum and maximum value, can't be perceived by naked eyes, that is to say, maximum time luminous or that extinguish is less than or equal to 100ms at interval, therefore just by people feel be linear, change uniformly.
Generally by dark to bright, again by bright be a respiratory cycle to calculating mentally.A respiratory cycle is controlled by the number of brightness value in the illuminometer and the cycle of timer 1, can be controlled in about about 6 seconds, matches with respiratory cycle of people, and illumination effect is very lively.
In addition, timer 1 in the present embodiment also can be realized by the timer 2 simulation, promptly in the timer 2 interrupt service routine, design a counter, whenever the interrupt service routine that enters a timer 2 is promptly carried out as the course of work among Fig. 4 and counting, when counter reaches set point, be that the time accumulative total of timer 2 is when reaching the time span of timer 1, call and change the brightness value function, promptly carry out the course of work as shown in Figure 3, inquiry illuminometer, change brightness value, thereby by only using a timer to realize above-mentioned effect.
The another kind of embodiment of hardware circuit among the present invention, as shown in Figure 6, described control unit mainly is made of a controller chip U1, described controller chip can be microprocessors such as CPU, MCU, single-chip microcomputer, the I/O end of described controller chip U1 connects the anode of a LED through a resistance R, the minus earth of described light-emitting diode, the communication ends of described control chip U1 or control end connect the corresponding communication ends or the control end of electronic equipment.Control method in the present embodiment and a last embodiment are basic identical, difference only is in the time will controlling described lumination of light emitting diode, the I/O of described controller chip end is output as high level, and in the time of controlling described light-emitting diode and extinguish, the I/O end of described controller chip is output as low level.
In addition, the communication ends of described control chip U1 or control end connect the corresponding communication ends or the control end of electronic equipment, can carry out above-mentioned breathing and show by the control signal or the status signal of described electronic equipment output, or, send the breathing display effect of different frequency according to different signal output.
More than breath lamp controlling means provided by the present invention and device thereof are described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (9)

1. a breath lamp controlling means is characterized in that: comprise the steps
1) the first timer interrupt service routine obtains a brightness value successively according to the index direction to illuminometer;
2) the second timer interrupt service routine adds up according to described brightness value and preceding once luminous duty ratio variable and brightness value, obtains current luminous duty ratio variable;
3) according to the comparison of current duty ratio variable and threshold value, control the luminous of luminescence unit and extinguish.
2. breath lamp controlling means according to claim 1 is characterized in that: also comprise in the described step 1) and judge illuminometer index direction step.
3. breath lamp controlling means according to claim 1 is characterized in that: described illuminometer is self-defining a series of brightness value, or an algorithmic function.
4. breath lamp controlling means according to claim 1 is characterized in that: described first timer is realized by the second timer simulation.
5. breath lamp controlling means according to claim 1 is characterized in that: the maximum cycle of described second timer is less than or equal to 100ms.
6. breath light is characterized in that: comprises a control unit and a luminescence unit, comprises an illuminometer unit and two timer units in the described control unit,
The first timer unit obtains a brightness value successively according to the index direction to described illuminometer unit;
The second timer unit adds up according to described brightness value and preceding once luminous duty ratio variable and brightness value, obtains current luminous duty ratio variable;
According to the comparison of current duty ratio variable and threshold value, control the luminous of described luminescence unit and extinguish.
7. breath light according to claim 6 is characterized in that: described first timer unit is realized by the second timer unit simulation.
8. breath light according to claim 6 is characterized in that: described control unit is the microprocessor that comprises CPU, MCU or single-chip microcomputer.
9. according to claim 6 or 7 or 8 described breath lights, it is characterized in that: described luminescence unit comprises a light-emitting diode and an isolation resistance, and the control output end of described control unit links to each other with described light-emitting diode through described isolation resistance.
CNB2006100017188A 2006-01-23 2006-01-23 Respiration lamp controlling method and its device Expired - Fee Related CN100534256C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100017188A CN100534256C (en) 2006-01-23 2006-01-23 Respiration lamp controlling method and its device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100017188A CN100534256C (en) 2006-01-23 2006-01-23 Respiration lamp controlling method and its device

Publications (2)

Publication Number Publication Date
CN1802065A CN1802065A (en) 2006-07-12
CN100534256C true CN100534256C (en) 2009-08-26

Family

ID=36811738

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100017188A Expired - Fee Related CN100534256C (en) 2006-01-23 2006-01-23 Respiration lamp controlling method and its device

Country Status (1)

Country Link
CN (1) CN100534256C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853633A (en) * 2010-04-30 2010-10-06 宇龙计算机通信科技(深圳)有限公司 Method for realizing breath light at mobile terminal and mobile terminal
CN102095097A (en) * 2010-12-23 2011-06-15 西北工业大学 High-power breathing lamp
CN102958220B (en) * 2011-08-18 2015-04-22 盛科网络(苏州)有限公司 Method and device for regulating flicker of indicator lamps
CN102655705B (en) * 2012-04-24 2014-03-26 东莞市旭田电子有限公司 Frequency-variable breathing lamp and control method thereof as well as main machine peripherals
CN103845070B (en) * 2012-12-07 2018-08-03 上海联影医疗科技有限公司 PET-CT scanning means and its control method
CN109275220B (en) * 2017-07-17 2022-03-22 迈普通信技术股份有限公司 LED lamp control method, device, control device and computer readable storage medium
CN111954334B (en) * 2020-08-12 2023-03-10 宁波视睿迪光电有限公司 Breathing lamp control method and device, electronic equipment and readable storage medium
CN114430600B (en) * 2020-10-29 2024-04-12 深圳绿米联创科技有限公司 Breathing lamp control method, knob type switch and storage medium

Also Published As

Publication number Publication date
CN1802065A (en) 2006-07-12

Similar Documents

Publication Publication Date Title
CN100534256C (en) Respiration lamp controlling method and its device
CN105530721B (en) LED light-emitting control method, device and system
CN100385490C (en) White illumination
CN101841963B (en) Glow brightness adjustable lighting device and adjusting method thereof
CN102438367A (en) Linear dimming system based on brightness perceived by human eyes
CN111246628B (en) Control method, device, equipment and storage medium for optical module indicator lamp
CN208424845U (en) The Healthy Lighting system of Effective Regulation human circadian
US20140214362A1 (en) Method and system of detecting flickering frequency of ambient light source
CN106455266B (en) A kind of color temperature adjustment device and method
CN110400540A (en) A kind of brightness control system for LED display
CN115802562A (en) Illumination intensity self-adaptive adjustment system of LED ceiling lamp
CN203086808U (en) Mixed color LED adjustable color temperature constant illumination intelligent LED plane lighting device
CN109874195A (en) A kind of Healthy Lighting system of Effective Regulation human circadian
CN213342755U (en) Eye moistening lamp capable of simulating natural light
CN207969019U (en) A kind of LED intelligent dimming tinting systems for household
Pandharipande et al. Illumination and light sensing for daylight adaptation with an LED array: Proof-of-principle
CN205389288U (en) Energy -conserving lighting control system of intelligence
Kudryashov et al. Pulse width modulated LED light control and vision adaptation
CN1722926B (en) Intelligent LED control system and method
CN113759272A (en) Intelligent lamp band length detection method and device and intelligent lamp band
CN104113953A (en) Electro-optical device and control method
CN106488613A (en) A kind of intelligent Light-control System of the classroom LED based on internet and method
CN203215547U (en) Window scenery light-emitting device simulating natural lighting
CN114710859B (en) Multi-primary-color full-spectrum LED (light-emitting diode) light mixing light source
CN101169756B (en) Display method for using LED half intensity as item background operation state

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
C56 Change in the name or address of the patentee

Owner name: FEITIAN TECHNOLOGIES CO., LTD.

Free format text: FORMER NAME: BEIJING FEITIAN CHENGXIN TECHNOLOGY CO., LTD.

CP03 Change of name, title or address

Address after: 100085 Beijing city Haidian District Xueqing Road No. 9 Ebizal building B block 17 layer

Patentee after: Feitian Technologies Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 40 research, 7A building, 5 floor

Patentee before: FEITIAN TECHNOLOGIES Co.,Ltd.

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

Granted publication date: 20090826

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