ANALOGbeginner

Infrared Receiver

An infrared light sensor on a TinkerBlock board: an Everlight PT334-6B phototransistor in a black 5 mm package and a 10 kΩ load, so SIGNAL is an analog voltage that rises with how much infrared arrives, steady or flashing. The partner of the TK63 for a break-beam. It is not the TK15 IR Receiver: it decodes no remote, and the TK15 ignores steady light.

Comes in this kit — not sold separately

Specifications

TypeInfrared light sensor: a phototransistor and a 10 kΩ load. An analog level, more infrared reads higher. No filter, no decoder
SensorEverlight PT334-6B, an NPN phototransistor in a black 5 mm package, standing up off the board and looking straight up
WavelengthPeak 940 nm, the TK63's colour; half sensitivity from 760 to 1100 nm. The black package stops visible light, not sunlight's infrared
OutputSIGNAL is the emitter, with 10 kΩ to GND: about 0 V in the dark, 1 V per 0.1 mA of photocurrent, up to about 0.4 V under VCC. Read it with analogRead
SupplyYour board's logic voltage on VCC: 3V3 on an ESP32, ESP32-S3 or Pico, 5V on an Uno. SIGNAL tops out near 2.9 V or 4.6 V
CurrentOnly what the infrared lets through: under 0.1 µA in the dark, at most about 1.2 mA from 3V3 and 3.1 mA from 5V
Speed15 µs rise and fall into 1 kΩ in the maker's test; about 0.15 ms into this board's 10 kΩ, worked out. Too slow to follow a 38 kHz carrier
IndicatorRed LED and 1 kΩ on SIGNAL, fed by the sensor's own current: lights in strong infrared, above about 2 V. Not a power light
Pins to wire3 of the 4: GND, VCC and SIGNAL. NC is connected to nothing on the board
Header4-pin right-angle male, 2.54 mm pitch: GND, VCC, NC, SIGNAL, with GND on the square pad
Board22.4 × 30.4 mm, two 4.8 mm mounting holes 16 mm apart. The front prints INFRARED RECEIVER and ACTIVE HIGH, the back DETECTS INFRARED LIGHT
In the box1 × TK64 block. It also ships inside the TinkerBlock kits

What it does

It measures how much infrared light reaches it. The black dome is an Everlight PT334-6B phototransistor: infrared on it lets a current through, a 10 kΩ turns the current into a voltage, and SIGNAL rises with the light, from about 0 V in the dark. That is what ACTIVE HIGH on the front means.

It is not the TK15 IR Receiver, whose name is nearly the same. The TK15 decodes a remote control's 38 kHz bursts and ignores steady light. The TK64 has no filter and no decoder: it reports steady infrared, which is what a beam from the TK63 Infrared Transmitter is, and it cannot tell one remote button from another.

Drag to turn it
The TK64. The sensor is the black dome; it looks straight up. Turn it over for the back.

The dome is black on purpose: it stops visible light and lets infrared through, peaking at 940 nm, the TK63's colour. Sunlight and filament bulbs carry plenty of infrared, so they read high; a white LED lamp barely registers. A red LED on SIGNAL, fed by the sensor's own current, lights in strong infrared.

The page this replaces called it a photodiode that put out decoded data and stayed HIGH with no signal, and its sketches decoded remote codes. None of that is true of this board: it is a phototransistor, dark is about 0 V, and there is nothing on it to decode.

Two things to know before wiring

  • VCC is your board's logic voltage. Strong infrared takes SIGNAL to about 0.4 V under VCC: 3V3 on an ESP32, an ESP32-S3 or a Pico, 5V on an Uno.
  • Read it with analogRead. SIGNAL is a smooth voltage. A digital pin reads HIGH only in strong infrared, and between LOW and HIGH it promises nothing.

Wiring, in four lines

  1. GND to your board's GND.
  2. VCC to 3V3 on an ESP32, ESP32-S3 or Pico; 5V on an Uno.
  3. SIGNAL to an analog pin: GPIO 4 on an ESP32-S3, GPIO 34 on an ESP32, A0 on an Uno, GP26 on a Pico.
  4. NC to nothing: it is connected to nothing on the board.

Then analogRead(pin): near 0 covered, higher with more infrared.

Where to start

The handbook below is nine short articles, each with a working figure. Not the remote-control receiver settles which block you want. The first reading is the whole build in three wires, and a beam that breaks adds the TK63 and reads the beam without the room.

For how it works, read light becomes a voltage and the LED bends the curve. If the number is wrong, when the reading is wrong.

When it doesn’t work

Is this the same as the TK15 IR Receiver?
No. The TK15 is a Vishay TSOP18138 that decodes a remote control's 38 kHz bursts and ignores steady light. The TK64 is a bare phototransistor: it measures how much infrared arrives, steady or not, and decodes nothing. For a remote, use the TK15; for a beam or a reflection, the TK64.
Can it read my TV remote?
It sees the remote flash, and its reading jumps while you press a button, but it cannot tell one button from another. It has no 38 kHz filter or decoder, and it is too slow to follow the carrier. The TK15 reads remotes.
It reads high even with the emitter off.
That is the room's own infrared. Sunlight and filament or halogen bulbs carry a lot of it, and the black package lets it through. Shade the sensor, and for a beam read it with the emitter off, then on, and use the difference: the handbook's break-beam sketch does exactly that.
Should VCC go to 3V3 or 5V?
To your board's logic voltage: 3V3 on an ESP32, ESP32-S3 or Pico, 5V on an Uno. In strong infrared SIGNAL climbs to about 0.4 V under VCC, so 5V on VCC can put about 4.6 V on a 3.3 V pin.
Can I use a digital pin?
Only for strong infrared. SIGNAL is a smooth voltage, and a digital pin promises HIGH only above about 2.5 V on an ESP32 or 3 V on an Uno. In between it may read either. analogRead shows the whole range.
Why is the LED dark while the reading moves?
It runs on the sensor's own current and lights only once SIGNAL passes about 2 V. In an ordinary room the reading moves well below that. When it does light, it takes part of the current, so the reading climbs more slowly from there.

The infrared receiver handbook

9 articles · about 40 minutes

This page is the reference: what the part is, what it is made of, and the questions people arrive already asking. The handbook is the walk — the same part in the order somebody actually meets it.

The board

3 articles

Not the remote-control receiver: a black phototransistor that measures how much infrared arrives, a 10 kΩ load, a red LED, and four pins of which three are wired.

How it works

3 articles

Infrared makes a current, the 10 kΩ makes it a voltage, VCC sets the ceiling, the LED bends the top of the curve, and the black package lets through infrared only.

Reading it

2 articles

Three wires and analogRead, when digitalRead will do, and a beam with the TK63 that ignores the room.

When it is wrong

1 article

Stuck at zero, stuck at the top, or wandering: what each one means and where to look.

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 Receiver

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 →