Skip to the content
2 layers29.5 × 15.5 mmIr sensor, the printed circuit board in 3D

This repository contains the complete KiCad PCB design files for an Infrared (IR) Proximity / Obstacle Sensor Module built around the LM358 dual operational amplifier.

Size
29.5 × 15.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
7
Pads
26
Tracks, vias
63, 2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
22 Mar 2026
Updated
22 Mar 2026

Overview

Ir sensor is an open-source printed circuit board by VINAY-0119, from the VINAY-0119/IR-Sensor-PCB-designing repository on GitHub. It is a 2-layer board of 29.5 × 15.5 mm with 9 parts on 7 nets, routed with 63 tracks and 2 vias.

It is built around the LM358. Its parts include 3 resistors, 3 diodes, 1 IC and 1 connector. It belongs with the sensors and measurement boards of this library.

Main components

1

README

README.md

IR Sensor Module — KiCad PCB Design

Manufacturer: Vinay Industries  |  IC: LM358 Dual Op-Amp  |  Tool: KiCad EDA  |  Version: 1.0

KiCad License PCB [blocked] Voltage [blocked]


📌 Table of Contents


📖 Overview

This repository contains the complete KiCad PCB design files for an Infrared (IR) Proximity / Obstacle Sensor Module built around the LM358 dual operational amplifier. The circuit uses an IR LED emitter and IR photodiode receiver pair with a comparator stage to detect objects and output a clean digital signal.

A blue trimmer potentiometer (RV1) allows real-time sensitivity and detection range adjustment without any code changes.

✅ Key Features

FeatureDetail
Supply Voltage5V DC
Output TypeDigital (HIGH / LOW)
Sensitivity ControlOnboard trimmer potentiometer (RV1)
Status IndicatorOnboard LED (D3) lights when object detected
MCU CompatibilityArduino, ESP32, STM32, Raspberry Pi
ICLM358 Dual Op-Amp (DIP-8)
PCB LayersSingle-layer (F.Cu)
Design ToolKiCad EDA

🖼 Design Previews

PCB Layout — KiCad PCB Editor

PCB Layout

Copper trace routing, component placement, silkscreen labels, and board outline as seen in KiCad PCB Editor. Components visible: D1, D2 (IR LEDs), R1–R3 (resistors), RV1 (trimmer), LM358 (DIP-8), D3 (status LED), J1 (3-pin header).


Schematic — KiCad Schematic Editor

Schematic

Full circuit schematic showing the LM358 comparator, IR emitter/receiver voltage divider, sensitivity trimmer (RV1), and digital output stage with status LED (D3) and 3-pin connector (J1).


3D Board Render

3D Render

KiCad 3D render of the assembled PCB. Visible: white IR emitter (D1), black IR photodiode (D2), blue trimmer potentiometer (RV1), LM358 DIP-8 IC, SMD status LED (D3), and 3-pin output header (J1) labeled VCC / GND / DATA.


⚡ Circuit Description

text
VCC (+5V)
  │
  ├──► D1 (IR LED Emitter) ──► R1 (100Ω) ──────────────────► GND   [IR Transmission]
  │
  ├──► D2 (IR Photodiode) + R2 (10kΩ divider) ─────────────► LM358 Non-Inverting (+)
  │                                                            [Received IR voltage]
  ├──► RV1 (10kΩ Trimmer) ──────────────────────────────────► LM358 Inverting (−)
  │                                                            [Threshold adjustment]
  │
  └──► LM358 Output ──► R3 (330Ω) ──► D3 (Status LED) ──────► DATA Pin (J1 Pin 3)

How It Works

  1. IR Emitter (D1): Continuously emits infrared light; current limited by R1 (100Ω).
  2. IR Receiver (D2): Photodiode paired with R2 (10kΩ) forms a voltage divider. Output voltage rises when reflected IR light is detected from a nearby object.
  3. LM358 Comparator: The op-amp compares two voltages:
    • Non-inverting (+): Photodiode output voltage (rises with reflected IR)
    • Inverting (−): Threshold voltage set by trimmer RV1
    • Output: HIGH when object detected, LOW when no object
  4. Output Stage: When output is HIGH, current flows through R3 (330Ω) and lights status LED D3. The DATA pin simultaneously outputs HIGH for the MCU to read.
  5. Sensitivity Adjust (RV1): Rotating the blue trimmer adjusts the comparator threshold and detection range.

