Module features: 1, using sensitive photoresistor sensor 2, the comparator output, the signal is clean, the waveform is good, the driving ability is strong, more than 15mA. 3, with adjustable potentiometer can adjust the detection light brightness 4, working voltage 3.3V-5V 5, output form: DO digital switch output (0 and 1) and AO analog voltage output 6, with fixed bolt holes for easy installation 7, small board PCB size: 32mm x 14mm 8, using a wide voltage LM393 comparator
Module instructions 1, the photoresistor module is most sensitive to ambient light, generally used to detect the brightness of the surrounding environment, triggering a single-chip or relay module; 2. When the brightness of the ambient light reaches the set threshold, the DO end outputs a high level. When the ambient light brightness exceeds the set threshold, the DO end outputs a low level; 3. The DO output terminal can be directly connected to the single-chip microcomputer, and the high-low level is detected by the single-chip microcomputer, thereby detecting the change of the light brightness of the environment; 4. The DO output terminal can directly drive the relay module of the store, which can form a light control switch. 5, the small board analog output AO can be connected with the AD module, through the AD conversion, you can get more accurate values of ambient light intensity;
/* ************************************************** ****************************** ** Function name : delay(uint z) ** Function: Delay function ************************************************** ****************************** */ Void delay(uint z) { Uint i,j; For(i=z;i>0;i--) For(j=110;j>0;j--); }
//******************************
//*****Serial port initialization function***********
//****************************** Void Initial_com(void) { EA=1; //open total interruption ES=1; //Allow serial port interrupt ET1=1; //Allow interrupt of timer T1 TMOD=0x20; //Timer T1, the baud rate is generated in mode 2 interrupt PCON=0x00; //SMOD=0 SCON=0x50; // mode 1 is controlled by timer TH1=0xfd; //the baud rate is set to 9600 TL1=0xfd; TR1=1; //Open timer T1 run control bit
}
//************************* //********** main function ********* //************************* Main() { Initial_com(); While(1) {
Module features: 1, using sensitive photoresistor sensor 2, the comparator output, the signal is clean, the waveform is good, the driving ability is strong, more than 15mA. 3, with adjustable potentiometer can adjust the detection light brightness 4, working voltage 3.3V-5V 5, output form: DO digital switch output (0 and 1) and AO analog voltage output 6, with fixed bolt holes for easy installation 7, small board PCB size: 32mm x 14mm 8, using a wide voltage LM393 comparator
Module instructions 1, the photoresistor module is most sensitive to ambient light, generally used to detect the brightness of the surrounding environment, triggering a single-chip or relay module; 2. When the brightness of the ambient light reaches the set threshold, the DO end outputs a high level. When the ambient light brightness exceeds the set threshold, the DO end outputs a low level; 3. The DO output terminal can be directly connected to the single-chip microcomputer, and the high-low level is detected by the single-chip microcomputer, thereby detecting the change of the light brightness of the environment; 4. The DO output terminal can directly drive the relay module of the store, which can form a light control switch. 5, the small board analog output AO can be connected with the AD module, through the AD conversion, you can get more accurate values of ambient light intensity;
/* ************************************************** ****************************** ** Function name : delay(uint z) ** Function: Delay function ************************************************** ****************************** */ Void delay(uint z) { Uint i,j; For(i=z;i>0;i--) For(j=110;j>0;j--); }
//******************************
//*****Serial port initialization function***********
//****************************** Void Initial_com(void) { EA=1; //open total interruption ES=1; //Allow serial port interrupt ET1=1; //Allow interrupt of timer T1 TMOD=0x20; //Timer T1, the baud rate is generated in mode 2 interrupt PCON=0x00; //SMOD=0 SCON=0x50; // mode 1 is controlled by timer TH1=0xfd; //the baud rate is set to 9600 TL1=0xfd; TR1=1; //Open timer T1 run control bit
}
//************************* //********** main function ********* //************************* Main() { Initial_com(); While(1) {
Module features: 1, using sensitive photoresistor sensor 2, the comparator output, the signal is clean, the waveform is good, the driving ability is strong, more than 15mA. 3, with adjustable potentiometer can adjust the detection light brightness 4, working voltage 3.3V-5V 5, output form: DO digital switch output (0 and 1) and AO analog voltage output 6, with fixed bolt holes for easy installation 7, small board PCB size: 32mm x 14mm 8, using a wide voltage LM393 comparator
Module instructions 1, the photoresistor module is most sensitive to ambient light, generally used to detect the brightness of the surrounding environment, triggering a single-chip or relay module; 2. When the brightness of the ambient light reaches the set threshold, the DO end outputs a high level. When the ambient light brightness exceeds the set threshold, the DO end outputs a low level; 3. The DO output terminal can be directly connected to the single-chip microcomputer, and the high-low level is detected by the single-chip microcomputer, thereby detecting the change of the light brightness of the environment; 4. The DO output terminal can directly drive the relay module of the store, which can form a light control switch. 5, the small board analog output AO can be connected with the AD module, through the AD conversion, you can get more accurate values of ambient light intensity;
/* ************************************************** ****************************** ** Function name : delay(uint z) ** Function: Delay function ************************************************** ****************************** */ Void delay(uint z) { Uint i,j; For(i=z;i>0;i--) For(j=110;j>0;j--); }
//******************************
//*****Serial port initialization function***********
//****************************** Void Initial_com(void) { EA=1; //open total interruption ES=1; //Allow serial port interrupt ET1=1; //Allow interrupt of timer T1 TMOD=0x20; //Timer T1, the baud rate is generated in mode 2 interrupt PCON=0x00; //SMOD=0 SCON=0x50; // mode 1 is controlled by timer TH1=0xfd; //the baud rate is set to 9600 TL1=0xfd; TR1=1; //Open timer T1 run control bit
}
//************************* //********** main function ********* //************************* Main() { Initial_com(); While(1) {