Cytron received an inquiry from our precious customer today. The question is about measuring water level using Analog Distance Sensor (SN-GP2Y0A21). He (i think is a ‘he’) asked whether the infrared beam will penetrate the water, or instead, reflect by the water surface. That’s an interesting question which has never come over my mind. So I decided to conduct a quick experiment after my lunch.
This is the hardware settings. I’m running the test in our pantry. You can see the water dispensers at the two sides of the photos and that’s my water bottle with IFC cards standing next to it. I’m using IFC-MB00 (main board), CP04 (for analog display), AI08 (to read analog value from the sensor) and EB02 (frankly speaking, it’s for the sensor to reach the opening of the bottle). Analog Distance Sensor is hanging at the opening of the bottle.
For the software part, I download the sample code provided in IFC-AI08 product page, include some necessary files required by IFC system and that’s it!
Photos are snapped while adding filtered drinking water to the bottle. The photos below show the analog reading and the water level of the bottle. Yes, it can detect the water level! The values show that the sensitivity is not high because the sensor’s detecting distance is ranged from 10cm to 80cm and I didn’t rescale the analog value in this experiment.