🧾 Bill of Materials

RefComponentValuePackageDescription
D1IR LED Emitter—5mm Through-holeInfrared emitter (white body)
D2IR Photodiode—5mm Through-holeInfrared receiver (black body)
D3Status LED—SMDObject detection indicator
R1Resistor100ΩThrough-holeIR LED current limiter
R2Resistor10kΩThrough-holePhotodiode voltage divider
R3Resistor330ΩThrough-holeOutput LED current limiter
RV1Trimmer Pot10kΩTop-adjust blueSensitivity / threshold adjustment
U1LM358—DIP-8Dual operational amplifier
J1Pin Header3-pin2.54mm pitchVCC / GND / DATA output connector

📌 Connector Pinout — J1

text
      J1 — 3-Pin Header (2.54mm pitch)
  ┌─────┬──────────┬────────────────────────────────────┐
  │ Pin │  Label   │ Description                        │
  ├─────┼──────────┼────────────────────────────────────┤
  │  1  │   VCC    │ Power supply input (+5V DC)        │
  │  2  │   GND    │ Ground                             │
  │  3  │  DATA    │ Digital output (HIGH = detected)   │
  └─────┴──────────┴────────────────────────────────────┘

⚠️ Always verify polarity before connecting power. Reverse polarity may damage the IC.


📐 PCB Specifications

ParameterValue
Board Dimensions~75mm × 28mm
PCB Layers1 (Single-sided — F.Cu)
Surface FinishHASL
PCB Thickness1.6mm
Min Track Width0.25mm
Min Clearance0.2mm
SilkscreenFront side (labels + Vinay Industries branding)
IC PackageDIP-8 through-hole
LED Package5mm through-hole (D1, D2) + SMD (D3)

📁 Project Structure

text
IR-Sensor-Module/
├── README.md                        ← This file
├── images/
│   ├── pcb_layout.png               ← PCB layout screenshot
│   ├── schematic.png                ← Schematic screenshot
│   └── 3d_render.png                ← 3D board render
├── IR_Sensor.kicad_pro              ← KiCad project file
├── IR_Sensor.kicad_sch              ← Schematic
├── IR_Sensor.kicad_pcb              ← PCB layout
├── fp-lib-table                     ← Footprint library table
├── sym-lib-table                    ← Symbol library table
├── gerbers/                         ← Gerber files for manufacturing
│   ├── IR_Sensor-F_Cu.gbr
│   ├── IR_Sensor-F_Silkscreen.gbr
│   ├── IR_Sensor-F_Mask.gbr
│   ├── IR_Sensor-Edge_Cuts.gbr
│   └── IR_Sensor-PTH.drl
└── bom/
    └── BOM.csv

🚀 Getting Started with KiCad

Prerequisites: KiCad 7.x or later

bash
# Clone the repository
git clone https://github.com/vinay-industries/ir-sensor-module.git
cd ir-sensor-module

In KiCad:

  • File → Open Project → select IR_Sensor.kicad_pro
  • Open Schematic Editor to view/edit the circuit diagram
  • Open PCB Editor to view/edit the board layout
  • In PCB Editor → View → 3D Viewer to inspect the 3D model

🏭 Gerber Export for Manufacturing

In KiCad PCB Editor:

text
File → Fabrication Outputs → Gerbers (.gbr)
LayerPurpose
F.CuFront copper traces
F.SilkscreenComponent labels
F.MaskSolder mask
Edge.CutsBoard outline
PTH DrillDrill holes

Zip the /gerbers folder and upload to your PCB manufacturer:


🔌 Arduino / Microcontroller Integration

Wiring

text
IR Sensor Module          Arduino Uno
─────────────────         ───────────
     VCC     ──────────►  5V
     GND     ──────────►  GND
     DATA    ──────────►  D7

Example Sketch

cpp
#define IR_SENSOR_PIN 7

void setup() {
  pinMode(IR_SENSOR_PIN, INPUT);
  Serial.begin(9600);
  Serial.println("IR Sensor Module Ready — Vinay Industries");
}

