<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmod_Photo_Interrupter_Sensor</id>
	<title>KAmod Photo Interrupter Sensor - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmod_Photo_Interrupter_Sensor"/>
	<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmod_Photo_Interrupter_Sensor&amp;action=history"/>
	<updated>2026-05-25T20:38:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.kamamilabs.com/index.php?title=KAmod_Photo_Interrupter_Sensor&amp;diff=7625&amp;oldid=prev</id>
		<title>Grzegorzbecker: Created page with &quot;==== Description ==== &lt;b&gt;KAmod Photo Interrupter Sensor - Slotted Optical Interrupter Module&lt;/b&gt;&lt;br&gt; The KAmod Photo Interrupter Sensor module is a precise IR optical sensor designed for object presence detection, pulse counting, and building incremental encoders. The sensing element operates in the infrared spectrum, which effectively eliminates the influence of external (visible) light on the stability of the sensor&#039;s operation.  The device features an integrated Schmi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmod_Photo_Interrupter_Sensor&amp;diff=7625&amp;oldid=prev"/>
		<updated>2026-05-24T16:48:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==== Description ==== &amp;lt;b&amp;gt;KAmod Photo Interrupter Sensor - Slotted Optical Interrupter Module&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt; The KAmod Photo Interrupter Sensor module is a precise IR optical sensor designed for object presence detection, pulse counting, and building incremental encoders. The sensing element operates in the infrared spectrum, which effectively eliminates the influence of external (visible) light on the stability of the sensor&amp;#039;s operation.  The device features an integrated Schmi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==== Description ====&lt;br /&gt;
