

The AS7058, manufactured by Osram, is a low-power, high-accuracy ambient light sensor designed for precise light measurement. It is commonly used in applications such as smartphones, wearable devices, and other consumer electronics. The AS7058 helps optimize display brightness and improve user experience by adjusting to ambient lighting conditions. Its compact design and I2C interface make it easy to integrate into a wide range of devices.








| Parameter | Value |
|---|---|
| Supply Voltage (VDD) | 1.7V to 3.6V |
| Operating Current | 50 µA (typical) |
| Standby Current | 0.5 µA (typical) |
| Light Measurement Range | 0.01 lux to 83,000 lux |
| Interface | I2C (up to 400 kHz) |
| Operating Temperature | -40°C to +85°C |
| Package | 2.0 mm x 2.0 mm x 0.6 mm LGA |
The AS7058 comes in a compact LGA package with the following pin configuration:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VDD | Power supply input (1.7V to 3.6V) |
| 2 | GND | Ground |
| 3 | SDA | I2C data line |
| 4 | SCL | I2C clock line |
| 5 | INT | Interrupt output (active low) |
| 6 | NC | Not connected (leave floating or grounded) |
Below is an example of how to interface the AS7058 with an Arduino UNO using the I2C protocol:
#include <Wire.h> // Include the Wire library for I2C communication
#define AS7058_I2C_ADDRESS 0x39 // Replace with the actual I2C address of the AS7058
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
// Initialize the AS7058
Wire.beginTransmission(AS7058_I2C_ADDRESS);
Wire.write(0x00); // Example: Write to a configuration register
Wire.write(0x01); // Example: Set a configuration value
Wire.endTransmission();
Serial.println("AS7058 initialized.");
}
void loop() {
uint16_t lightLevel = readLightLevel(); // Read light level from the sensor
Serial.print("Ambient Light Level: ");
Serial.print(lightLevel);
Serial.println(" lux");
delay(1000); // Wait for 1 second before the next reading
}
uint16_t readLightLevel() {
uint16_t lightLevel = 0;
Wire.beginTransmission(AS7058_I2C_ADDRESS);
Wire.write(0x04); // Example: Register address for light level data
Wire.endTransmission();
Wire.requestFrom(AS7058_I2C_ADDRESS, 2); // Request 2 bytes of data
if (Wire.available() == 2) {
lightLevel = Wire.read(); // Read the high byte
lightLevel = (lightLevel << 8) | Wire.read(); // Read the low byte
}
return lightLevel;
}
0x39 with the actual I2C address of your AS7058 sensor.No Response from the Sensor
Inaccurate Light Measurements
Interrupt Pin Not Functioning
Q: Can the AS7058 operate at 5V?
A: No, the AS7058 operates within a supply voltage range of 1.7V to 3.6V. Using 5V may damage the sensor.
Q: What is the maximum I2C clock speed supported?
A: The AS7058 supports I2C communication at speeds up to 400 kHz.
Q: How do I calculate the lux value from the sensor's output?
A: Refer to the AS7058 datasheet for the specific formula to convert raw sensor data to lux, as it depends on the sensor's calibration and configuration.
Q: Can the AS7058 be used outdoors?
A: While the AS7058 can measure ambient light outdoors, it is not designed for prolonged exposure to extreme environmental conditions. Use appropriate enclosures for protection.