Interface IR Distance Sensor With PIC


  • Infrared sensors find numerous applications in electronic systems.
  • IR sensor has two parts, IR transmitter, and receiver.
  • The IR receiver detects the IR radiations transmitted by an IR LED.
  • The output voltage level of the IR sensor depends upon the intensity of IR rays received by the receiver.
  • The sensor’s output in its original analog form.
  • The output of the IR sensor is processing through ADC.
  • The ADC is calibrated to get almost accurate distance measurement.


  • Weather Monitoring System.
  • Manufacturing Industry.

Hardware Required

  • IR Sensor.
  • PIC16f877a MicroController.

Pin Diagram

  • VCC: +5v.
  • Output: Analog Output.
  • GND: GND.