phyphox Forums
Arduino APDS9960 Proximity sensor - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: Experiments and Ideas (https://phyphox.org/forums/forumdisplay.php?fid=4)
+--- Thread: Arduino APDS9960 Proximity sensor (/showthread.php?tid=1733)



Arduino APDS9960 Proximity sensor - BrunoD - 04-16-2023

Hi,

I first posted in the wrong section, I hope this is the good one.

Did someone tried to use the proximity feature of the Arduino nano 33 BLE Sense ? (or any similar model)
Link about this library

Bruno


RE: Arduino APDS9960 Proximity sensor - BrunoD - 04-16-2023

Well, I eventually tried something... It uses the APDS9960 chip of the Arduino Nano 33BLE Sense. And it seems to work fine Big Grin
I'll soon build a phyphox file to use it with all the others sensors of the Nano card.
Bruno


RE: Arduino APDS9960 Proximity sensor - Jens Noriʇzsɔɥ - 04-17-2023

Hi Bruno,

I could easily move threads if necessary. So –technically– no need to delete and recreate… Smile

I am not sure if we have been aware that there is a proximity sensor on this board. Sounds interesting: “The gestures readings are based on the detection of the movement of the hand over four photodiodes inside the sensor, while proximity is read by the amount of infrared light reflected by something (anything that reflects IR) back to the sensor. Color is given as a 16-bit value for R, G, B and white components; if the light that hits the sensor is the ambient one and not a reflection on some object, it is possible to calculate the color temperature, otherwise it is possible to detect the color of the object that is reflecting light onto the sensor.”


RE: Arduino APDS9960 Proximity sensor - Dominik Dorsel - 04-17-2023

Hey,

sorry, I never used this sensor. The sensor features a light sensor aswell. This could be used for some polarisation- or light vs distance-experiments. Hasn't someone already done a polarisation experiment with this sensor?


RE: Arduino APDS9960 Proximity sensor - Jens Noriʇzsɔɥ - 04-17-2023

Mikhail (“solid”) has gone to quite some length on Malus' Law, however, with SensorTags: https://phyphox.org/forums/showthread.php?tid=1221


RE: Arduino APDS9960 Proximity sensor - fbouquet - 04-17-2023

Hello,

I did not realized that the proximity sensor was the same hardware than the light sensor... I wonder if a calibration could give some result in cm instead of just a number between 0 and 255?

I haven't tested the proximity feature (sorry BrunoD), but I have tested the light sensor. It works straightforwardly and gives the light intensity as well as the three channel components values (R, G, B). I expect Solid's SensorTag setup to work equally well with an arduino nano. I did test the light sensor by measuring the quantity of light going through sheets of plastic, and could model the results with the BeerLambert law (https://arxiv.org/abs/2107.10531).

Cheers,

Fred


RE: Arduino APDS9960 Proximity sensor - BrunoD - 04-17-2023

(04-17-2023, 03:26 PM)Jens Noritzsch Wrote: Hi Bruno,
I could easily move threads if necessary. So –technically– no need to delete and recreate… Smile

Hi, sorry I didn't pay attention.

(04-17-2023, 03:26 PM)Jens Noritzsch Wrote: I am not sure if we have been aware that there is a proximity sensor on this board. Sounds interesting: “The gestures readings are based on the detection of the movement of the hand over four photodiodes inside the sensor, while proximity is read by the amount of infrared light reflected by something (anything that reflects IR) back to the sensor. Color is given as a 16-bit value for R, G, B and white components; if the light that hits the sensor is the ambient one and not a reflection on some object, it is possible to calculate the color temperature, otherwise it is possible to detect the color of the object that is reflecting light onto the sensor.”

What I understand is that it may work as a color detector, maybe using the onboard LEDs to get it.
However, when using the color graph, I noticed that the red component is always higher than the other ones. Maybe something to calibrate 1st ?

(04-17-2023, 05:22 PM)fbouquet Wrote: Hello,

I did not realized that the proximity sensor was the same hardware than the light sensor... I wonder if a calibration could give some result in cm instead of just a number between 0 and 255?

I haven't tested the proximity feature (sorry BrunoD), but I have tested the light sensor. It works straightforwardly and gives the light intensity as well as the three channel components values (R, G, B). I expect Solid's  SensorTag setup to work equally well with an arduino nano. I did test the light sensor by measuring the quantity of light going through sheets of plastic, and could model the results with the BeerLambert law (https://arxiv.org/abs/2107.10531).

Cheers,

Fred

Hi,

I was wondering if it had to be a different phyphox file, or everything on the same. At first, I made a different experiment file.
I'll try to find out for the conversion form 0-255 to cm, but it doesn't seem to be linear ; for example, you get a proximity = 0 whereas you're not at 0 cm.
What's best ? A formula in the phyphox file, or let the arduino make the conversion (with maps) and add a new data in the BLE connexion between the card and phyphox ?

For the light sensor, there must be a way to calibrate it. It can be done for others experiments (sound level meter), so why not ?

And by the way, I added icons for the experiments you've made, thanks again : for the experiments, and the answers from both of you !  Wink .
I will also remove the "z datas" (like "zPrecision=..." or "scaleMinZ=..."), I know it's a detail...

Bruno