
Overview
The sensor consists of an IR LED and a photo sensor (phototransistor). The light emitted by the IR LED gets reflected by any object placed in front of the sensor and this reflection is detected by the photo sensor (phototransistor). Any white (or lighter) colored surface reflects more than black (or darker) colored surface.
When the reflected light is detected, it produces Digital HIGH (or Binary 1) output on the Sig pin. The on-board LED indicator will also glow. If no reflection is detected or if the object is too far from the sensor, the output on the SIG pin stays at Digital LOW (Binary 0). The on-board LED indicator will be off as well.
The detectable range of this sensor is 4–16 mm. The module incorporates a Rail-to-Rail Operational Amplifier to amplify the output of phototransistor. There is a potentiometer which can be used to adjust the gain of the amplifier, that is, sensitivity of detection.
Get Inspired

Learn how to build a complete HMI with Arduino that will allow you to interact with your projects in an intuitive and visual way.

OPC Unified Architecture – OPC UA in short – is a cross-platform, open-source machine-to-machine communication protocol for industrial automation. It was developed by the Open Platform Communications (OPC) Foundation and is defined in detail in the IEC 62541 standard. With the release of the Arduino_OPC_UA library we enable users to convert any product from our Arduino Opta range into an OPC UA-enabled device. Step-by-step guide to setting up OPC UA on Arduino Opta It’s as simple as uploading a single sketch onto your Opta and connecting it to an Ethernet network. Once uploaded, the OPC UA firmware exposes the Arduino Opta’s analog and digital inputs, the user button and LED (only Arduino Opta WiFi), as well as its relay outputs as properties that can be read from or written to using OPC UA. OPC UA communication is performed using OPC UA binary encoding via TCP sockets. Arduino_OPC_UA is a port of the Fraunhofer open62541 library implementing IEC 62541 in highly portable C99 for both Windows and Linux targets. One serious challenge during the porting of open62541 was to decide on sensible tradeoffs concerning RAM consumption, as using OPC UAs full namespace zero (NS0) requires up to 8 MB of RAM while the STM32H747 powering the Arduino Opta has a total of 1 MB of SRAM to offer – some of which already allocated by the the Arduino framework for the Arduino Opta. Expand functionality with Arduino Opta Modules and OPC UA integration Additionally, Arduino_OPC_UA supports the automatic discovery, configuration and exposure as OPC UA objects of the recently released Arduino Opta expansion modules. Currently three different expansion modules exist: Arduino Opta Analog Expansion (A0602), Arduino Opta Digital Expansion with electro-mechanical relay outputs (D1608E), and with solid-state relay outputs (DS1608S). During system start-up, the Arduino Opta’s expansion bus is queried for connected expansion modules and automatically configures them and