Skip to main content

MOC-7811 Opto Isolator Module (Encoder Sensor)

Encoder sensors or also known as Slotted couplers and Opto-Interrupters are widely used for applications required to monitor any interruptions. The MOC module comes in a plastic moulding that houses an emitter and receiver section.


Features of MOC7811

  • Input Voltage: 5V
  • Current limit: 50mA
  • Transistor output(Vceo): 30V


Note: This module is very vulnerable to high currents and can get damaged easily. So it is always better to use a current-limiting resistor before the emitter section.


Pin Configuration of MOC7811

The table below shows the pin number and its corresponding pin type. This could help in connecting the MOC module to a microcontroller.

Pin Number

Pin Type









Note: MOC 7811 has two case types: Case 354 and Case 354A
We have shown the example of Case 354A


Alternatives for MOC7811

OE-37, M 274, MCT 2E, PC 817


Note: Complete information can be found in the MOC7811 Datasheet linked at the bottom of this page.


Working of the Encoder Module

MOC7811 module has two parts- Emitter and receiver placed in the plastic molding. The emitter side consists of an infrared emitting diode that emits infrared radiations which are collected on the other side of the molding which consists of a detector. The output is generated based upon the light falling over the photodetector. Any interruption between the transmitter and the receiving end will give an output as 0, whereas no interruption would imply 1.


How to use MOC7811 with a Microcontroller

The MOC7811 can be connected to the microcontroller and output can be read. The simplified connections are given below and can be followed while making your own circuit.

MOC7811 Sensor with Arduino


Application of MOC7811

Works as a switch, to monitor on/off signal.

  1. Can be used to determine the RPM of a motor.
  2. Can be used as smoke sensors.
  3. Used in End stops/Parking positions for motors in 3D printers/CNC machines.
  4. To monitor any interruption.


2D Model of MOC7811

Below is the 2D model of the MOC 7811 opto-isolator/coupler. The dimensions are mentioned in inches. You can use the following dimensions to create your own footprints for the MOC module.

MOC 7811 Dimensions

Component Datasheet

Related Post

Join 20K+subscribers

We will never spam you.

* indicates required

Be a part of our ever growing community.