The four pins
Four pins, three wired. GND is on the square pad; VCC goes to the sensor's collector and must be your board's logic voltage; NC is connected to nothing; SIGNAL is an analog voltage that rises with the infrared, read with analogRead on A0, GPIO 34, GPIO 4 or GP26.
Count from the square pad
The four holes look the same. One pad is square, and it is GND. From the front, parts facing you and the header at the bottom, the silkscreen reads GND, VCC, NC and SIGNAL from left to right. The back prints no names, and there the square pad is on the right.
Pick each pin in turn. What each one reaches comes from the board's net list, not the silkscreen:
- GND reaches the 10 kΩ load and the LED's cathode.
- VCC reaches the phototransistor's collector and nothing else, so in the dark the block takes almost nothing from it.
- NC reaches nothing. Wire it or leave it; it makes no difference.
- SIGNAL is the phototransistor's emitter, with the 10 kΩ and the LED's 1 kΩ to GND.
VCC is your logic voltage
In strong infrared SIGNAL climbs to about 0.4 V under VCC. So VCC decides the most your pin will ever see: put it on 3V3 beside an ESP32, an ESP32-S3 or a Pico, and on 5V beside an Uno. 5V beside a 3.3 V board reads fine in a dim room, and can put up to about 4.6 V on the pin once sunlight reaches the sensor.
SIGNAL is analog
SIGNAL does not switch between two levels. It moves smoothly with the light, so wire it to an analog input: A0 on an Uno, GPIO 34 on an ESP32, GPIO 4 on an ESP32-S3, GP26 on a Pico. The two ESP32 pins are on ADC1, the converter that keeps working while Wi-Fi is on. These are the pins the Ambient Light Sensor book uses, so both blocks wire the same way.
When it does not work
The square pad. Seen from the back with the header at the bottom, it is the right-hand hole; from the front, with the parts facing you, GND is on the left, then VCC, NC and SIGNAL, as printed.
No. It is soldered to a pad that no trace reaches: the net list puts it in no net at all. It is there so every TinkerBlock block has the same four-pin header and one cable fits all of them.
You can read it there, but only strong infrared crosses the pin's HIGH threshold, and the range between LOW and HIGH is a band where the pin promises nothing. An analog pin shows the whole range. The first reading article compares the two.
Edit this page — content/books/ir-photodiode/the-four-pins.mdx
Questions about this product
See what other owners have asked, and read their solutions.
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.