Manual
Copyright © Dr Robot Inc. 2008
10
Return Value Distance to Object
<=585 80 cm or longer
585 to 3446 80 to 8 cm
>=3446 0 to 8 cm
Remarks:
The relationship between the return data and the distance is not linear. Please refer to the
sensor’s datasheet for distance-voltage curve. The data returned is the raw data of the
analog to digital converter. The output voltage of the sensor can be calculated from the
following equation:
Sensor output voltage = (ival) * 3.0 / 4095 (V)
(e.g. Sharp GP2Y0A21YK
“http://sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a_d_e.pdf”)
III.1.3. Human Sensors
25 short GetSensorHumanAlarm1 ();
26 short GetSensorHumanAlarm2 ();
Description:
GetSensorHumanAlarm returns the current human alarm data from DHM5150 Human
Motion Sensor Module. Please refer to the DHM5150 hardware manual for detailed
information.
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.










