How to Use Brightness Sensor Module

Photo of brightness sensor module

It measures the surrounding brightness.
You can also create switches based on brightness.

About the Module

The sensor located in the red circle in the photo can transmit and receive infrared light, outputting the surrounding brightness as an analog signal (a number from 0 to 1023).

Since brightness sensors are designed to mimic the human eye, they do not respond much to infrared or ultraviolet light. Please be careful when using them in projects.

Photo explaining the sensor position of the brightness sensor module

Specifications

Voltage5V
VoltageAnalog
Voltage 34 x 20 (mm)

Connection

Connect the brightness sensor module to the SPACEBLOCK microcontroller board using jumper wires (male-female) as follows:

  • Brightness sensor's S pin to SPACEBLOCK's analog compatible pin
  • Brightness sensor's G pin to SPACEBLOCK's GND
  • Brightness sensor's V pin to SPACEBLOCK's 5V
Connection method between SPACEBLOCK microcontroller board and brightness sensor module

※The image shows the signal wire connected to pin A0. Analog compatible pins are A0 to A7, B0 to B1.

※5V and GND can also be inserted into the pins with the same notation on the SPACEBLOCK microcontroller board.

Usage

The sensor detects the surrounding brightness and returns a numerical value.
The brighter it is, the larger the number.
You can obtain values from the brightness sensor module using blocks in the 'Input' category of the project.


For detailed usage of the blocks, click here

Analog Read