An Infrared (IR) Proximity Sensor detects obstacles and surface reflectivity. It features an IR emitter LED (transmits light) and an IR photodiode receiver (reads reflected light). In Open Maker Studio, this sensor is used for collision detection, line-following robots, and non-contact limit switches.
1. Hardware Specifications & Pinout
- Operating Voltage: 3.3V to 5.0V.
- Detection Cone: 44° total (22° half-angle), from 2cm to 30cm depending on Sensitivity.
- Output Signal:
- Digital Out (DO): Active-LOW (outputs LOW when an obstacle is detected, HIGH when clear).
- Analog Out (AO): Outputs a variable voltage corresponding to proximity — lower voltage means the object is closer.
- Pin Configuration:
- VCC: Connect to 3.3V or 5V.
- GND: Common Ground.
- DO: Connect to digital input.
- AO: Connect to ADC pin.
2. How it Works (Theory & Calibration)
- Active Reflection: The IR emitter constantly outputs infrared light. When an object comes close, it reflects the IR light back to the photodiode. The photodiode's resistance drops, causing the AO voltage to shift.
- Line Following (Surface Contrast) — real-world background, not simulated by OMS: on real hardware, a bright/white surface reflects more IR than a dark/black one at the same distance, which is how line-following robots use this sensor. OMS only models distance and detection angle — there's no surface-color/reflectivity property in the simulated component, so you can't demonstrate the bright-vs-dark-surface difference in the Circuit Canvas today, only the distance-based obstacle-detection behavior.
- Onboard Potentiometer: Adjusts the comparator threshold for the digital output trigger distance (2cm to 30cm) — modeled in OMS as the real
sensitivityproperty (Section 3).
3. Component Properties (Property Inspector)
When you select the IR Sensor on the canvas, you can modify the following parameters in the Property Inspector panel:
- Sensitivity (
sensitivity): Sets the detection range.- Default:
512 - Range:
0to1023(maps to 2cm–30cm of real detection distance)
- Default:
- Distance (
distance): How far the obstacle currently is from the sensor face.- Default:
15cm - Range:
2cm to30cm
- Default:
There's no "Obstacle Proximity %" or "Threshold Voltage" property — the real interaction is dragging an obstacle ("wall") object on the canvas to a real distance within a real 44° cone (Section 6), not setting an abstract percentage or a fixed comparator voltage.

