Projects / Photography light meter

Photography light meter

Beginner1 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. NANOBH1750688 lux

    Wire the BH1750

    Check the lux in the serial monitor.

  2. NANO16.5 mASSD1306

    Add the OLED

    On the same two I2C wires.

  3. NANO

    Add the two buttons

    ISO and aperture.

  4. NANO

    Upload the sketch

    Read a bright window.

  5. NANO

    Compare with a phone meter

    Same scene, same ISO.

  6. NANO

    Adjust the constant

    If it reads a stop off.

  7. NANO

    Put it in a small case

    With a window over the sensor.

In short

How do you build a photography light meter?

A lux sensor suggests shutter speed and aperture for film cameras at the ISO you choose. You need Arduino Nano, BH1750 light sensor, SSD1306 OLED Display and Tactile push button 6 mm × 2. It takes 7 steps and about 60 minutes.

Level
Beginner
Time
About 60 min
Parts
4

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
BH1750 SDA and SCLNano A4 and A5I2C (address 0x23)
BH1750 VCC and GNDNano 5V and GNDPower (most modules have a regulator)
OLED SDA and SCLNano A4 and A5Shares the same I2C bus (address 0x3C)
OLED VCC and GNDNano 5V and GNDPower
ISO buttonNano D2 and GNDCycles 100, 200, 400, 800 (internal pull-up)
Aperture buttonNano D3 and GNDCycles f/2 to f/16 (internal pull-up)

Code

A camera exposure follows a simple rule: the right amount of light is set by the aperture, the shutter time and the film speed together, summarised as an exposure value, EV. A lux sensor gives the light level, and for a flat sensor measuring the light that falls on the subject, EV at ISO 100 is the base-2 log of lux divided by 2.5. Each doubling of ISO adds one stop, and the shutter time for a chosen aperture is its square over two raised to the EV. That is all the sketch does, and it shows the result as a fraction such as 1/125. Treat it as a learning meter: a bare sensor behind a small window is not a calibrated incident meter, since its angle of view and spectral response differ from a real one. Compare it with a phone meter app on the same scene and adjust the 2.5 constant slightly if you read a consistent stop high or low. Point the sensor at the light falling on the subject, not into the lens, and shade it from the screen's own glow. Arduino IDE, board "Arduino Nano" (try the Old Bootloader option if the upload fails).

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

// Photography light meter: reads lux, works out the exposure value at your ISO, and shows the shutter speed for a chosen aperture.
// Libraries: BH1750 (Christopher Laws), Adafruit SSD1306, Adafruit GFX. Board: Arduino Nano.
// Incident-light formula: EV at ISO 100 = log2(lux / 2.5).  Shutter time = N squared / 2 to the power EV(ISO).
#include <Wire.h>
#include <BH1750.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
BH1750 sensor;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
const int ISOS[] = { 100, 200, 400, 800 };
const float APERT[] = { 2.0, 2.8, 4.0, 5.6, 8.0, 11.0, 16.0 };
int isoIdx = 0, apIdx = 3;
bool lastIso = HIGH, lastAp = HIGH;
void setup() {
  pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP);
  Wire.begin();
  sensor.begin(BH1750::ONE_TIME_HIGH_RES_MODE);
  oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  oled.setTextColor(SSD1306_WHITE);
}
void loop() {
  bool a = digitalRead(2), b = digitalRead(3);
  if (lastIso == HIGH && a == LOW) { isoIdx = (isoIdx + 1) % 4; delay(40); }
  if (lastAp == HIGH && b == LOW) { apIdx = (apIdx + 1) % 7; delay(40); }
  lastIso = a; lastAp = b;
  sensor.configure(BH1750::ONE_TIME_HIGH_RES_MODE);   // one-time mode needs a new request each reading
  delay(200);
  float lux = sensor.readLightLevel();
  oled.clearDisplay(); oled.setTextSize(1); oled.setCursor(0, 0);
  oled.print("ISO "); oled.print(ISOS[isoIdx]); oled.print("   f/"); oled.print(APERT[apIdx], 1);
  oled.setCursor(0, 14); oled.print(lux, 0); oled.print(" lux");
  if (lux > 0.5) {
    float ev100 = log(lux / 2.5) / log(2.0);
    float ev = ev100 + log((float)ISOS[isoIdx] / 100.0) / log(2.0);
    float t = APERT[apIdx] * APERT[apIdx] / pow(2.0, ev);
    oled.setTextSize(3); oled.setCursor(0, 32);
    if (t >= 1.0) { oled.print(t, 1); oled.print("s"); }
    else { oled.print("1/"); oled.print((int)(1.0 / t + 0.5)); }
  } else {
    oled.setCursor(0, 32); oled.print("Too dark");
  }
  oled.display();
  delay(300);
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Bright daylightA few thousand lux, fast shutter at f/8
Dim roomSlow shutter, tens of lux
Change ISOShutter halves each step
Phone meterWithin about one stop

If it does not work

Always too dark

Check the BH1750 address and wiring.

Shows nothing

Try OLED address 0x3D.

Always the same value

One-time mode needs a new configure each reading, as in the sketch.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the photography light meter?

Arduino Nano, BH1750 light sensor, SSD1306 OLED Display and Tactile push button 6 mm × 2.

How long does the photography light meter take to build?

About 60 minutes for a beginner maker, in 7 steps.

How do I know the photography light meter works?

Bright daylight: A few thousand lux, fast shutter at f/8. Dim room: Slow shutter, tens of lux. Change ISO: Shutter halves each step.

Always too dark: what should I check?

Check the BH1750 address and wiring.

Shows nothing: what should I check?

Try OLED address 0x3D.

Always the same value: what should I check?

One-time mode needs a new configure each reading, as in the sketch.