Ks0121 keyestudio EASY plug Photo Interrupter Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
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>
This module needs to be used together with EASY plug control board.<br>


<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><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


<br>
==Technical Details==
* Dimensions: 38mm*20mm*18mm
* Weight: 4.8g
<br>
==Connect It Up ==
Connect the EASY Plug Photo Interrupter module and LED module to control board using RJ11 cables. Then connect the control board to your PC with a USB cable.
<br>[[File:光折断灯.jpg|600px|frameless|thumb]]<br>
<br>


==Connection Diagram ==
==Upload the Code==
<br>[[File:ks0121-2.png|500px|frameless|thumb]]<br>
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<br>[[File:ks0397 10.1.png|600px|frameless|thumb]]<br>


<br>
==What You Should See==
Done uploading the code, powered on, if pick up a piece of paper to cover the light on the groove part of module, you should see the LED is turned on. If no interruption, the LED is off.  <br>
<br>[[File:ks0397 10-1.png|600px|frameless|thumb]]<br>
<br>[[File:ks0397 10-2.png|600px|frameless|thumb]]<br>


==Sample Code==
 
<pre>
<br>
// photo interrupter module
==Extension Experiment==
 
int Led = 13 ;// define LED Interface
<span style=color:red><big>'''Adding 4-digit LED Display'''</big></span><br>
int buttonpin = 3; // define the photo interrupter sensor interface
 
int val ;// define numeric variables val
<br>
void setup ()
'''Hookup Guide'''<br>
{
Connect the EASY Plug crash sensor, 4-digit LED display and LED module to control board using RJ11 cables. <br>
  pinMode (Led, OUTPUT) ;// define LED as output interface
<br>[[File:光折断数码管灯.jpg|600px|frameless|thumb]]<br>
  pinMode (buttonpin, INPUT) ;// define the photo interrupter sensor output interface 
 
}
<br>
void loop ()
'''Upload the Code'''<br>
{
Below is an example code.<br>
  val = digitalRead (buttonpin) ;// digital interface will be assigned a value of 3 to read val
<br>[[File:ks0397 10.2.1.png|600px|frameless|thumb]]<br>
  if (val == HIGH) // When the light sensor detects a signal is interrupted, LED flashes
<br>[[File:ks0397 10.2.2.png|600px|frameless|thumb]]<br>
  {
 
    digitalWrite (Led, HIGH);
<br>
  }
'''What You Should See'''<br>
  else
<br>[[File:ks0397 10-3.png|600px|frameless|thumb]]<br>
  {
<br>
    digitalWrite (Led, LOW);
Done uploading the code, if pick up a piece of paper to cover the light on the groove part, the LED is turned on. If no interruption, the LED is off.
  }
<br>[[File:ks0397 10-5.png|600px|frameless|thumb]]<br>
}
You should be able to see the number of covering the light is showed on the 4-digit LED display, or on the monitor.
</pre>
<br>[[File:ks0397 10-4.png|600px|frameless|thumb]]<br>
 
 
<br>


==Resources ==
==Resources ==


'''PDF'''
https://fs.keyestudio.com/KS0121
 


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


==Buy from ==
==Buy from ==
*[https://www.keyestudio.com/new-keyestudio-easy-plug-photo-interrupter-module-for-arduino-steam-p0063-p0063.html  Official website]
*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-Photo-Interrupter-Module-for-Arduino/1452162_32642601628.html?spm=2114.12010612.8148356.29.70927ca94vv8QO    Aliexpress store ]


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


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

Latest revision as of 16:23, 7 January 2021

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.
This module needs to be used together with EASY plug control board.


Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


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 and LED module to control board using RJ11 cables. Then connect the control board to your PC with a USB cable.
thumb

Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See

Done uploading the code, powered on, if pick up a piece of paper to cover the light on the groove part of module, you should see the LED is turned on. If no interruption, the LED is off.

thumb

thumb



Extension Experiment

Adding 4-digit LED Display


Hookup Guide
Connect the EASY Plug crash sensor, 4-digit LED display and LED module to control board using RJ11 cables.

thumb


Upload the Code
Below is an example code.

thumb

thumb


What You Should See

thumb

Done uploading the code, if pick up a piece of paper to cover the light on the groove part, the LED is turned on. If no interruption, the LED is off.
thumb
You should be able to see the number of covering the light is showed on the 4-digit LED display, or on the monitor.
thumb



Resources

https://fs.keyestudio.com/KS0121



Buy from