2024-01-10 02:13 AM - last edited on 2024-01-10 03:58 AM by Peter BENSCH
When I place an object near the sensor, it shows the reading between 40 - 50mm. How to perform the calibration of this sensor to accumulate accurate reading from the sensor. I have attached the code that I have uploaded.
Solved! Go to Solution.
2024-02-16 12:57 PM
I don't see the code for some reason, but let's do an overview of the calibration process.
There are two calibrations. Offset and Crosstalk.
if you don't have a coverglass, you can skip the crosstalk - you don't have any.
You can also buy a crosstalk free coverglass from www.hornix.com.tw and skip the crosstalk.
Do the offset first. There is a function call that takes as an argument the correct distance.
Place a bright, flat target at a close distance. 14cm would be good. White paper makes a good target as well.
the sensor will range a lot, average the result and then apply that offset on every range.
Next do the crosstalk - which is a little less defined.
You must find that point where the sensor under-ranges by 10 or 20%. This is an experimental result.
You will find using a dark gray will allow you to use a nearer distance. Keep in mind that the target diameter must be at least half the distance you are using.
The sensor has no persistent memory. So after calibrating extract the cal data for next time. Store it in your device, and load it on rebooting the chip.
- john
2024-02-16 12:57 PM
I don't see the code for some reason, but let's do an overview of the calibration process.
There are two calibrations. Offset and Crosstalk.
if you don't have a coverglass, you can skip the crosstalk - you don't have any.
You can also buy a crosstalk free coverglass from www.hornix.com.tw and skip the crosstalk.
Do the offset first. There is a function call that takes as an argument the correct distance.
Place a bright, flat target at a close distance. 14cm would be good. White paper makes a good target as well.
the sensor will range a lot, average the result and then apply that offset on every range.
Next do the crosstalk - which is a little less defined.
You must find that point where the sensor under-ranges by 10 or 20%. This is an experimental result.
You will find using a dark gray will allow you to use a nearer distance. Keep in mind that the target diameter must be at least half the distance you are using.
The sensor has no persistent memory. So after calibrating extract the cal data for next time. Store it in your device, and load it on rebooting the chip.
- john