Author: Jim Toal, Vishay Intertechnology
I tweaked my back the other day and had to sleep on the floor for a few nights. I was rudely awoken the first night by my robotic vacuum. It was not only the noise, though it is very quiet, but the fact that it kept trying to find a way around me. It would bump into me, back up, move left or right a few inches, and then take another stab at getting past me. I was not part of the normal floor plan. Robotic vacuum cleaners use either optical sensors or cameras to navigate around a room. Camera based vacuums wouldn’t have bumped into me but they would have taken a big chunk out of my wallet. Optical sensor based vacuums depend on contact between the bumper on the vacuum and an object like a table leg or me in this case.
There is a gap between the bumper and the body of the vacuum. Imagine that there is a ring of light in that gap. When the bumper hits the table leg, the ring of light is broken because the bumper collapses just enough to block the light. “No light” translates to an object being hit. The vacuum stops, turns at an angle and goes straight again trying to find its way clear. That ring of light is created using discrete infrared emitters and photo detectors, reflective sensors, or integrated light-to-digital sensors, for example the VCNL36687S VCSEL-based proximity sensor.
Discrete infrared emitters and detectors could be used in several possible configurations. A single high-powered emitter could be coupled to a flexible light pipe with a photodiode at the other end of the light pipe. This would be similar to a fiber optic cable but in this case bumping into an object pinches the flexible light pipe causing the light to be interrupted. A second configuration would require breaking the continuous bumper into smaller subsections. Each subsection would have an infrared emitter pointed at a phototransistor that is parallel to the outer ring. When the subsection of the bumper hits an object, it deflects inward and breaks the beam of light, again causing a “no light” situation. Vishay refers to this configuration as transmissive sensing. In both these cases the output of the photo detector is a current, likely amplified, and converted and interpreted by a microcontroller.
Cliffs are always a huge concern for robot vacuums. If you have stairs leading down, you have what essentially is a cliff. Robots don’t do well when they fall down stairs; it’s to be avoided. In this case a light-to-digital proximity sensor is used, pointing down at an angle towards the floor, and located on the leading edge of the vacuum. Such a proximity sensor integrates an infrared emitter, photodiode, and signal processing circuits in a single package. The output of a sensor such as Vishay’s VCNL36687S is a digital count from 0 to 4095 as it has a 12-bit resolution. When moving along the floor, the light from the emitter reflects the wood, tile, or carpeted surface onto the photodiode and a ‘high’ count is read by the sensor and passed on the by the microcontroller via I2C. When that count drops to zero, there is no floor and the robot has got to stop. To ease the load on the robot, rather than constant polling of the value, the sensor can react to its own set thresholds and pass this information on to the microcontroller via a simple HIGH/LOW pin ( Interrupt pin). The sensor system has to be smart enough to know the difference between the transition from a reflective surface to a cliff, and from a reflective surface like wood to dark, shag carpet which can swallow infrared light. That’s the difference between stop and go.
One of the most important features of a robot vacuum is to know how far the vacuum has traveled. This too uses an optical sensor, a transmissive sensor or slotted interrupter that has an infrared emitter directing light to a phototransistor across a gap through which a code wheel passes. In this case the transmissive sensor is a single package versus the discrete components mentioned above. The code wheel is attached to the axle driving the wheels and interrupts the infrared light reaching the phototransistor. Together they are called an optical encoder. Using a 3-channel transmissive sensor like the TCUT1630X01 allows the robot to keep track of distance traveled, forward and reverse direction, and, if necessary, number of revolutions.
I’m just grateful all these sensors use 940 nm infrared light. If it was visible light there is no way I would get any sleep.