User manual

Copyright © Dr Robot Inc. 2005
34
Syntax: ival = GetSensorHumanAlarm1(); //1
st
human alarm
ival = GetSensorHumanAlarm2 (); // 2
nd
human alarm
Parameter: void
Return value: short ival;
Return data interpretation:
The return data is the raw value of the analog to digital converter indicating the amplified (x
5 times) output voltage of the sensor device. The data range is between 0 and 4095. When
there is no human present, the module output voltage is about 1.5 V and return value is
about 2047.
Remarks:
To detect human presence, the application should compare the difference of two samples
(to detect the change from “absence” to “presence”), and also compare the sample data to a
user defined threshold (to determine whether to report an alarm or not). The threshold
determines the sensitivity of sensor. The higher the threshold is the lower the sensitivity
will be.
27 short GetSensorHumanMotion1 ();
28 short GetSensorHumanMotion2 ();
Description:
GetSensorHumanMotion returns the current human motion value from DHM5150 Human
Motion Sensor Module. Please refer to the Chapter IV.VIII DHM5150 (Page 106) for
detailed information.
Syntax: ival = GetSensorHumanMotion1 (); // Human direction data #1
ival = GetSensorHumanMotion2 (); // Human direction data #2
Parameter: void
Return value: short ival;
Return data interpretation:
The return data is the un-amplified raw value of the analog to digital converter indicating
the output voltage of the sensor device. The data range is between 0 and 4095.
Remarks:
To detect human motion direction, the application should compare the difference of two
samples of each sensor modules output (to detect the change fromabsence to
“presence”), and then compare the sample data of the two sensor modules. For a single
source of human motion, the different patterns of the two sensor modules manifest the
directions of the motion. The relationship can be obtained from the experiments.
III.1.4 Tilt and Acceleration Sensor