void loop() {
  int state = digitalRead(IR_SENSOR_PIN);

  if (state == HIGH) {
    Serial.println("Object Detected!");
  } else {
    Serial.println("No Object.");
  }

  delay(100);
}

🎛 Sensitivity Calibration

  1. Power the module with +5V DC via J1 (VCC and GND pins).
  2. Place a target object at your desired detection distance.
  3. Using a small flathead screwdriver, slowly rotate the blue trimmer (RV1):
    • Clockwise → Increases sensitivity (longer detection range)
    • Counter-clockwise → Decreases sensitivity (shorter range)
  4. Stop when Status LED D3 just turns ON — calibration is complete.

💡 Tip: Recalibrate when changing target surface color or ambient lighting conditions.


⚠️ Important Notes

  • Digital output only — no analog voltage is provided on the DATA pin.
  • Detection range: Typically 2 cm – 30 cm depending on surface reflectivity.
  • Dark/black surfaces absorb IR and significantly reduce effective range.
  • Avoid direct sunlight — ambient IR can cause false positive detections.
  • LM358 output is not rail-to-rail; LOW output may not reach exactly 0V.
  • Verify connector polarity (VCC/GND/DATA) before applying power.

📜 License

This project is licensed under the MIT License — see the LICENSE file for details. Free to use, modify, and manufacture for personal or commercial purposes with attribution.


Vinay Industries — KiCad PCB Design | Embedded Electronics

Designed with ❤️ using KiCad EDA

Manufacturer: Vinay Industries  |  IC: LM358 Dual Op-Amp  |  Tool: KiCad EDA  |  Version: 1.0

KiCad License PCB [blocked] Voltage [blocked]


Parts

9
QtyValueFootprintReferences
1100RResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR1
110KResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR2
110KPotentiometer_THT:Potentiometer_Bourns_3266Y_VerticalRV1
1330Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR3
1Conn_01x03_PinConnector_PinHeader_1.00mm:PinHeader_1x03_P1.00mm_HorizontalJ1
1LEDLED_THT:LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_ClearD1
1LEDLED_SMD:LED_1206_3216Metric_Pad1.42x1.75mm_HandSolderD3
1LEDLED_THT:LED_D5.0mm_Horizontal_O1.27mm_Z3.0mm_IRBlackD2
1LM358Package_DIP:DIP-8_W7.62mmU1

Similar boards

  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers68.8 × 53.6 mmZArduino, the printed circuit board in 3D

    ZArduino

    zmaker/arduino_cookbook

    gli sketch del nuovo progetto Arduino Cookbook e dei video di YouTube

    46 parts269
  • 2 layers152 × 88 mmRFBitBangSMT, the printed circuit board in 3D

    RFBitBangSMT

    profdc9/RFBitBanger

    A QRP digital transceiver created from readily available parts for off-the-grid maintenance

    271 parts222
  • 2 layers118 × 103.5 mmEV Charger2, the printed circuit board in 3D

    EV Charger2

    fotherja/EV_Charger

    Arduino Uno Code for EV Charger

    62 parts167MIT
  • 2 layers113 × 62.2 mmFullScope, the printed circuit board in 3D

    FullScope

    tvlad1234/pillScopePlus

    Oscilloscope based around the STM32F401 Black Pill and a color LCD screen

    15 parts165Apache-2.0
  • 2 layers75.2 × 61.1 mmHelios, the printed circuit board in 3D

    Helios

    Grix/helios_dac

    Helios Laser DAC

    102 parts132
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

    OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console

    498 parts114CERN-OHL-S-2.0
  • 2 layers100 × 85 mmVNA, the printed circuit board in 3D

    VNA

    profdc9/VNA

    Vector Network Analyzer based on the STM32F103C8T6 bluepill

    178 parts93

Questions

How big is the Ir sensor PCB?

It measures 29.5 × 15.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ir sensor use?

9 parts, built around the LM358. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Ir sensor KiCad files?

From the VINAY-0119/IR-Sensor-PCB-designing repository on GitHub, at the commit this page was made from: the board is ir sensor.kicad_pcb and its schematic ir sensor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ir sensor design in my own project?

Its repository states no licence, so its author keeps all rights: ask VINAY-0119 before reusing the design.