> >Yeah, it _is_ white, after all. :-) > > I was going to add that to the line, but it seemed a bit much after > mentioning "red spot" and "quite reflective". Quite reflective, yes. But you don't know the geometry of the froth ahead of time. The froth I am used to has peaks and valleys. Could the dot get lost among these? How does the shape of the foam change how the light is reflected? (is milk froth highly specular? lambertian?). Does this force you to use a larger spot? Does "cold" foam have signficantly different reflectance properties than "hot" foam (bubble size, etc). Does ambient light present a problem? How can you guarantee that the sensor is aligned properly to see a dot? Do you use an array of sensors? A larger sensor? Maybe you project a stripe instead of a spot? How fast does the froth level change? How long do you need to see a spot before you signal the machine to stop frothing? A quick change in froth level might put the spot past the sensor. Larger detection area? More than one sensor? Does the froth create steam that will attenuate the light? What if the steam condenses on the emitter or sensor? In my original message I was just trying to say that it involved more than simple geometry. -Steve -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.