The ones I'm most familiar with are a two-wire switch. Typically, they would provide an input to a PLC, but I've used them to switch a small relay.
Put a barrier in front of it and it will change states very quickly. The distance is adjustable. Metal is quite easy to calibrate, grain is harder to calibrate and needs to be in direct contact, and a hand - I've never had a bin full of hands, but I'm quite sure that I've tripped them with my hand.