
This is a light-activated switch circuit using a BC547 NPN transistor. The photocell (LDR) adjusts the transistor's base current in response to light levels, controlling the illumination of the connected LEDs. The circuit is powered by a 9V battery.

The Slit Photocell (Manufacturer: Waveshare, Part ID: 12225) is a light-sensitive device designed to detect the presence or absence of light through a narrow slit. This component is highly effective in applications requiring precise light detection, such as automatic lighting systems, safety devices, and optical encoders. Its ability to respond to changes in light intensity makes it a versatile tool for automation and control systems.

This is a light-activated switch circuit using a BC547 NPN transistor. The photocell (LDR) adjusts the transistor's base current in response to light levels, controlling the illumination of the connected LEDs. The circuit is powered by a 9V battery.

This circuit is a light-sensitive relay switch that uses a photocell (LDR) to control a 12V relay via a BC547 transistor. The relay is powered by a 12V battery, and the transistor acts as a switch that is triggered by the resistance change in the LDR, which is influenced by the ambient light level.

This circuit is a light-sensitive LED array controlled by a pair of NPN transistors. The photocell (LDR) adjusts the base current of the transistors, which in turn controls the LEDs, allowing them to light up when the ambient light level falls below a certain threshold. The 9V battery powers the entire circuit.

This circuit appears to be a light-activated switch using an NPN transistor as the switching element. The photocell (LDR) and resistor form a voltage divider that controls the base of the transistor, allowing current to flow from the collector to the emitter and through the LED when the LDR is exposed to light. The LED turns on when there is enough light and turns off when it is dark, powered by the 9V battery.
The following table outlines the key technical details of the Waveshare Slit Photocell (Part ID: 12225):
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Operating Current | ≤ 20mA |
| Detection Range | 0.1mm to 5mm (through slit) |
| Response Time | ≤ 1ms |
| Output Type | Digital (High/Low) |
| Operating Temperature | -25°C to 85°C |
| Dimensions | 30mm x 15mm x 10mm |
The Slit Photocell has a 3-pin interface. The pinout is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5V) |
| 2 | GND | Ground connection |
| 3 | OUT | Digital output signal (High when light is detected) |
Below is an example of how to connect and use the Slit Photocell with an Arduino UNO:
// Slit Photocell Example with Arduino UNO
// This code reads the digital output of the slit photocell and prints the status
// to the Serial Monitor. The LED on pin 13 will turn on when light is detected.
const int photocellPin = 2; // Digital pin connected to the OUT pin of the photocell
const int ledPin = 13; // Built-in LED pin on Arduino
void setup() {
pinMode(photocellPin, INPUT); // Set photocell pin as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int lightStatus = digitalRead(photocellPin); // Read the photocell output
if (lightStatus == HIGH) {
// Light is detected
digitalWrite(ledPin, HIGH); // Turn on the LED
Serial.println("Light detected!");
} else {
// No light detected
digitalWrite(ledPin, LOW); // Turn off the LED
Serial.println("No light detected.");
}
delay(100); // Small delay for stability
}
No Output Signal
False Readings
Slow Response
Output Always High or Low
Q: Can the slit photocell detect objects in complete darkness?
A: No, the slit photocell requires a light source to detect objects. It works by sensing interruptions in the light passing through the slit.
Q: What is the maximum detection range?
A: The slit photocell can detect light interruptions within a range of 0.1mm to 5mm.
Q: Can I use the slit photocell with a 3.3V microcontroller?
A: Yes, the slit photocell operates within a voltage range of 3.3V to 5V, making it compatible with 3.3V microcontrollers.
Q: How do I clean the slit if it gets dirty?
A: Use a soft, lint-free cloth or compressed air to gently clean the slit. Avoid using liquids or abrasive materials.
By following this documentation, you can effectively integrate the Waveshare Slit Photocell (Part ID: 12225) into your projects for reliable light detection and automation.