AS7263 I2C voltage compatibility with Arduino Uno

Hi,

I want to use the SparkFun AS7263 NIR spectral sensor breakout (SEN-14351) with a 5V Arduino Uno clone (CH340G, MEGA328P) to measure near-infrared transmittance through window curtains.

I understand the AS7263 is a 3.3V device and the Uno’s I2C pins are nominally 5V.

My questions:

  1. Is it safe to connect the AS7263 breakout directly to a 5V Uno’s I2C pins (A4, A5) given the onboard 3.3V pull-ups?
  2. Would this sensor be good for my usecase

Thanks

  1. No, not safe. Use a bidirectional logic level shifter, like this one.

  2. Yes. Make two measurements, one with the curtains open for the reference values and one with the curtains closed. Divide to get the absorbance ratios.

1 Like

asking AI I got:
Why it usually works anyway

The SparkFun breakout board has pull-up resistors to 3.3V on the SDA and SCL lines. I2C works by pulling lines low to send a 0, and letting the pull-ups bring them high. So the actual high voltage the sensor sees is pulled toward 3.3V rather than being driven hard to 5V by the Arduino. In practice this protects the chip well enough for bench use.

If it seems to work and you are willing to take the risk of destroying the equipment, fine.

I haven’t tried it.

I advise using the level shifter :slight_smile:

is there a better way

@any : Yes. This one is specifically designed for I2C level-shifting:

1 Like

Yes, use a 3.3V Arduino-compatible MCU board to collect data from 3.3V sensors. These days, almost all of both run at 3.3V, and 5V logic is becoming a thing of the past.