Site icon 14core.com

Wiring MOC78XX, H206, GP1A57HRJ00F Opto-interrupter for Motor Speed, Direction, Detection Control

This is the photo interrupter also known as photogate, photodiode, or phototransistor. Phototransistors are specially designed transistors with the base region exposed these transistors are light sensitive, especially when an infrared source of light is being used. Phototransistors it has two leads a collector and emitter. When the light is absent the phototransistor is closed and does not allow a collector-emitter current to pass through the phototransistor open only with the presence of sufficient light.

On this illustration, we will demonstrate using a dc motor with flat slotted disk attach to the motor when the motor spins the slotted disk interfere with the beam from the led to the phototransistor. The width blade affects the efficiency of the motor as it determines how long the electromagnet stays on. If you want to make your own slotted disk keep in mind that it should be dense as paper or cardboard might be semi-transparent for infrared light. Opto interrupter is a small U-shaped black plastic package which has four pins two for infrared LED on one side pin for light sensitive transistor and external connection is required. The infrared light and the photo diode are in a single package the photo-interrupter employs trans missive technology to sense obstacles existence, act as on/off switch or sense a low-resolution rotary or linear motions. The principle states that object opaque to the infrared will interrupt the transmission of light between an infrared emitting diode and a photo sensor switching from the output of HIGH state to LOW state.

Required Components 

Wiring Guide

Source Code for Digital IO
[crayon-6772dfd48a01f717287510/]
Source Code for Analog IO
[crayon-6772dfd48a028265364188/]
Source Code for Speed Detection
[crayon-6772dfd48a02c794977088/]
Source Code for Direction Detection

In order to detect the speed of the motor, the time must be taken into account if time is recorded at each pulse from the photo-interrupter then compared to the time of the previous pulse, the motor revolutions per minute can be calculated.
[crayon-6772dfd48a02f922129103/]
Source Code for Interrupts
[crayon-6772dfd48a033568896616/]
Downloads 

Wiring MOC78XX, H206, GP1A57HRJ00F Opto-interrupter for Motor Speed, Direction, Detection Control
Exit mobile version