wvmarle:
I'm used to garbage workers opening the container before it's tipped, to keep the lid out of the way of the falling rubbish... also I'm used to seeing that kind of containers being cleaned on a somewhat regular basis (just by hosing them down). So whatever sensor you use it'd have to be really robust!That said, the ones at the waste collection point across the street from me are usually kept open anyway. Just as easy. Waste is there for no longer than a day (except Chinese New Year when garbage collection stops for a day) so it doesn't have the time to start rotting too much.
That happens here sometimes as well, though the norm is to just leave them closed when it's picked up. The containers are cleaned regularly with a strong water hose, so that's why I need this to be an IP67 product. It depends on the location how long the waste is inside of them; it can range for one day to up to 2 weeks.
Grumpy_Mike:
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.
Unfortunately, I want to design something that goes on your typical dumpster bin, like this:

so I have no control over the type of lid on them.
INTP:
No moving parts? I think you're going to have to find a sensor that penetrates the thin layer of garbage but detect the actual garbage. IR might get through.
You mean like the Sharp IR products? The issue I see however is that the composition of the waste material is highly variable, so it would be difficult to account for this and ignore it in the measurements.
Daz1712:
Although ment to work in water how about the transducer from a fishfinder?
Not up to date on exactly how they work but it is sonar which is sound waves sent through water.
Wont be as efficient but you are using it in a small enclosed area so it might work through the air instead.
Would these actually be successful in ignoring materials other than water though? I don't really have an issue with water for my ultrasonic sensors as it will just fall off or evaporate.
TolpuddleSartre:
Why not use a car parking sonar sensor?
They are designed for harsh environments.
I've looking at that as well, but the car parking transducers I find usually are pretty much identical the ones found in for example the JSN-SR04T, or the MaxBotix Sensors. So I'm expecting to see a pretty similar behaviour from them with regards to the contamination of the transducer.
Also on a more general note, here's an example of what my ultrasonic sensor may typically look like after a couple of weeks:

The red smudge on it was sufficient to block out the measurements completely.