Measure distance / volume from top of bin to top of contents....

Hi guys

I am fairly new to the world of Arduino and have been tasked with a project.

In a nutshell, the project is:

Using a sensor (or sensors) to measure the fill level of a trash bin. The idea i have is for the sensor to be in a fixed position, and when the bin is beneath the sensor, the measurement is made from the top if the bin to the top of the rubbish inside the bin.

I have been looking at ultrasonic, IR and other sensors for the task, but i am confused as to which kind of sensor could give me a reading from pointA (the top of the bin) to pointB (the top of the contents of the bin)

Any help you guys can offer would be truly appreciated.

Thank You.

If your garbage is uniformly reflective, like a wall, then an ultrasonic rangefinder would work. But it's probably not. In that case, one of the time-of-flight distancesensors might perform better.

Ultrasound indeed won't reflect too well from a random pile of garbage.

Time of flight does have the problem that you measure only one small point - so you get the level of that point, not of the container. For that you need multiple readings at multiple points.