180° Infrared Refletive Unit (ITR9606)

via M5Stack
$3.54
SKU M5-U058
Description

OP.90 and OP.180 are two limit switches with different orientation placement. Build with a ITR9606, which is consist of an infrared emitting diode and a silicon phototransistor. 
They are used for controlling machinery as part of a control system, as a safety interlock, or to count objects passing a point.A limit switch is an electromechanical device that consists of an actuator mechanically linked to a set of contacts. When an object comes into contact with the actuator, the device operates the contacts to make or break an electrical connection 
The actuator of this Unit is consist of a pair of IR part, emitter side and receiver side(silicon phototransistor). The IR emitter will keep sending IR wave while the receiver will keep detecting the IR wave. The IR is directly emitted from one side to another side, so if there’s no object in between, the receiver side would get the IR signal. This is how it detecting a break an electrical connection. 


Product Features

  • Vertical Layout
  • IR limit switch
  • Fast response time
  • High sensitivity

Include

  • 1x OP.180 unit
  • 1x GROVE Cable

Application

  • Door Switch
  • Machinery Control
  • Mouse Copier
  • Switch Scanner
  • Non-contact Switching
Learn

 

Code

1. Arduino IDE

To get complete code, please click here.

#include <M5Stack.h>

void setup() {
  // put your setup code here, to run once:
  M5.begin();
  //Wire.begin();
  M5.Lcd.setCursor(120, 10, 4);
  M5.Lcd.println("90/180 OPTICAL");

  pinMode(36,INPUT_PULLUP);
}

void loop() {
  // put your main code here, to run repeatedly:
  M5.Lcd.setCursor(80, 120, 4);
  M5.Lcd.printf("ir receive: %d",digitalRead(36));
}

Video