What components are inside the color sensor (37308)?

Element photo

Can this part be used as a camera, or is it simply a light sensor?

1 Answer 1


This part has been included in a number of sets since its first use in 2020, including SPIKE sets from LEGO Education as well as the Robot Inventor set. It's purpose is to detect reflected light color, reflected light intensity, or ambient light intensity. Because it can detect reflected light, it can be used as a short-range distance sensor.

We can slide the white and black portions of this element apart to reveal a single PCB inside. Here's the bottom view of the PCB:

PCB bottom

The primary microcontroller on board appears to be an STM8S105K6. This is an 8-bit MCU with 32 Kbytes Flash, a 16 MHz CPU, and integrated EEPROM for program storage.

The other smaller components provide support for the main chip and RGB sensor as well as drivers for the LEDs on the board.

On the top side of the PCB we have the remaining electronic components:

PCB Top View

On the top side, we have 3 surface mount LEDs to provide illumination and a central RGB sensor. I believe that this sensor is a TCS3472 or something very similar based on its pinout, function, and shape. This part is able to detect light intensity and hue, but it has extremely limited resolution. Here's a diagram of the photodiode array:

Photodiode array diagram

This might look like a very low-resolution camera sensor, but the individual photodiodes are averaged internally. Here's what the datasheet says:

The TCS3472 light-to-digital converter contains a 3 × 4 photodiode array, four analog-to-digital converters (ADC) that integrate the photodiode current, data registers, a state machine, and an I 2C interface. The 3 × 4 photodiode array is composed of red-filtered, Green-filtered, blue-filtered, and clear (unfiltered) photodiodes. In addition, the photodiodes are coated with an IR-blocking filter. The four integrating ADCs simultaneously convert the amplified photodiode currents to a 16-bit digital value. Upon completion of a conversion cycle, the results are transferred to the data registers, which are double-buffered to ensure the integrity of the data. All of the internal timing, as well as the low-power wait state, is controlled by the state machine.

While this averaging setup may improve sensitivity and accuracy, it does not allow the individual photodiodes in the 3x4 array to be accessed. This sensor is certainly not a camera in any meaningful way. It does not appear to be possible to use this sensor to detect even crude shapes, only color and intensity of light.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.