Robodave   Robots   Projects   Controllers   Circuits   Sensors   Motors   Tools   Links   Email me  
     Sensors      Last Modified: March 15, 2001   


Robot Sensors

Bumper Switches

SwitchSwitchs are probably the simplest sensor to use on a robot. They can detect collisions, limit travel, even detect dropoffs. Their use is almost a requirement to backup other sensors that may fail. Putting them together just involves bolting them down and providing enough of a lever to actuate them easily. Builders have added length to the lever already there or even placed a balanced ring around several for a circular bumper around the robot. Drop detectors would have feelers beneath the robot sliding across the floor. Very simple operation which allows for reliable detection, what every robot needs.


CdS Cells

SwitchAnother simple sensor for robots uses the light sensitivity of Cadium Sulfide or CdS cells. These change resistance based on the intensity of light shining on them. In the dark, they can be in the 100s or more of kohms. In light, they can be less than 1k. Their use would be in a resistive divider between 5 volts and ground, either as the top or bottom with the output between the CdS cell and the current limiting resistor. This would provide a highly variable analog signal to a controller, which could cause irregular switching. If the controller supports it, an analog input could be used to read these, or if not, an analog to digital converter (ADC) or a comparator could make the input more usable. These work well for finding light and dark areas or in line detection in line following robots.



goto Top  
Infra Red Sensors

InfraRed circuitInfraRed sensor circuits have many varieties. The simplest uses an IR LED to deliver the light and an IR sensitive phototransistor to see it. The phototransistor turns on when IR light hits it, whether from the LED or ambient sources or reflected. The circuit shown should deliver an output if any IR light shines on it. Typical values for the resistor going to the phototransistor collector would be around 10K ohms or so. LEDs are usually driven through 200 to 1K ohm resistors. When no IR light is can be seen by the detector, you should see a good high (5 volt) from the output connected to the collector. When IR light is present, the phototransistor should conduct and you should see a good low, probably around 0.7 volts. One simple use might involve line detection, with sensors on either side and on a line to be followed by the robot.

More sophisticated IR usage involves pulsing IR light at a known frequency, and using a detector that is attuned to that frequency. The circuitry within the Sharp GP1U58Y series tunes the detector to a specific frequency. Each is sensitive to IR that has been pulsed at that given frequency in short bursts. This encoding of the IR helps to mask out external sources that might have been in the way of information we really want, specifically how close something is or the recieving of coded data. What is needed for proximity detection is an IR source that outputs light at the specified frequency and on time for that freqency to match the detectors reception charecteristics. Various circuits work, from 555 timers that drive the IR LEDs to simply hooking them to lines from your controller and programming in the appropriate driving sequence. My use has been with Dennis Clarks IR proximity detector, based on the DPRG IR proximity detector by Jeff Koenig. This circuit uses a PIC to generate the appropriate frequency and pulsing for left and right IRs, counts the number of detections for each side and finally outputs a good dectection for either the left or right side. Doing this all on a seperate processor frees up the controller for other tasks in driving a robot. It can use the Sharp detector, a Radio Shack LiteOn detector, or a Panasonic PNA4601M series. I've used both the Sharp and the Panasonic PNA4602M. The board provides excellent right and left detections, and is only confused in rooms with high flourescent lighting. In these I plan to try the little trick of using a small strip of exposed film or perhaps some of the red plastic for remotes in front of the detector to hopefully shield some of the flourescent "noise" that overloads it.

InfraRed circuit More advanced infrared sensors come in "all in one" packages, such as the Sharps GP2Dxx series. These sensors can provide range information, in either analog or digital form, or simply be a trigger point when something is within an adjustable range. The GP2D02 gives an 8 bit digital reading when triggered. GP2D05s give an high or low signal when a specific preset range is reached. GP2D12s output an analog voltage corresponding to range continuously. GP2D15s output a high or low when crossing a 9.5" distance. All typically have detection capabilities from 4" to 31" and cost anywhere from $13 to $25, depending on capabilities.

InfraRed circuit IRLED phototransistor pairs can be used for encoders. Either a reflective pair which can count strips on a wheel or a slotted type to count slits in a wheel are possible. Several different types exist, usually in the form of quadrature encoders. Quadrature encoders use 2 pairs of sensors which are placed out of sequence with each other to allow knowing the direction a motor is turning, as well as how far or fast it is going. Some people have even hacked these from inside computer mice.

One further advanced use of IR is in it's basic use in remote control. Again appropriate sequencing is needed, but information can be transmitted and received, just as you turn on and off your TV. Dennis Clark has again put this to use in an encoder/decoder pair of PICs for transmitting and receiving information. Other web pages discuss the coding sequences on regular TV remotes and provide some information as to the sequences involved. I haven't used this yet, but can see it as a great way to start your robot remotely or drive it or possibly have a data link between the robot and a computer.



goto Top  
Sonar

TransducersSonar provides another method of telling your robot where things are. The Polaroid Sonar rangers have been good at providing the distance to an object through pinging a transducer and waiting for a return echo. Your controller times the period between the initial pulse and the return echo. And through a quick calculation you've got the distance to whatever the sound bounced from, based on sound traveling about 1 inch in 74 microseconds. The Polaroid modules can range from about 6 inches to 35 feet. Some folks have used modules taken from cameras and hacked for providing a signal. This allows a cheaper solution than buying a full Polaroid development kit for $40 to $70. Some sonar cameras can be had for as little as $5 through thrift stores and only require a few additional cheap parts to work.

Transducers One new alternative is the sonar module put together by Devantech. The Devantech modules range is about 1 inch to 10 feet and the price is about $25. The interface is relatively simple for most controllers.


Other Sensors

sensorMany other sensors exist to help your robot see where it's at or what the conditions are around it. Microphones allow the robot to detect noise or movement nearby. Force sensing resistors or FSRs can tell how much some part of the robot is bending or the amount of pressure on that part. These can cost $5 on into the $100s. Temperature and humidity sensors can tell the area conditions a robot is in or even problems with internal components. These also can range from a few dollars to the $100s. Accelerometer chips exist that output a PWM signal based on how much changing force they sense. These could be used to tell if the robot is on an incline or tipped over or if it bumped into something. These chips are around $20. Piezo gyroscopes simply detect changes in orientation. Gyros for model helicopters run from $50 on up. Electronic compasses detect changes of orientation to a magnetic field, whether it's the Earths' or that generated by a magnetic device nearby. These can cost from $20 to $100. Global Position Satellite receivers (GPS) can provide relative positioning information. GPS can be $50 on to several hundred. Laser rangefinders provide distance information. One final sensor that many relate to is vision. Many types of camera and video sensors exist that could be used to allow the robot to see. Simple detector chips from Gameboy cameras have been interfaced with advanced controllers to see lines and guide a robot. Web cams such as the quickcam have also been used. Getting the robot to recognize what it is seeing is the main problem. Edge detection algorithms are used to provide a guideline for the robot to trigger a response. Use of 2 cameras could provide distance information through triangulation of edge data. Vision processing does require substantial processing capabilities, simply due to the amount of data presented. Many sensors exist, just getting them to work for the robot is the real challenge.



goto Top