Specifications
| Type | Infrared light sensor: a phototransistor and a 10 kΩ load. An analog level, more infrared reads higher. No filter, no decoder |
|---|---|
| Sensor | Everlight PT334-6B, an NPN phototransistor in a black 5 mm package, standing up off the board and looking straight up |
| Wavelength | Peak 940 nm, the TK63's colour; half sensitivity from 760 to 1100 nm. The black package stops visible light, not sunlight's infrared |
| Output | SIGNAL 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 |
| Supply | Your 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 |
| Current | Only 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 |
| Speed | 15 µ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 |
| Indicator | Red 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 wire | 3 of the 4: GND, VCC and SIGNAL. NC is connected to nothing on the board |
| Header | 4-pin right-angle male, 2.54 mm pitch: GND, VCC, NC, SIGNAL, with GND on the square pad |
| Board | 22.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 box | 1 × 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.
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
- GND to your board's GND.
- VCC to 3V3 on an ESP32, ESP32-S3 or Pico; 5V on an Uno.
- SIGNAL to an analog pin: GPIO 4 on an ESP32-S3, GPIO 34 on an ESP32, A0 on an Uno, GP26 on a Pico.
- 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.