Sensor Cor & Luz & Imagem

Produtos visualizados

LDR Photosensitive Photoresistor Sensor Ver maior

LDR Photosensitive Photoresistor Sensor

BE15000395

Novo produto

4,31 € com IVA

Adicionar à Lista de desejos

Mais informação

Module Features: 

  • Using the sensitive type photoresistor sensor 
  • The comparator outputs a signal clean, good waveform driving ability more than 15mA. 
  • With adjustable potentiometer can adjust the light intensity detected 
  • The working voltage: 3.3V-5V 
  • The output format: Digital switching output (0 and 1) 
  • With a fixed bolt holes for easy installation 
  • Small PCB board size: 3.2cm x 1.4cm 
  • Using a wide woking voltage range LM393 comparator 
  • Application: Light intensity is detected, the light intensity sensor, smart car search light module 

 

Module Instructions 

  • Photosensitive resistor module most sensitive to environmental light, generally used to detect the brightness of ambient light, triggering microcontroller or relay module; 
  • When ambient light intensity does not reach the threshold value, the module DO-side output high when the ambient light level exceeds the set threshold, DO terminal output low; 
  • DO output can be directly connected to the microcontroller through the microcontroller to detect high and low, thereby detecting the brightness of ambient light changes; 
  • DO output can directly drive the relay module, which can be composed of a light control switch. 

 

Product wiring instructions: 

  • VCC for positive power supply 3.3-5V 
  • GND for power supply is negative 
  • DO TTL switching signal output

 

Code:


#define ANALOG_SENSOR_PIN A0
#define DIGITAL_SENSOR_PIN 3
#define LEDPIN 13 // The onboard LED


int switch_state; /* Holds the last digital value */
int LightAnalogValue; /* Holds the last analog value */

void setup()
{
pinMode(LEDPIN, OUTPUT);
Serial.begin(9600); // Enable the Serial data output
Serial.println("YourDuino Light Sensor Test 1.10 ");

}


void loop()

{

switch_state = digitalRead(DIGITAL_SENSOR_PIN);
if (switch_state == LOW)
{
digitalWrite(LEDPIN, HIGH);
Serial.println("Digital Signal ON ");
}
else
{
digitalWrite(LEDPIN, LOW);
}

LightAnalogValue = analogRead(ANALOG_SENSOR_PIN); //Read the voltage from sensor
Serial.print("Analog Value (0 to 1023)");
Serial.println(LightAnalogValue,DEC); // Send result to Serial Monitor
delay(500);

}

Acessórios

Clientes que compraram este produto também compraram: