What is on the board · 01 of 10

The four pins

Four pins, three of them wired. GND and VCC power the sensor, SIGNAL is a voltage that rises with the light, and NC is connected to nothing. There are only three parts on the board, and no LED: nothing on the block lights to say it is working.

What is on the board

A light sensor, a resistor, a capacitor, and a four-pin header along the bottom edge. The header is right-angled, so the pins point out past the edge of the board and it lies flat in a breadboard or on a cable.

The TK20 seen from the parts side: a black board with a wide gold border, a small clear rectangular sensor near the top with a C printed to its left and an E to its right, a brown capacitor and a black resistor below it, a large gold sun at the top right, two big round mounting holes, lonely binary up the left edge, a boxed ANALOG up the right edge, and a right-angle header labelled GND, VCC, NC and SIGNAL from left to right.
The parts side. The sensor is the clear part near the top; GND is the left-hand pin.

The sensor is a phototransistor, 3.2 by 1.5 mm, in a clear package so light reaches the silicon inside. It is the only part that responds to light. Below it are the 100 nF capacitor, brown, and the 4.7 kΩ resistor, black. Between them they turn what the sensor does into a voltage.

The gold sun at the top right is printed artwork. Shade it and nothing happens. Shade the clear part and the reading falls.

The four names

The four pins, and the sensor
Show
Pins
4
Pins to wire
3
Pitch
2.54 mm
SIGNAL is the sensor's emitter, the leg marked E, with the 4.7 kΩ and the 100 nF to ground. Light makes a current flow out of the emitter and through the resistor, and the voltage that builds across it is SIGNAL. More light, higher voltage. Dark, about 0 V.

GND is on the square pad. The resistor and the capacitor both end here.

VCC goes to one place: the sensor's leg marked C. It supplies the current that light lets through. VCC sets the ceiling is about what it does and does not change.

NC means not connected, and on this board it means it literally. The net list, which is the list of every electrical connection on the board, does not mention it at all.

SIGNAL is the sensor's leg marked E, with the resistor and capacitor to ground. It is an analog voltage: about 0 V in the dark, a few tenths of a volt to about a volt in a lit room, and up towards VCC in bright light. It goes to an analog pin, not a digital one.

No light on the board

Some TinkerBlock sensors carry an LED that shows what the output is doing. This one does not, so a missing wire looks the same as a dark room. The first reading is the test: cover the sensor and the number drops, shine a torch on it and the number jumps.

The back of the board

The back of the TK20: a black board with a gold border, lonely binary across the top, a large gold sun, two mounting holes, TK20 AMBIENT LIGHT in a boxed label, four header pads in a row with the square one on the right, and MEASURES LIGHT INTENSITY along the bottom.
The back. The part number is here, and the square pad is now on the right.

Turned over, the order reverses. The square pad is on the right, and it is still GND. The back prints TK20, the number on the box, and MEASURES LIGHT INTENSITY, but no pin names.

When it does not work

Which pin is GND?

Hold the board with the parts facing you and the header pins pointing down. Read GND, VCC, NC, SIGNAL from left to right. GND is also the square pad, which is the one mark that survives when the board is in a breadboard and the labels are hidden.

Which part is the sensor?

The small clear part near the top, with a C printed to its left and an E to its right. The brown and black parts below it are a capacitor and a resistor. The gold sun at the top right is only artwork; nothing under it senses anything.

Do I have to connect NC?

No. It is not connected to anything on the board. It is there so every TinkerBlock block has the same four-pin header and one cable fits all of them. Wiring it does no harm and changes nothing.

How do I know it is powered? Nothing lights up.

There is no LED on this board, so you cannot tell by looking. Run the first-reading sketch and cover the sensor with a finger, then shine a phone torch on it. A number that drops near 0 and then jumps up means it is powered and working.

Where this goes next

What the clear part actually is, and the three things the old page got wrong because of it.

Not an LDR

Edit this page — content/books/ambient-light-sensor/the-four-pins.mdx

Community

Questions about this product

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

Ask a question ↗

Ambient Light Sensor

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