infrared receiver/The board/02. The four pins
The board · 02 of 9

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.

The four pins, and the sensor
Show
Pins
4
Pins to wire
3
Pitch
2.54 mm
SIGNAL is the phototransistor's emitter. In the dark it sits near 0 V, held there by the 10 kΩ; more infrared pushes more current into that resistor and SIGNAL rises. That is what ACTIVE HIGH on the front means. It is a voltage that moves smoothly, so read it with analogRead.

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 back has no pin names. Which end is GND?

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.

Does NC do anything if I wire it?

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.

Can I plug SIGNAL into a digital pin?

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.

Where this goes next

The black dome, the 10 kΩ, the red LED and its 1 kΩ.

What is on it →

Edit this page — content/books/ir-photodiode/the-four-pins.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 →