Opto 2 click
PID: MIKROE‐3015
Weight: 27 g
Opto 2 click is an optical isolator used to provide an optical galvanic isolation of
sensitive lines. The used optoisolation elements require very low input current to be
driven, down to 1.3mA (min). The speed of the internal optocoupler elements of the
Opto click 2 allows it to work with the signals up to 20MHz. The Opto click 2 can be
used to provide a galvanic isolation of the MCU pins, allowing driving by external
components, while protecting it from surges up to 5kV on the driver side.
Opto click 2 can be used in applications where the input side is under risk of high
voltage surges in a noisy environment. Since it provides a galvanic isolation, the
electrical potential of the input side circuit does not have to be the same as the electrical
potential of the MCU circuit. Featuring the galvanic isolation, Opto click 2 blocks socalled stray currents, that may appear as a result of differences in ground potential, or the
electromagnetic induction. Opto 2 click provides means to drive inputs of the connected
MCU with a wide range of external applications and signals.
How does it work?
Opto 2 click uses four TLP2770, 20-Mbps low-power optocouplers, from Toshiba. These
are fast optocouplers, with their output stages shielded against EMI, allowing them to
work on higher speeds, providing common-mode transient immunity of ±20 kV/μs. The
internal LED elements are driven with 4mA for 5V operation or 2.6mA for 3.3V operation.
The input stages are also equipped with (Schottky) diodes, which prevents inverse
polarization of the LED elements and thus, a permanent damage that might occur in
that case.
The working principle of the optocouplers is quite simple: A photo-emitting element usually a LED, is encapsulated inside the die along with the photo-sensitive element,
which can be a photo-sensitive transistor or a photo-diode. LEDs and photo-sensing
elements are galvanically isolated, making the input and output electrical networks
completely independent of each other. When the LED is biased, it emits light which in
return causes the current to flow through the photo-sensitive element. In these
particular optocouplers, the output stage is additionally conditioned by a Schmitt
trigger and it drives the output transistors which form a totem pole output stage.
Having a totem pole output configuration allows the output stage to both sink and
source current.
The optocoupler inputs - the anodes (labeled as A) and cathodes (labeled as C) of the
internal optocoupler LEDs, are routed to the screw terminals, which allow connection the
external electrical circuit, used to trigger an event on the isolated MCU. The electrical
potential between the anode and the cathode input of each optocoupler element
should stay within the range between 3.3V and 5V.
The optocoupler outputs are routed to the mikroBUS™. The mikroBUS™ pins INT, CS, RST,
and AN, are routed to the optocoupler outputs 1, 2, 3, and 4, respectively, and are
labeled as IN1, IN2, IN3, and IN4. As already mentioned, the output stages are
conditioned with the Schmitt trigger circuit, reducing the input noise sensitivity and
false triggering. The Faraday shield protects the output stages against EMI and provides
common-mode transient immunity of ±20 kV/μs. Although these mikroBUS™ pins are
labeled as IN1 to IN4, they are actually outputs from the optocouplers, and it is highly
recommended to use them as the INPUT pins on the host MCU.
The Click board™ is equipped with an SMD jumper labeled as LOGIC, which allows
selection of the voltage, applied to the optocoupler output stage. This voltage
effectively determines the logic voltage level for the MCU pins. It can be selected
between 3.3V and 5V, allowing this Click board™ to be interfaced with both 3.3V and 5V
MCUs.
The provided library offers functions that simplify and speed up the application
development. The included example application demonstrates their use. This application
can be used as a reference for custom projects.
Specifications
Type
Optocoupler
Used for isolation MCU input pins from the influence of the external
Applications
circuitry, for interfacing an MCU with the electric circuit that works
on a different potential
On-board
modules
TLP2770, a 20-Mbps low-power optocoupler, from Toshiba.
High isolation voltage of the galvanic barrier - up to 5kV, Faraday
Key Features
shield on the output stage, providing common-mode transient
immunity of ±20 kV/μs, screw terminals for easy connection, low
current consumption, high input sensitivity.
Interface
GPIO
Input Voltage
3.3V or 5V
Click board
M (42.9 x 25.4 mm)
size
Pinout diagram
This table shows how the pinout on Opto 2 click corresponds to the pinout on the
mikroBUS™ socket (the latter shown in the two middle columns).
Notes
Pin
Pin
Notes
Optocoupler 4 OUT
IN4
1
AN
PWM
16
NC
Optocoupler 3 OUT
IN3
2
RST
INT
15
IN1
Optocoupler 2 OUT
IN2
3
CS
RX
14
NC
NC
4
SCK
TX
13
NC
NC
5
MISO
SCL
12
NC
NC
6
MOSI
SDA
11
NC
+3.3V
7
3.3V
5V
10
+5V
Power supply
GND
8
GND
GND
9
GND
Ground
Optocoupler 1 OUT
Power supply
Ground
Onboard settings and indicators
Label
Name
Default
LD1
PWR
-
JP1
LOGIC
Left
Description
Power LED indicator
Logic voltage level selection: left position 3.3V, right
position 5V
Opto 2 click electrical characteristics
Description
Min
Typ
Max
Unit
Input forward current (IF)
-
-
8
mA
Peak transient input forward current (IFPT)
-
-
1
A
Output current (IO)
-
-
10
mA
Software support
We provide a library for Opto 2 click on our Libstock page, as well as a demo application
(example), developed using MikroElektronika compilers. The demo application can run
on all the main MikroElektronika development boards.
Library Description
The library performs the check procedure for the desired outputs (IN1 - IN4). For more
details check the documentation.
Key functions:
uint8_t opto2_checkOut1( void ) - The function checks the state of the OUT1 pin.
Examples Description
The demo application is composed of three sections:
System Initialization - Initializes peripherals and pins.
Application Initialization - Initializes GPIO driver and selects the outputs (OUT1 - OUT4) which
state be checked.
Application Task - (code snippet) - Performs the check procedure for selected outputs and logs
the states from the outputs on USB UART. Repeats the check procedure every 2 seconds.
void applicationTask()
{
tmp = 1;
for (cnt = 0; cnt