The Photoresistor Light Sensor (LDR LM393) is a versatile electronic component designed to detect light intensity. This sensor module includes a light-dependent resistor (LDR) that changes its resistance based on the ambient light levels. It operates within a voltage range of 3.3V to 5V and incorporates an LM393 comparator for signal processing, making it suitable for a variety of applications.
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5V |
Comparator | LM393 |
Light Sensor Type | Light-Dependent Resistor (LDR) |
Output Type | Digital and Analog |
Dimensions | 5mm LDR |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | DO | Digital Output (High/Low based on light intensity) |
4 | AO | Analog Output (Variable voltage based on light intensity) |
// Example code to read from the LDR LM393 sensor module
const int analogPin = A0; // Pin connected to AO (Analog Output)
const int digitalPin = 2; // Pin connected to DO (Digital Output)
int analogValue = 0; // Variable to store the analog value
int digitalValue = 0; // Variable to store the digital value
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(digitalPin, INPUT); // Set digital pin as input
}
void loop() {
analogValue = analogRead(analogPin); // Read the analog value
digitalValue = digitalRead(digitalPin); // Read the digital value
// Print the values to the Serial Monitor
Serial.print("Analog Value: ");
Serial.print(analogValue);
Serial.print(" | Digital Value: ");
Serial.println(digitalValue);
delay(1000); // Wait for 1 second before next reading
}
No Output Signal:
Inconsistent Readings:
Digital Output Always High/Low:
By following this documentation, users can effectively integrate and utilize the Photoresistor Light Sensor (LDR LM393) in their projects, ensuring accurate light intensity detection and reliable performance.