

The PmodALS, manufactured by Digilent, is a compact ambient light sensor module designed to measure light intensity. It utilizes a photodiode and associated circuitry to convert ambient light levels into an analog voltage signal. This module is ideal for applications requiring light detection, such as automatic lighting systems, display brightness adjustment, and environmental monitoring.
The PmodALS is easy to integrate with microcontrollers and other digital devices, making it a versatile choice for both hobbyists and professionals.








The following are the key technical details of the PmodALS:
The PmodALS uses a 6-pin connector. The pin configuration is as follows:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V) |
| 2 | GND | Ground |
| 3 | OUT | Analog output signal (light intensity) |
| 4 | NC | Not connected |
| 5 | NC | Not connected |
| 6 | NC | Not connected |
VCC pin to a 3.3V power source and the GND pin to ground.OUT pin to an analog input pin on your microcontroller or ADC (Analog-to-Digital Converter). The voltage on the OUT pin will vary proportionally with the ambient light intensity.Although the Arduino UNO operates at 5V logic, you can use a voltage divider or level shifter to safely interface with the PmodALS. Below is an example code snippet for reading the sensor's output:
// Define the analog pin connected to the PmodALS OUT pin
const int sensorPin = A0;
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Read the analog value from the sensor
int sensorValue = analogRead(sensorPin);
// Convert the analog value to voltage (assuming 3.3V reference)
float voltage = sensorValue * (3.3 / 1023.0);
// Print the voltage to the serial monitor
Serial.print("Ambient Light Voltage: ");
Serial.print(voltage);
Serial.println(" V");
// Add a small delay for stability
delay(500);
}
Note: If using a 5V Arduino, ensure the OUT pin voltage does not exceed the ADC input range by using a voltage divider.
No Output Signal:
Inconsistent Readings:
Output Voltage Stuck at Maximum or Minimum:
Q: Can the PmodALS be used with a 5V microcontroller?
A: Yes, but you must use a voltage divider or level shifter to ensure the OUT pin voltage does not exceed the microcontroller's ADC input range.
Q: How do I convert the output voltage to lux?
A: The PmodALS output voltage is proportional to light intensity. Refer to the module's datasheet for the exact conversion formula or perform a calibration using a known light source.
Q: Can the PmodALS detect infrared light?
A: No, the PmodALS is designed to detect visible light and is not sensitive to infrared wavelengths.
By following this documentation, you can effectively integrate the PmodALS into your projects and troubleshoot any issues that arise.