Source: https://mokxi.com/parts/opt3001
Updated: 2026-11-22

Part

# Ambient light, OPT3001

Light in lux with the eye's response, 0.01 to 83865 lux, auto-ranging over I2C.

See every part

- 5 pins
- 2 settings
- In 1 project

Drawn live by the editor's own code, at the size you see it.

At a glance

## The Ambient light, OPT3001 in brief

What it is, and every setting the properties panel gives it.

The OPT3001 is a TI ambient light sensor that measures light in lux the way the eye sees it, from 0.01 to 83865 lux, over I2C at address 0x44. It auto-ranges, and its filter blocks infrared, so it agrees with the eye where a plain photodiode reads high under incandescent light. A screen dims with it; a greenhouse logs with it. It runs on 3 to 5 V, and the board carries the I2C pull-ups. Its INT pin can signal a limit or a conversion-ready interrupt, active low. The Mokxi model gives the part two settings: address, from 0x44 to 0x47, and lux, the light level, which a slider changes. The model leaves out the fault count and the spectral response: the slider is the reading. It powers up shut down, and continuous mode converts every 100 or 800 ms.

Family

Sensors

Pins

5

address

68

lux

300

Pins

## 5 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VCC

Supply, 3 to 5 V on the board.

GND

Ground.

SCL

I2C. The board carries the pull-ups.

SDA

I2C. The board carries the pull-ups.

INT

The limit or conversion-ready interrupt, active low.

How to use it

## How to use the OPT3001 with an Arduino Uno

The example project is an energy meter. An INA228 sits in series with a 12 V load and adds up the joules and coulombs through its shunt, the way a battery monitor counts what is left. The OPT3001 reads the light falling on the solar panel that would charge the battery. Its VCC goes to the Uno 5V pin, GND to GND, SCL to A5 and SDA to A4.

The sketch includes ClosedCube_OPT3001.h and Adafruit_INA228.h. In setup it starts the OPT3001 at address 0x44, writes a config with automatic range (0b1100) and continuous conversion every 100 ms (0b11), and prints "Energy meter". The INA228 chip keeps the running totals itself, so the loop only reads them. Every 500 ms it prints bus voltage, current, power, energy in joules, charge in coulombs (3600 coulombs is one amp hour), and the OPT3001 lux reading.

With default settings, the serial monitor printed: "Energy meter", "12.00 V 100 mA 1197 mW 0.65 J 0.055 C panel 19999 lux", "12.00 V 100 mA 1197 mW 1.29 J 0.108 C panel 19999 lux". The joules and coulombs climb as the 100 mA load runs; the panel reading stays at 19999 lux because the light level is fixed at the default.

After changing lux to 50000, the serial monitor printed: "12.00 V 100 mA 1197 mW 0.65 J 0.055 C panel 49992 lux", "12.00 V 100 mA 1197 mW 1.29 J 0.108 C panel 49992 lux". Only the panel reading changed, from 19999 to 49992 lux; the electrical numbers stayed the same. Drag the light slider yourself and watch the reading follow, or swap the lamp for another model and watch the totals climb faster or slower.

Part pin

Goes to

VCC

Arduino Uno R3 pin 5V

GND

Arduino Uno R3 pin GND

SCL

Arduino Uno R3 pin A5

SDA

Arduino Uno R3 pin A4

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

sketch.ino · Arduino Uno R3 · the first 45 lines

Common errors

## Common Ambient light, OPT3001 errors and fixes

What goes wrong

The fix

Reading the result before a first conversion has finished.

Continuous mode converts every 100 or 800 ms and sets the conversion ready flag, so give it that long after setting the mode.

Using the wrong I2C address.

The OPT3001 lives at 0x44 by default, and can be set from 0x44 to 0x47; match the address setting to what you pass to begin().

Wiring SDA and SCL to the wrong Uno pins.

On an Uno, SDA goes to A4 and SCL to A5.

Leaving the chip in its power-up shut-down state.

Write the configuration to set a conversion mode; it powers up shut down until you do.

Questions

## Questions and answers

### what is the opt3001 i2c address

0x44 by default. The address property can be set from 0x44 to 0x47.

### what voltage does the opt3001 need

It runs on 3 to 5 V on the board. The board carries the I2C pull-ups.

### what lux range can the opt3001 measure

It measures from 0.01 to 83865 lux, auto-ranging. In Mokxi the lux slider goes from 0 to 83865.6.

### which library reads the opt3001 on an arduino

ClosedCube's library, which Mokxi ships as ClosedCube_OPT3001.h. Call begin(0x44), write the config, then readResult().lux.

How it is modeled

## What is true about the Ambient light, OPT3001, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

The fault count and the spectral response: the slider is the reading.

From OPT3001 ambient light sensor, in full.

Projects

## See the Ambient light, OPT3001 in a project

One built-in project uses it. It opens in the editor, already wired.

Boards

## The boards it is shown on

This board has a built-in project with the Ambient light, OPT3001 in it.

- Arduino Uno R3

Keep going

## Keep going

- I2C Scanner for Arduino and ESP32, and Fixes
- Light sensor, BH1750
- Ambient light, VEML7700
- Light sensor

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the Ambient light, OPT3001

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