&amp;lt;b&amp;gt;KAmod Photo Interrupter Sensor - Slotted Optical Interrupter Module&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The KAmod Photo Interrupter Sensor module is a precise IR optical sensor designed for object presence detection, pulse counting, and building incremental encoders. The sensing element operates in the infrared spectrum, which effectively eliminates the influence of external (visible) light on the stability of the sensor&amp;#039;s operation. &lt;br /&gt;
The device features an integrated Schmitt trigger, ensuring a clean, chatter-free digital output signal. Additionally, the board includes an onboard LED indicating the sensor&amp;#039;s operating status – when the light beam is interrupted, the LED changes state, and a low state (GND) appears on the digital output.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File: KAmod_Photo_Sensor_1.jpg|600px]]&lt;br /&gt;
[[File: KAmod_Photo_Sensor_2.jpg|550px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
==== Technical Specification &amp;amp; Key Features ====&lt;br /&gt;
* Slot width: 6 mm&lt;br /&gt;
* Compatibility with 3.3 V systems (e.g., Raspberry Pi Pico, STM32) and 5 V systems (e.g., Arduino).&lt;br /&gt;
* Power supply: 3.3 - 5V DC&lt;br /&gt;
* JST XH-2.5 3-pin right-angle connector&lt;br /&gt;
* Mounting holes with a diameter of 3 mm&lt;br /&gt;
* Dimensions: 26.8 × 15 × 18.7 mm&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Kit Contents ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: left; background-color:#EEEEEE;&amp;quot;|&amp;lt;b&amp;gt;KAmod Photo Interrupter Sensor&amp;lt;/b&amp;gt;&lt;br /&gt;
! style=&amp;quot;text-align: left; background-color:#EEEEEE;&amp;quot;| &lt;br /&gt;
*Assembled and tested module&lt;br /&gt;
*JST XH 2.54 mm to BLT 2.54 mm 3-pin male cable, 200 mm&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File: KAmod_Photo_Sensor_3.jpg|800px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Schematic ====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File: KAmod_Photo_Interrupter_Sensor_sch.png|600px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pinout Description ==== &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Pin&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|1&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|&amp;#039;&amp;#039;&amp;#039;VCC&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|Power&lt;br /&gt;
| style=&amp;quot;text-align: left;background-color:#EEEEEE&amp;quot;|Module supply voltage (3.3 V to 5 V)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|2&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|&amp;#039;&amp;#039;&amp;#039;GND&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|Power&lt;br /&gt;
| style=&amp;quot;text-align: left;background-color:#EEEEEE&amp;quot;|Ground (GND)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|3&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|&amp;#039;&amp;#039;&amp;#039;OUT / DO&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|Output&lt;br /&gt;
| style=&amp;quot;text-align: left;background-color:#EEEEEE&amp;quot;|Digital signal:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;High state (H):&amp;#039;&amp;#039;&amp;#039; infrared beam uninterrupted&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Low state (L):&amp;#039;&amp;#039;&amp;#039; object is in the slot (beam interrupted)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Connection Example and Test Code ==== &lt;br /&gt;
The following example demonstrates how to connect the module to a development platform and perform a basic sensor state reading.&lt;br /&gt;
&lt;br /&gt;
===== Connection Diagram =====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;  style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Sensor Module&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
! style=&amp;quot;text-align: center; background-color:#FFCC66;&amp;quot;|&amp;#039;&amp;#039;&amp;#039;Platform (e.g., Arduino / RPi Pico)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|VCC &lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|3.3V / 5V&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|GND&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|GND&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|OUT&lt;br /&gt;
| style=&amp;quot;text-align: center;background-color:#EEEEEE&amp;quot;|Digital pin (e.g., D2)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmod_Photo_Interrupter_Sensor_uno.png|600px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
===== Test Code (Arduino IDE) ===== &lt;br /&gt;
The following program configures the pin as an input with an internal pull-up resistor, monitors the sensor state in real-time, and sends messages to the Serial Monitor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #f8f9fa; border: 1px solid #a2a9b1; padding: 10px; border-radius: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right; font-size: 85%; background: #ffffff; border: 1px solid #ced4da; padding: 2px 8px; border-radius: 3px;&amp;quot;&amp;gt;&lt;br /&gt;
[[https://wiki.kamamilabs.com/images/1/12/KAmod_Photo_Interrupter_Sensor.zip Download code]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Source code for Arduino UNO:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/* Slotted optical interrupter module test   */&lt;br /&gt;
&lt;br /&gt;
const int SENSOR_PIN = 2; // Sensor DOUT pin connected to Arduino pin D2&lt;br /&gt;
const int LED_PIN = 13;   // Built-in LED pin on the Arduino UNO board&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  // Configure the sensor pin as an input with an internal pull-up resistor.&lt;br /&gt;
  // Configure the built-in LED pin as an output.&lt;br /&gt;
  pinMode(LED_PIN, OUTPUT);&lt;br /&gt;
  &lt;br /&gt;
  // Initialize serial communication at 9600 bps&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  Serial.println(&amp;quot;--- KAmod Photo Interrupter Sensor Test Started ---&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  // Read the digital state from the sensor&lt;br /&gt;
  int sensorState = digitalRead(SENSOR_PIN);&lt;br /&gt;
&lt;br /&gt;
  // Module operating logic:&lt;br /&gt;
  // LOW (0)  -&amp;gt; IR beam uninterrupted (slot clear). Module LED is ON.&lt;br /&gt;
  // HIGH (1) -&amp;gt; IR beam interrupted (obstacle detected). Module LED is OFF.&lt;br /&gt;
  &lt;br /&gt;
  if (sensorState == LOW) {&lt;br /&gt;
    // No obstacle&lt;br /&gt;
    digitalWrite(LED_PIN, LOW);   // Turn off the built-in Arduino LED&lt;br /&gt;
    Serial.println(&amp;quot;Status: OK (Slot clear)&amp;quot;);&lt;br /&gt;
  } &lt;br /&gt;
  else {&lt;br /&gt;
    // Object detected in the slot&lt;br /&gt;
    digitalWrite(LED_PIN, HIGH);  // Turn on the built-in Arduino LED (detection signaling)&lt;br /&gt;
    Serial.println(&amp;quot;Status: BLOCKED (Obstacle detected!)&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  delay(100);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Functional Verification Guide ====&lt;br /&gt;
# Connect the module to the Arduino according to the connection table.&lt;br /&gt;
# Open the &amp;#039;&amp;#039;&amp;#039;Serial Monitor&amp;#039;&amp;#039;&amp;#039; in the Arduino IDE (Ctrl+Shift+M) and set the baud rate to &amp;#039;&amp;#039;&amp;#039;9600 baud&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# When the slot is empty, you should see the message `Status: OK (Slot clear)` in the window.&lt;br /&gt;
# Insert an opaque object (e.g., a piece of plastic, cardboard, or an encoder disc) into the slot. The message should instantly change to `Status: BLOCKED (Obstacle detected!)`, and the built-in Arduino LED (L) should light up.&lt;/div&gt;</summary>
		<author><name>Grzegorzbecker</name></author>
	</entry>
</feed>