Ks0121 keyestudio EASY plug Photo Interrupter Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==EASY plug Photo Interrupter Module ==
[[image:ks0121图.jpg|thumb|600px|right|Keyestudio EASY plug Photo Interrupter Module]]
<br>[[File:ks0121-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
Upright part of this sensor is an infrared emitter and on the other side, it’s a shielded infrared detector. By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. It is used for many applications including optical limit switches, pellet dispensing, general object detection, etc. <br>
This is a high performance EASY Plug photo interrupter module. <br>
Note: this module needs to be used together with EASY plug control board.<br>
The upright part on the module combines an infrared light emitting diode and shielded infrared detector.<br>
 
By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam. <br>
Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc.<br>
<span style="color: red">'''Note: ''' this module needs to be used together with EASY plug control board.<br>
<br>


==Specification==
==Specification==
* Interface: Easy plug
* Connector: Easy plug
* Supply Voltage: 3.3V to 5V
* Supply Voltage: 3.3V to 5V
* Interface: Digital
* Interface: Digital
* Size: 38x20mm
* Weight: 5g


==Connection Diagram ==
<br>
<br>[[File:ks0121-2.png|500px|frameless|thumb]]<br>
==Technical Details==
* Dimensions: 38mm*20mm*18mm
* Weight: 4.8g
<br>


==Connect It Up ==
Connect the EASY Plug photo interrupter module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0121.jpg|500px|frameless|thumb]]<br>


==Sample Code==
<br>
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload. 
<pre>
<pre>
// photo interrupter module
// photo interrupter module
   
   
int Led = 13 ;// define LED Interface
int Led = 13 ;// define LED Interface
int buttonpin = 3; // define the photo interrupter sensor interface
int buttonpin = 6; // define the photo interrupter sensor interface
int val ;// define numeric variables val
int val ;// define numeric variables val
void setup ()
void setup ()
Line 44: Line 51:
}
}
</pre>
</pre>
<br>
==What You Should See==
Done uploading the code, powered on, if pick up a piece of paper in the groove part on the module, you should see the indicator LED on the control board is turned on. If move the paper, the LED is turned off. 
<br>[[File:ks0121 Result.jpg|500px|frameless|thumb]]  [[File:ks0121 Result1.jpg|500px|frameless|thumb]]<br>
<br>


==Resources ==
==Resources ==
 
'''PDF'''<br>
'''PDF'''
 
https://drive.google.com/open?id=1bUzBV5--XSbR5vWkbP1shRLCVHCnZW3j
https://drive.google.com/open?id=1bUzBV5--XSbR5vWkbP1shRLCVHCnZW3j


<br>
==Buy from ==
==Buy from ==
http://www.keyestudio.com/keyestudio-easy-plug-photo-interrupter-module-for-arduino.html


http://www.keyestudio.com/keyestudio-easy-plug-photo-interrupter-module-for-arduino.html


[[category:EASY Plug]]
[[category:EASY Plug]]

Revision as of 11:17, 16 November 2018

Keyestudio EASY plug Photo Interrupter Module

Introduction

This is a high performance EASY Plug photo interrupter module.
The upright part on the module combines an infrared light emitting diode and shielded infrared detector.
By emitting a beam of infrared light from one end to another end, the sensor can detect an object when it passes through the beam.
Useful for many applications such as optical limit switches, pellet dispensing, general object detection, etc.
Note: this module needs to be used together with EASY plug control board.

Specification

  • Connector: Easy plug
  • Supply Voltage: 3.3V to 5V
  • Interface: Digital


Technical Details

  • Dimensions: 38mm*20mm*18mm
  • Weight: 4.8g


Connect It Up

Connect the EASY Plug photo interrupter module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Copy and paste below code to Arduino IDE and upload.

// photo interrupter module
 
int Led = 13 ;// define LED Interface
int buttonpin = 6; // define the photo interrupter sensor interface
int val ;// define numeric variables val
void setup ()
{
  pinMode (Led, OUTPUT) ;// define LED as output interface
  pinMode (buttonpin, INPUT) ;// define the photo interrupter sensor output interface   
}
void loop ()
{
  val = digitalRead (buttonpin) ;// digital interface will be assigned a value of 3 to read val
  if (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes
  {
    digitalWrite (Led, HIGH);
  }
  else
  {
    digitalWrite (Led, LOW);
  }
}


What You Should See

Done uploading the code, powered on, if pick up a piece of paper in the groove part on the module, you should see the indicator LED on the control board is turned on. If move the paper, the LED is turned off.
thumb thumb

Resources

PDF
https://drive.google.com/open?id=1bUzBV5--XSbR5vWkbP1shRLCVHCnZW3j


Buy from

http://www.keyestudio.com/keyestudio-easy-plug-photo-interrupter-module-for-arduino.html