Pages

Saturday, September 17, 2016

Wiring Light Blocking / Photo Interrupter Sensor

Another guide from 37 in 1 sensor, in this illustration we will going to wire the light interrupter sensor or photo interrupter. A photo Interrupter is transmission type photo sensor that integrates optical receiving and transmitting elements in a single package please see the diagram below. Since the method involves light blocking commonly named photo interrupter. A long life infrared photo diodes is applied for output while a single photo transistor and photo IC are integrated on the other side for light detection.

Required Components

  • UNO / MEGA / NANO / PRO / DUE /  ESP8266 / STM
  • Light Blocking Sensor / Photo Interrupter Sensor
  • 5mm / 3mm LED
  • 220 Ohms Resistor
  • Solder Less Bread Board
  • Jumper Wires / DuPont Wires
  • Wiring Guide

    37-in-1-sensor-kit-14core-soure-code-wiring-guide-infrared-light-interrupter-ir-light-blocking-sensor-arduino

    Source Code

    /* 14CORE Test Code for: Light Photo Interupter .:+osysso++:` `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ .:oyhhhhhhhso:` `. ``` */ int LedOutput = 12;// Define as LED Output Pin 12 you can change this to 13 if you dont use pin 12 as output indicator int SensorPin = 2; // Define as Sensor Pin Input int Value;// Define as variable void setup() { pinMode(LedOutput,OUTPUT);//Set as LedOutput pinMode(SensorPin,INPUT);//Set as photo interrupter sensor output interface } void loop() { Value=digitalRead(SensorPin);// Set as sensor read SensorPin if(Value==HIGH) //If value is equal to HIGH estate then turn LED output = high { digitalWrite(LedOutput,HIGH); // Set LedOutPut to HIGH or ON } else { digitalWrite(LedOutput,LOW); // Set LedOutPut to LOW or OFF } } 14CORE Test Code for: Light Photo Interupter           .:+osysso++:`                                                                                    `+yhs/-`     `-+s+`        `:/+++++++++`  .:/++ooo++/-` .ooooooooooo+:    :///////////-            `odh/`            `:y+`     /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////`           -hds`                `sy.   +ddy`         .ddd:       sddy.dddo       +ddd- .-----------`          `hds :sssss/   -ossssso-yy` `hdd:          oddy       `ddd/oddd:......+dddo .++++++++++++            +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+.  ````````````            ydy  .hddd/+hdddhydddh/.+yo  /hdddddddddd. :shddddddddhs/`+ddd:````-yddy-  :ooooooooooo+            odh` sdddooyyyyyhddddyy.sy+  ` `.........     ``....      ....`   ```...`    `  ``  `` `            -dd+`::::`      .:::-  /yy.  -oos+:-oos+--oos+:   /o `+y o/: o:+/ h:`yos   /+-`/+/+ s:y/y.           /dd/                `+yy:    +//+  +/:+  +/:+ -. `/ -:o.:/:`//+- +  +:- :`-+:`://: +`o`+.            -yds.            `/yys-     .`-.. .``` ```` .`` ` ` ``` ``-..` `                                      :ydy/.`````.-/oyhs:      `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/                                        .:oyhhhhhhhso:`                                          `.                                                ```                                                       int LedOutput = 12;// Define as LED Output Pin 12 you can change this to 13 if you dont use pin 12 as output indicator int SensorPin = 2; // Define as Sensor Pin Input int Value;// Define as variable pinMode(LedOutput,OUTPUT);//Set as LedOutput pinMode(SensorPin,INPUT);//Set as photo interrupter sensor output interface Value=digitalRead(SensorPin);// Set as sensor read SensorPin if(Value==HIGH) //If value is equal to HIGH estate then turn LED output = high digitalWrite(LedOutput,HIGH); // Set LedOutPut to HIGH or ON digitalWrite(LedOutput,LOW); // Set LedOutPut to LOW or OFF
    Source: Wiring Light Blocking / Photo Interrupter Sensor

    No comments:

    Post a Comment