The basic difference between these two sensors is the medium
that they use to sense the object. IR sensors use IR beams whereas ultrasonic
sensors use ultrasonic beams instead. There are some external and internal factors
that affect these results.
- External light
Since the sharp IR sensors have a
weak light filtering system, the readings show a significant difference in
bright day light and night.
As the counterpart, ultra sonic
sensor uses a sonic burst which is not affected by the light conditions. So the
reading stays as same for bright day light and night.
- Color of the surface
As a fact we know that black
surfaces absorb light and white surfaces reflect light, the same principle is
applicable for the sharp IR sensors. White surfaces reflect the IR beam and
black surfaces absorb most of the energy of the incident beam. Therefore, white
surfaces show almost accurate readings for a wider range of distances than the
black surfaces, where the accuracy persists only up to a few centimeters.
Since different colored surfaces
cannot absorb ultrasonic beam differently, readings stay same for every colored
surfaces.
- Size of the beam
Sharp IR beam angle is limited to
10 degrees and ultrasonic sensor has a 60-degree beam.
Therefore, sharp IR sensor can
exactly locate the position of the object whereas ultrasonic sensor cannot
locate the exact position of the object. But, it is better for sensing
obstacles due to the wide range.
- Nature of the surface
If objects have rough surfaces,
they can scatter the incident beam emitted by both the sensors.
- Inclined objects
If the object is not perpendicular
to the ground, then again readings will be off according to the inclination.
- External sound
If you are using ultrasonic sensor
for a robot, then motors are producing humming noises which will interfere with
ultrasonic bursts produced by the sensor. Also, surrounding noises will affect
the readings.
When using more than one
ultrasonic sensor, sound bursts from a one sensor may be identified by another
sensor as its own, due to its wider beam. This will not course much effect on
the sharp IR sensor because of its narrower beam.