Sonntag, 9. Dezember 2012

URS - Ultrasonic Ranging Sensor - Calibration

In order to get more familiar with the HR-SR04 ultrasonic ranging shield (URS) I tried a calibration today, also examining the maximum range. I used the same setup as during my First Experiences work except for a longer metering rule.
For the calibration I put the sensor in various distances from a 25cm wide target (standard physics book) and started recording data. The farthest point I reached was about 420cm, which is about 80 cm less than what the manufacturers manual says. Probably the reason for this is, that my target was too narrow.
I wrote a little python script for data acquisition and took 50 measurement for each position. A ROOT-based macro did the fitting job and here is what it looks like:
This plot shows the distance measured by URS against the actual position determined with the metering rule. The calibration factors now result from a simple linear fit with
$f(x) = p0 + p1 \cdot x$
The actual values are shown in the box within the diagram. As you can see, there is an offset of about 0.6 cm, which may simply grow from the fact that I have no idea where the manufacturer set the point of origin. These calibration factors must now be used within the Arduino program to improve the measurement

Keine Kommentare:

Kommentar veröffentlichen