I know this comment is a year old, but I can tell you how it's done. There's an arduino hidden somewhere on the dustbin. On the front of the dustbin, there's an ultrasonic sensor poking through (the two silver things). The sensor works by sending out sound waves through one of the silver things and receiving them on the other. Then the arduino tells the servo motor (the blue thing that opens and closes the lid) to open the lid when it senses an object with the ultrasonic sensor. Then after a few seconds, the lid closes again.