BeginnerTest and Measurement

Digital Light-Level Meter

Connect an OPT3001 light sensor to a microcontroller and learn how lux changes with distance and angle.

Estimated time: 45–75 minutes · Skills: I²C wiring, library installation, measurement repeatability

Parts from the database

Other supplies

Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.

Connections

  1. Connect sensor VCC to 3V3, GND to GND, SDA to GP4 and SCL to GP5 (default I²C pins for this sketch).
  2. Use a breakout board with its I²C pull-ups fitted; avoid stacking several strong pull-ups on the same bus.
  3. Keep the sensor window uncovered and orient it toward the light source.

Build steps

  1. Install the vendor library for the exact OPT3001 breakout, then run its sensor example first.
  2. Confirm the detected I²C address and that the example reports changing lux values.
  3. Place the sensor at a fixed point, note the reading, then move the lamp or sensor and compare.
  4. For meaningful comparisons, keep the same sensor orientation and avoid shadows from your hand.

Software and firmware setup

Firmware is required, but a complete sketch is not included yet. Use the example supplied by the manufacturer of your OPT3001 breakout (the bare sensor and breakout libraries differ), confirm its I2C address, then adapt it to print lux over Serial on the Pico. The TI datasheet below documents the sensor itself.

Test your build

The reading should increase when the sensor faces a brighter light and decrease when shaded. Use the official library example for your breakout; the bare IC and modules may have different pin labeling.

Troubleshooting

  • If the sensor is not found, confirm SDA/SCL are not swapped and scan the I²C bus.
  • If readings remain fixed, uncover the sensing window and check the chosen address.
  • A bare OPT3001 IC requires a correctly designed board; use a labeled breakout for this beginner build.

Safety and limitations

Use ordinary low-voltage USB power. Lux readings from an uncalibrated hobby setup are approximate, not workplace safety measurements.

Manufacturer and platform documentation

Community Notes for This Project

These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.

Set up the comments service to load community notes.

Share a tip or question about this build

← Browse all projects