Using QTR-1[AC] to detect glass standing on sensor?


I’m trying to build a smart drink tray, i.e. a tray that has several positions / spots for a glass to stand on and that will detect whether there’s a glass (which may be empty or full) is standing in a spot or not. A robot arm will then move over the glass, determine whether it’s empty or full, and fill it if it’s empty. Having the robot arm periodically “scan” the spots is not really an option because there might be a human arm there putting a glass into a spot.

I’m looking for sensors which can be built into the tray in a concealed way, underneath the spots, and which will report whether there’s something standing there or not. I’m looking for something low-price, very small, and reliable. I’ve stumbled upon the QTR-1. Would that be a good sensor for this task? I.e. will it output a different signal when completely covered than when there’s nothing in front of it?

Thanks a lot in advance,


The QTR sensors basically measure the intensity of IR light incident on a phototransistor. In an area that is well shielded from ambient IR, the IR detected by the phototransistor will be reflected emissions from the IR LED that is coupled with it, and the intensity of that IR becomes a measure of reflectance. The QTR sensors could work for your application, but how well they work will be a function of a few things:

  1. Can you limit ambient IR on the sensors when there is nothing over them? Otherwise, a bright patch of sun could produce the same signal as a glass would.
  2. How well will the glasses reflect IR?
  3. Is there room for a small gap between the sensor and the object it is trying to detect? If you push the QTR sensor right up against a surface, the light from the IR LED will be totally blocked and unable to reach the phototransistor.

Have you considered using something like our force-sensing resistors? You can set them up to produce a voltages that vary with the weight of the object on it. You could use it to tell when a glass is on it, and you could probably even tell if the glass is full or empty.

You also might consider our Sharp digital distance sensors. They are bigger than our QTRs and have a smaller minimum sensing distance, but they are mostly immune to ambient IR.

- Ben