|
1 | 1 | # SharpDistSensor
|
2 | 2 | A library for the Arduino IDE that helps interface with Sharp analog distance sensors.
|
3 | 3 |
|
4 |
| -Version 1.4.2 |
| 4 | +Version 1.5.0 |
5 | 5 | [](https://travis-ci.org/DrGFreeman/SharpDistSensor)
|
6 |
| -By Julien de la Bruère-Terreault (drgfreeman@tuta.io) |
| 6 | +By Julien de la Bruère-Terreault (drgfreeman@tuta.io) |
7 | 7 |
|
8 | 8 | ## Summary
|
9 | 9 | The analog value from the sensor is converted to distance using either a
|
@@ -59,31 +59,34 @@ Sets the range of analog values for which the polynomial or power fit is valid (
|
59 | 59 |
|
60 | 60 | ## Pre-defined sensor models
|
61 | 61 | * `GP2Y0A60SZLF_5V`: GP2Y0A60SZLF Analog Distance Sensor 10-150cm, 5V, polynomial fit.
|
62 |
| -* `GP2Y0A710K0F_5V_DS`: GP2Y0A710K0F Analog Distance Sensor 100-500cm, 5V (data sheet), polynomial fit. |
| 62 | +* `GP2Y0A41SK0F_5V_DS`: GP2Y0A41SK0F Analog Distance Sensor 3-40cm, 5V (data sheet), polynomial fit. |
63 | 63 | * `GP2Y0A51SK0F_5V_DS`: GP2Y0A51SK0F Analog Distance Sensor 2-15cm, 5V (data sheet), power fit.
|
| 64 | +* `GP2Y0A710K0F_5V_DS`: GP2Y0A710K0F Analog Distance Sensor 100-500cm, 5V (data sheet), polynomial fit. |
64 | 65 |
|
65 | 66 | #### Polynomial / Power fit coefficients:
|
66 | 67 |
|
67 | 68 | Model | Units | C0/C | C1/P | C2 | C3 | C4 | C5
|
68 | 69 | ------|-------|----|----|----|----|----|----
|
69 | 70 | **GP2Y0A60SZLF_5V** | mm | 1734 | -9.005 | 2.032E-2 | -2.251E-5 | 1.167E-8 | -2.037E-12
|
70 |
| -**GP2Y0A710K0F_5V_DS** | mm | 178506 | -1607.72 | 5.5239 | -8.47601E-3 | 4.87819E-6 | |
| 71 | +**GP2Y0A41SK0F_5V_DS** | mm | 761.9 | -8.13336 | 4.18857E-2 | -1.11338E-4 | 1.46237E-7 | -7.49656E-11 |
71 | 72 | **GP2Y0A51SK0F_5V_DS** | mm | 4.03576E+4 | -1.26093 | | | |
|
| 73 | +**GP2Y0A710K0F_5V_DS** | mm | 178506 | -1607.72 | 5.5239 | -8.47601E-3 | 4.87819E-6 | |
72 | 74 |
|
73 | 75 | #### Analog values range:
|
74 | 76 |
|
75 | 77 | Model | valMin | valMax
|
76 | 78 | ------|--------|--------
|
77 | 79 | **GP2Y0A60SZLF_5V** | 30 | 875
|
78 |
| -**GP2Y0A710K0F_5V_DS** | 284 | 507 |
| 80 | +**GP2Y0A41SK0F_5V_DS** | 61 | 614 |
79 | 81 | **GP2Y0A51SK0F_5V_DS** | 70 | 500
|
80 |
| - |
| 82 | +**GP2Y0A710K0F_5V_DS** | 284 | 507 |
81 | 83 |
|
82 | 84 | **Important Note:** The analog voltage returned by the sensor is largely dependent of the reflected object size and reflectivity. The distance returned by these pre-defined calibration functions can therefore vary significantly from the real distance depending on the object detected. Where accuracy is required by the application, it is recommended to perform calibration with the object to be detected and use custom calibration fit functions instead.
|
83 | 85 |
|
84 | 86 | This library has been designed so that it is easy to add sensor models. Contributions are therefore welcome. Adding models to the library can be done by either submitting a pull request or providing me the proposed fit function and associated calibration data by email so I can add it myself. Thank you for contributing!
|
85 | 87 |
|
86 | 88 | ## Version history
|
| 89 | +* 1.5.0 (2018-10-22): Added GP2Y0A41SK0F_5V_DS model. |
87 | 90 | * 1.4.2 (2018-09-23): Improved comments in SharpDistSensorArray example.
|
88 | 91 | * 1.4.1 (2018-08-07): Updated MedianFilter to latest version from [daPhoosa/MedianFilter](https://github.com/daPhoosa/MedianFilter).
|
89 | 92 | * 1.4.0 (2018-05-21): Added GP2Y0A51SK0F_5V_DS model.
|
|
0 commit comments