An occupancy detecting method for controlling a turned on state or a turned off state of an electrical apparatus in a living space comprising:
- using a motion sensor including a transmitter for transmitting a wave signal, a receiver for receiving an echoed signal of the wave signal reflected from a moving human body in a detection zone, and a sensing circuitry for detecting a human motion;
- using a controller circuitry to analyze a time duration and a frequency pattern of the echoed signal generated by the human motion in the living space;
- wherein if the time duration of the echoed signal is shorter than a preset minimum time length, the echoed signal is considered as a local random motion signal;
- wherein if the time duration of the echoed signal is longer than the preset minimum time length and the frequency pattern of the echoed signal is higher than the frequency pattern of the wave signal transmitted, the echoed signal is judged as an incoming motion signal;
- wherein if the time duration of the echoed signal is longer than the preset minimum time length and the frequency pattern of the echoed signal is lower than the frequency pattern of the wave signal transmitted, the echoed signal is judged as an outgoing motion signal;
- using an occupancy counting software program to record the incoming motion signal and the outgoing motion signal and to operate an algorithm of arithmetic calculation with respect to the human motions detected in the living space for establishing or updating a numerical value account to register occupant number;
- wherein if the echoed signal is judged as the outgoing motion signal, the numerical value account is deducted by 1;
- wherein if the echoed signal is judged as the incoming motion signal, the numerical value account is added by 1;
- wherein if the echoed signal is judged as the local random motion signal, the numerical value account remains unchanged;
- wherein a balance value or an updated numerical value of the numerical value account represents the number of occupants remaining in the living space;
- using the numerical value account following an update by a new human motion detected as a decision making parameter to activate the controller circuitry for controlling the turned on state and the turned off state of the electrical apparatus;
- wherein whenever an echoed signal is detected by the receiver at a time when the balance value of the numerical account is at zero, the controller circuitry manages to instantly add 1 to the balance value of the numerical account and simultaneously turn on the electrical apparatus;
- wherein whenever the balance value of the numerical value account or the updated numerical value of the numerical value account becomes zero, the controller circuitry operates to perform a delay shut off process to turn off the electrical apparatus after a predetermined time period;
- and
- wherein whenever the balance value of the numerical value account or the updated numerical value of the numerical value account is greater than zero, the controller circuitry turns on or continues to turn on the electrical apparatus.