Photo Interrupter Module LM393 Comparator (FC-03) [S158]


* Specs

Module Features:

Use imported groove coupler sensor

Groove Width: 5mm

Output state indicator lights

Obscured output high; unobstructed output low

The comparator output, the signal is clean, the waveform, driving ability, more than 15mA

Operating Voltage: 3.3V-5V

The output in the form: Digital switching outputs (0 and 1)

A fixed bolt hole for easy installation

Small plates PCB Dimensions: 3.2 x 1.4cm / 1.25 * 0.55"

Using a wide voltage LM393 comparator

Module Using The Instructions:

Module slot unobstructed, receiver tube conduction module DO output low, shelter, DO output high

Module DO connected to the relay, composed of the limit switch functions can also be connected to the active buzzer module, composed 

Pins Connection:

VCC: positive power supply 3.3-5V;

GND: Ground;

DO:  Output frequency pulses;

AO:  analog output, real-time output voltage signal. (not useful)

* Contents

- Connect

VCC ----- 5V

GND ----- GND

D0 ----- D2

- Key Code

#define encdpin   2

volatile int count, countold;

unsigned long ignoremilli = 10;  

unsigned long oldtime = 0;

unsigned long time = 0;

  count = 0;

  countold = 0; 

  oldtime = millis();

  attachInterrupt(digitalPinToInterrupt(encdpin), sensor1, FALLING);

  if(countold != count)




    lcd.print("CNT : "+(String)count+" ");

    countold = count;


Posted by RDIoT

댓글을 달아 주세요