The MCP3002 seems to work better with high resistance inputs. Either should work fine with Sharp sensor. I added a SOIC MCP3208 to my Project Board's surface mount area.
IR sensors are fine for proximity and especially great if you work in specific ranges -- like between 2 and 2.5", or from 3 to 4", and so on. You can determine these empirically using a ruler and the Serial Terminal. The Sharp sensors were designed with the idea that ranges would be preset, such as with an analog comparator and potentiometer. They were never really intended to be used as distance measuring devices, per se. The PSD sensor inside them is not linear, so any linearity you may require must be done in software. The most common method is a simple look-up table.
The idea behind using both is surfaces that exhibit poor reflection of one type of sensor is (hopefully) more visible to the other. A good example is a dark sock. That's hard to see on an IR sensor, because the cloth absorbs infrared. But your Ping should pick it up. That'll help keep your robot from running into your ankles!
If you're doing this in a Wild Thumper, when you're done consider posting your project to the Let's Make Robots forum. User "OddBot" (real name Russell Cameron) designed this base for the company he works for in China (he's Australian). Russell is a terrific guy. I wish he had time to hang out here.
Comments
http://www.parallax.com/catalog/components/integrated-circuits
And if it's for your Wild Thumper., The Activity Board and the PropBOE both have ADC's on board as Gordon is referring to.
MCP3002 (10-bit 2 channel)
and
MCP3208 (12-bit 8 channel)
The MCP3002 seems to work better with high resistance inputs. Either should work fine with Sharp sensor. I added a SOIC MCP3208 to my Project Board's surface mount area.
In that case, and if you don't want to rewrite code, perhaps one consideration is to use the same ADC that they put on the Prop BOE.
If you've never used one of these Sharp sensors before, take heed that their output is not linear. There are ways to compensate if you need accuracy.
The idea behind using both is surfaces that exhibit poor reflection of one type of sensor is (hopefully) more visible to the other. A good example is a dark sock. That's hard to see on an IR sensor, because the cloth absorbs infrared. But your Ping should pick it up. That'll help keep your robot from running into your ankles!
If you're doing this in a Wild Thumper, when you're done consider posting your project to the Let's Make Robots forum. User "OddBot" (real name Russell Cameron) designed this base for the company he works for in China (he's Australian). Russell is a terrific guy. I wish he had time to hang out here.