Stufin
Home Quick Cart Profile

Photo Control Automatic Light Based Sensor

Buy Now on Stufin

Supply Voltage

3.3V to 5.5V DC

Current Consumption

10mA

Sensitivity Range

0.1 lux to 100,000 lux

Response Time

50ms

Output Signal

Digital (TTL) and Analog (0-5V)

Operating Temperature

-20C to 70C

Storage Temperature

-40C to 85C

Humidity

5% to 95% RH (non-condensing)

Applications

The Photo Control Automatic Light Based Sensor is ideal for various IoT applications, including

Smart Lighting Systems

Energy-Efficient Buildings

Home Automation

Industrial Automation

Security Systems

Outdoor Lighting Control

Certifications and Compliance

The Photo Control Automatic Light Based Sensor complies with relevant industry standards and regulations, including

RoHS

REACH

CE

FCC

Warranty and Support

The component is backed by a 1-year limited warranty and dedicated technical support to ensure seamless integration and operation.

Pin Configuration

  • Photo Control Automatic Light Based Sensor Documentation
  • Pinouts:
  • The Photo Control Automatic Light Based Sensor has 4 pins, which are explained below:
  • Pin 1: VCC (Power Supply)
  • Function: Provides power to the sensor
  • Description: This pin should be connected to a positive voltage supply (typically 5V) to power the sensor.
  • Connection: Connect to a 5V power supply or a microcontroller's VCC pin.
  • Pin 2: GND (Ground)
  • Function: Provides ground reference for the sensor
  • Description: This pin should be connected to a common ground reference point in the circuit.
  • Connection: Connect to a GND pin on a microcontroller or a breadboard's GND rail.
  • Pin 3: OUT (Output)
  • Function: Provides a digital output signal based on the ambient light level
  • Description: This pin outputs a digital signal (HIGH or LOW) indicating whether the ambient light level is above or below a certain threshold.
  • Connection: Connect to a digital input pin on a microcontroller or a logic-level input on a peripheral device.
  • Pin 4: ADJ (Adjustment)
  • Function: Allows adjustment of the light sensitivity threshold
  • Description: This pin can be connected to a potentiometer or a variable resistor to adjust the light sensitivity threshold of the sensor.
  • Connection: Connect to a potentiometer or a variable resistor (typically 10k) to adjust the light sensitivity threshold.
  • Connection Structure:
  • Here's an example connection structure for the Photo Control Automatic Light Based Sensor:
  • Connect VCC (Pin 1) to a 5V power supply or a microcontroller's VCC pin.
  • Connect GND (Pin 2) to a GND pin on a microcontroller or a breadboard's GND rail.
  • Connect OUT (Pin 3) to a digital input pin on a microcontroller or a logic-level input on a peripheral device.
  • Connect ADJ (Pin 4) to a potentiometer or a variable resistor (typically 10k) to adjust the light sensitivity threshold.
  • Example Circuit:
  • Here's an example circuit that demonstrates the connection of the Photo Control Automatic Light Based Sensor to an Arduino Uno board:
  • ```
  • +-----------+
  • | Arduino |
  • | Uno |
  • +-----------+
  • | |
  • | |
  • V V
  • +-----------+ +-----------+
  • | Photo | | Potentiometer|
  • | Control | | (10k) |
  • | Sensor | | |
  • +-----------+ +-----------+
  • | |
  • | |
  • V V
  • +-----------+ +-----------+
  • | 5V Power | | GND Rail |
  • | Supply | | |
  • +-----------+ +-----------+
  • ```
  • In this example, the Photo Control Automatic Light Based Sensor is connected to an Arduino Uno board, with the VCC pin connected to the 5V power supply, GND pin connected to the GND rail, OUT pin connected to a digital input pin (e.g., D2), and ADJ pin connected to a potentiometer (10k) to adjust the light sensitivity threshold.

Code Examples

Photo Control Automatic Light Based Sensor Documentation
Overview
The Photo Control Automatic Light Based Sensor is a digital sensor that detects the ambient light intensity and adjusts the brightness of a connected light source accordingly. This component is ideal for energy-efficient lighting systems, automated lighting control, and IoT-based smart home applications.
Technical Specifications
Operating Voltage: 3.3V - 5V
 Current Draw: 10mA (typical)
 Ambient Light Sensing Range: 0.1 lux to 100,000 lux
 Output Signal: Digital (HIGH/LOW) or Analog (0-5V)
 Interface: Digital I/O or I2C (optional)
Code Examples
### Example 1: Basic Automatic Lighting Control using Arduino
In this example, we'll use the Photo Control Automatic Light Based Sensor to control a connected LED light source based on the ambient light intensity.
Hardware Requirements
Photo Control Automatic Light Based Sensor
 Arduino Board (e.g., Arduino Uno)
 LED Light Source
 Resistor (1 k)
 Breadboard and jumper wires
Arduino Code
```c
const int sensorPin = A0;  // Analog input pin for sensor
const int ledPin = 9;    // Digital output pin for LED
void setup() {
  pinMode(sensorPin, INPUT);
  pinMode(ledPin, OUTPUT);
}
void loop() {
  int sensorValue = analogRead(sensorPin);
  int brightness = map(sensorValue, 0, 1023, 0, 255);
  analogWrite(ledPin, brightness);
  delay(50);
}
```
Explanation
In this example, we read the analog output from the Photo Control Automatic Light Based Sensor using the `analogRead()` function. We then map the sensor value to a brightness value between 0 and 255 using the `map()` function, and write the brightness value to the LED pin using the `analogWrite()` function.
### Example 2: IoT-Based Smart Lighting System using Raspberry Pi and Python
In this example, we'll use the Photo Control Automatic Light Based Sensor to control a connected LED light source based on the ambient light intensity, and integrate it with a web-based interface using Flask.
Hardware Requirements
Photo Control Automatic Light Based Sensor
 Raspberry Pi (e.g., Raspberry Pi 3B+)
 LED Light Source
 Resistor (1 k)
 Breadboard and jumper wires
Software Requirements
Raspbian OS
 Python 3.x
 Flask framework
Python Code
```python
import RPi.GPIO as GPIO
from flask import Flask, jsonify
app = Flask(__name__)
# Set up GPIO pin for LED
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
# Set up Photo Control Automatic Light Based Sensor
sensor_pin = 18
@app.route('/light', methods=['GET'])
def get_light_status():
    sensor_value = read_sensor_value()
    brightness = calculate_brightness(sensor_value)
    GPIO.output(17, brightness)
    return jsonify({'light_status': 'on' if brightness > 0 else 'off'})
def read_sensor_value():
    # Read analog output from sensor
    sensor_value = GPIO.input(sensor_pin)
    return sensor_value
def calculate_brightness(sensor_value):
    # Map sensor value to brightness value
    brightness = int((sensor_value / 1023)  255)
    return brightness
if __name__ == '__main__':
    app.run(debug=True)
```
Explanation
In this example, we use the RPi.GPIO library to control the LED light source, and the Flask framework to create a web-based interface. We read the analog output from the Photo Control Automatic Light Based Sensor using the `read_sensor_value()` function, and calculate the brightness value based on the sensor value using the `calculate_brightness()` function. The brightness value is then written to the LED pin using the `GPIO.output()` function.
These examples demonstrate how to use the Photo Control Automatic Light Based Sensor to create energy-efficient and automated lighting control systems using popular microcontrollers and programming languages.