The control circuit and the operating mode thereof of fan chaos wind
Technical field
The present invention relates to the control circuit and the operating mode thereof of fan chaos wind.
Background technique
The wind shelves switching method of electric fan is a lot of in the market, and so that comfortable wind farthest to be provided, modal method is a temperature adjustment wind speed.
The invention of application number 200810119643.2 method and the device of rotation speed of the fan " adjustment ", when the difference of true temperature and reference value is just adjusted rotating speed during greater than specified value, otherwise uncomfortable, the wind class that provides a kind of gear to change with temperature variation.
The utility model patent of application number 201120213241.6 " but fan of a kind of intelligence automatic speed regulation " can be according to user's shell temperature free adjustment wind speed.
The patent of invention of application number 201010276923.1 " a kind of device based on the chaology natural wind simulating " realize a kind of natural wind based on real chaology, but whole system is complicated, and cost is high, is not suitable for producing in batches.
Summary of the invention
The objective of the invention is to overcome the existing technology problem and a kind of chaos wind wind class is provided; Satisfy different users's individual sexual demand; Its technical difficulty is low, only depends on software to realize, does not increase control circuit and operating mode thereof cost and that can produce the fan chaos wind of fan chaos wind.
Technological scheme of the present invention is: a kind of control circuit of fan chaos wind; It is characterized in that comprising that order detection unit, timing get random numbers unit and chaos wind processing unit; Said chaos wind processing unit receives from the signal of order detection unit and discerns judgement; And chaotic signal is exported to timing get the random numbers unit; Non-chaotic signal is exported to the order detection unit through other processing unit, and said timing is exported to chaos wind processing unit with signal again after getting and handling behind the signal that the random numbers unit receives chaos wind processing unit.
The operating mode of the control circuit of fan chaos wind is characterized in that step is following:
Step 1: set T blanking time, timing get the random numbers unit each blanking time T get random value in the memory block RAM at it in second, fan is every to interrupt 1 time at a distance from the t time, the timing of T is just checked in every interruption 1 time, every mistake 1 second, T deducts 1, is 0 up to T;
Step 2: get remainder, chaos wind processing unit whenever detects T=0, just the random value of random numbers unit and the register RA ND value in it is got in timing and adds up and obtain digital A; This numeral A repeats to deduct total gear of fan and counts N; Up to value≤N of digital A, the number that obtains at last promptly is the remainder of being asked, and chaos wind processing unit outputs to control circuit with remainder again and carries out fan speed-regulating; This remainder is when the gear of front fan and counts D, and the rotating speed of fan and current gear are counted D and adapted; The formula of gear D is: D=RAND () MOD N, wherein RAND (): random number functions, MOD: the arithmetic sign that rems, N: the total gear of fan;
Step 3: after last T time blanking time is intact, turned back to step 1 again, moving in circles with this changes the gear D of fan, thereby changes the rotating speed of fan.
Said time T is 1 second~15 seconds, and program is defaulted as 6 seconds, and user's enable manual resets; The scope of said t time is 100us~300us.
The present invention's advantage compared with prior art is: the individual sexual demand that satisfies the different users provides the air quantity of random variation, and its technical difficulty is low, only depends on software to realize, does not increase the fan cost.
Description of drawings
Fig. 1 is that fan detecting of the present invention connects block diagram;
Fig. 2 is a flow chart of the present invention;
Fig. 3 is that random numbers unit flow chart is got in the timing in the embodiment of the invention interrupt routine;
Fig. 4 is the chaos wind processing unit flow chart in the embodiment of the invention main program.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described further.
As shown in Figure 1; A kind of control circuit of fan chaos wind; Characteristics of the present invention are to comprise that order detection unit, timing get random numbers unit and chaos wind processing unit; Said chaos wind processing unit receives from the signal of order detection unit and discerns judgement; And chaotic signal is exported to timing get the random numbers unit, non-chaotic signal is exported to the order detection unit through other processing unit, and said timing is exported to chaos wind processing unit with signal again after getting and handling behind the signal that the random numbers unit receives chaos wind processing unit.
Shown in Fig. 2 to 4, the operating mode of the control circuit of fan chaos wind is characterized in that step is following:
Step 1: set T blanking time, timing get the random numbers unit each blanking time T get random value in the memory block RAM at it in second, fan is every to interrupt 1 time at a distance from the t time, the timing of T is just checked in every interruption 1 time, every mistake 1 second, T deducts 1, is 0 up to T; In the present embodiment, can be through the value of pressing key assignments T;
Step 2: get remainder, chaos wind processing unit whenever detects T=0, just the random value of random numbers unit and the register RA ND value in it is got in timing and adds up and obtain digital A; This numeral A repeats to deduct total gear of fan and counts N; Up to value≤N of digital A, the number that obtains at last promptly is the remainder of being asked, and chaos wind processing unit outputs to control circuit with remainder again and carries out fan speed-regulating; This remainder is when the gear of front fan and counts D, and the rotating speed of fan and current gear are counted D and adapted; The formula of gear D is: D=RAND () MOD N, wherein RAND (): random number functions, MOD: the arithmetic sign that rems, N: the total gear of fan;
Step 3: after last T time blanking time is intact, turned back to step 1 again, moving in circles with this changes the gear D of fan, thereby changes the rotating speed of fan.
In the present embodiment, said time T is 1 second~15 seconds, and program is defaulted as 6 seconds, and user's enable manual resets; The scope of said t time is 100us~300us.
In the present embodiment, the control circuit of fan chaos wind adopts 8 single-chip microcomputer SN8P2602B, and controller general memory block (RAM) has 48 bytes, gets random value time T=6 second.
The algorithm of getting random numbers is: with reference to figure 4, the every 125us of fan interrupts 1 time, whenever advances 1 interruption, with regard to the timing of running time between inspections T, and every mistake 1 second, T deducts 1, and after 0, the value addition of random value and register RA ND becomes new RAND value.Because of the RAM district is worth at random, so the RAND that obtains is exactly a random numbers.
The algorithm of getting remainder is: with reference to figure 3, whenever detect T=0, chaos wind processing unit just obtains digital A with its adding up of register RA ND, counts N total this numeral A repeats to deduct the fan gear, up to A value≤N, and the remainder that the A value is asked exactly.
The software detailed implementation is following in the examples of implementation:
As shown in Figure 2, main program detects " chaos wind " button, whenever by 1 this button, and chaos wind Status Flag MODE_F circulation negate.When MODE_F=0, the main program of Fig. 2 is skipped the initialization of chaos wind, and chaos fetch preface as shown in Figure 3 is directly skipped, and is equal to and closes chaos wind; When MODE_F is 1 by 0 upset, the main program initialization chaos wind of Fig. 2: T=6.When MODE_F=1, total the random numbers that the chaos fetch preface of Fig. 3 was whenever got with Fig. 4 at a distance from 6 seconds to fan gear N complementation, is given F_SPEED with the remainder assignment, F_SPEED is exactly the work gear of fan.Software has been realized whenever at a distance from 6 seconds like this, and wind speed becomes chaos wind function once at random.