Range Sensor for Dirty garbage bins

Use a lid like on a garden incinerator and house the sensor in the top to keep it out of the way of the rubbish.

Like this one