BH1745 Luminance and Colour Sensor Breakout

by Pimoroni

A really sophisticated and accurate colour and luminance sensor breakout that's Raspberry Pi and Arduino-compatible. As well as detecting RGB colour and light level, it has added bells and whistles like 50/60Hz light noise rejection, a wide detection range, and two illumination LEDs.

This type of sensor is the same as you'd find in phones, tablets, and laptops where they're used to detect ambient light temperature and adjust the colour temperature of the display accordingly.

The BH1745 Luminance and Colour Sensor Breakout has an I2C interface and is 3.3V or 5V compatible. Like our other Pimoroni breakouts, we've designed it so that you can solder a piece of right-angle header onto it and then pop it straight onto the bottom left 5 pins on your Raspberry Pi's GPIO header (pins 1, 3, 5, 6, 9).

It's also compatible with our fancy new Breakout Garden, where using breakouts is as easy just popping it into one of the six slots and starting to grow your project, create, and code.

✨ What's new?

BH1745 breakouts made after August 2023 have a Qw/ST (Qwiic/STEMMA QT) connector. You can use this to easily connect them up to other boards with Qw/ST connectors (like the ones in our Pico W Aboard range) via a four pin JST-SH cable.

Features

  • BH1745 luminance and colour sensor (datasheet)
  • Two white illumination LEDs
  • Red, green, blue, and luminance measurements
  • 0.005 to 40,000 lux detection range
  • 50/60Hz light noise rejection
  • IR cut filter
  • 16 bit data output
  • 3.3V or 5V compatible
  • I2C interface, with address select via ADDR cuttable trace (0x38 or 0x39)
  • Reverse polarity protection
  • Raspberry Pi-compatible pinout (pins 1, 3, 5, 7, 9)
  • Compatible with Raspberry Pi (Python library)
  • Compatible with Raspberry Pi Pico (C++/MicroPython libraries)

Kit includes

  • BH1745 Luminance and Colour Sensor Breakout
  • 1x5 male header
  • 1x5 female right angle header

Software

We've put together a Python library that you can use to read data from your BH1745 Luminance and Colour Sensor Breakout, and an easy one-line installer to install everything.

You can also use this breakout with Raspberry Pi Pico and other RP2040 boards, using C++ or Pirate brand MicroPython.

Notes

  • The trace between the solder pads (marked ADDR) can be cut (carefully with a craft knife) to change the I2C address from the default of 0x38 to 0x39, meaning that you can use up to two sensors on the same Raspberry Pi or Arduino. If cut, the pads can be bridged again by soldering to reset the address to 0x38.
  • Dimensions: 19x19x3mm

9 customer reviews

5 years ago
The BH1745 chip and the breakout board both perform very well. There is one item, however that is missing from the documentation, and that is how to switch on the LEDs. It would be useful to have a note somewhere explaining how this works. The LEDs are connected to the BH1745 Interrupt line. This is activated by a threshold mechanism that is fully documented in the BH1745 chip manual. You can select which of the four light sensor channels to use and you can set a high and a low threshold. The Interrupt is enabled when the light is above the high level or below the low level. Write 0x1D to register 0x60 to enable Interrupts and select the unfiltered light sensor. Write 0xFF to the four registers starting at 0x62 to force the LEDs on. With the default settings in these registers, the LEDS will be off.
by Richard about BH1745 Luminance and Colour Sensor Breakout via REVIEWS.io
5 years ago
Just starting to play with this. I was surprised how bright the LEDs are and look forward to comparing the figures to my calibrated monitor next year :-) Software drivers are simple to use in your own Python program - just use sudo pip3 install bh1745 for Python3 and not pip (as that's Python 2).
by Andrew about BH1745 Luminance and Colour Sensor Breakout via REVIEWS.io
6 years ago
The BH1745 seems to work nice so far. All the few example Python programs (from GitHub) works fine out of the box. I would appreciate if Pimoroni could give better instructions and quides of the possibilities when using of the breakout (to someone like me: Raspberry newbie): like example codes how to read the luminance values and and other library functions available...
by Yrjö about BH1745 Luminance and Colour Sensor Breakout via REVIEWS.io
7 years ago
Works nice, but the scale is uses seems to different from the Enviro pHAT. Shouldn't matter, as your working with relative changes most of the time anyway, but nice to know if you need to do direct comparisons.
by Chad about BH1745 Luminance and Colour Sensor Breakout via REVIEWS.io