TK64DIGITALANALOGbeginner

Infrared Photodiode

The receiving half of a break-beam pair, without the 38 kHz demodulator a remote needs — so it reports light level rather than messages.

Comes in this kit — not sold separately

Specifications

TypeIR photodiode / phototransistor
WavelengthPeaks near 940 nm
OutputAnalog level, and digital on the threshold variant
Supply voltage3.3 V or 5 V

What it is

A photodiode sensitive to infrared, without the filtering and demodulation that TK15 has.

That absence is the point. TK15 deliberately ignores anything that is not a 38 kHz carrier, which makes it excellent at remote controls and useless for detecting a steady beam. This part sees the beam, and reports roughly how much of it there is.

Paired with TK63 it makes a break-beam sensor: aim them at each other, read the level, and a drop means something passed through. Because it responds to steady light it also responds to sunlight and to incandescent bulbs, so shield it or compare against a baseline you sample at startup.

Infrared Photodiode — front
Front
Infrared Photodiode — back
Back
Infrared Photodiode — side
Side

Pinout

  • GND (negative): Like the negative terminal (-) of a battery, connect to the control board's GND
  • VCC (positive): Like the positive terminal (+) of a battery, connect to the control board's 3.3V or 5V (this module supports both 3.3V and 5V)
  • NC (no connection): No actual circuit connection, included for unified interface, can be left unconnected
  • SIGNAL (signal output): Infrared signal output pin, connect to the control board's digital pin (e.g. Arduino D2 or Pico GPIO 0)
    • Outputs decoded data when receiving infrared signal
    • Maintains HIGH when no signal received

Wiring

Infrared Photodiode wiring

  1. GND → Control board GND
  2. VCC → Control board 3.3V or 5V
  3. SIGNAL → Control board digital pin (use the pin defined in your program)

Example

// Note: This program requires IRremote library
// Installation: Tools → Manage Libraries → Search "IRremote" → Install

#include <IRremote.h>  // Import infrared receiver library

// Pin number: change this to match your wiring
#define IR_RX_PIN 2  // Arduino digital pin connected to SIGNAL (e.g. D2)

// Create infrared receiver object
IRrecv irrecv(IR_RX_PIN);
decode_results results;  // Store decoding results

void setup() {
  // Start serial for debugging (9600 baud)
  Serial.begin(9600);
  
  // Start infrared reception
  irrecv.enableIRIn();
  
  Serial.println("Infrared receiver program started");
  Serial.println("Waiting to receive infrared signal...");
}

void loop() {
  // Check if infrared signal received
  if (irrecv.decode(&results)) {
    // Signal received, print decoding results
    Serial.print("Infrared signal received, decoded value: 0x");
    Serial.println(results.value, HEX);  // Display in hexadecimal
    
    // Identify common infrared remote codes
    switch(results.value) {
      case 0xFF00FF:  // Example: a button on a remote
        Serial.println("Button 1 pressed");
        break;
      case 0xFF807F:  // Example: another button on a remote
        Serial.println("Button 2 pressed");
        break;
      default:
        Serial.println("Unknown button");
        break;
    }
    
    // Continue receiving next signal
    irrecv.resume();
  }
  
  delay(100);  // Brief delay
}
Infrared Photodiode running on an Arduino Uno

When it doesn’t work

It reads high even with the emitter off.
Ambient infrared. Sample the level with the emitter off, then with it on, and use the difference — that cancels the background.
It cannot decode my remote.
Correct, and by design. Remotes send a 38 kHz carrier that this part cannot separate from the background. Use TK15.
The reading swings through the day.
Sunlight. Shield the sensor, or re-baseline periodically.

Edit this page — content/modules/ir-photodiode.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Infrared Photodiode

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum