How does it work?
Opto Click uses a double pack of the DIP socket VO2630, dual-channel, high-speed optocoupler modules from Vishay Semiconductors, providing electrical isolation between the input and output source. The VO2630 enables a high speed of 10Mbit/s data transfer between its input and output with galvanic isolation utilizing a highly efficient input LED coupled with an integrated optical photodiode detector. The detector has an open drain NMOS-transistor output, providing less leakage than an open collector Schottky clamped transistor output.
The VO2630 works like a switch connecting two isolated circuits, so when the current stops flowing through the LED, the photosensitive device stops conducting and turns off. It guarantees AC and DC performance withstanding 5300Vrms of isolation voltage over a wide temperature range. The outputs of the optocouplers are connected to four pins of the mikroBUS™ labeled IN1-IN4 and routed to the INT, CS, RST, and AN pins of the mikroBUS™ socket.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the I/O Level jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Optocoupler
Applications
Can be used for adding electrical isolation in applications like PLC, ATE input/output isolation, microprocessor system and computer peripheral interface, and more
On-board modules
VO2630 – dual-channel optocoupler modules from Vishay Semiconductors
Key Features
Low power consumption, high blocking voltage, high trigger sensitivity and speed, high efficiency infrared emitting diode, guaranteed AC and DC performance over temperature, and more
Interface
GPIO
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Opto Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | I/O Level | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
Opto Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Isolation Voltage | – | – | 5300 | Vrms |
Data Rate | – | – | 10 | Mb/s |
Software Support
We provide a library for the OPTO Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for OPTO Click driver.
Key functions
-
Function checks the state of OUT1 pin.
-
Function checks the state of OUT2 pin.
-
Function checks the state of OUT3 pin.
-
Function checks the state of OUT4 pin.
Example Description
This example checks the state of selected inputs and prints it.
void application_task ( void )
{
tmp = 1;
for( cnt = 0; cnt < 4; cnt++ )
{
switch ( sel_output & tmp )
{
case 0x01 :
{
check_output = opto_check_out1( &opto );
if ( check_output == 0 )
{
log_printf( &logger, "OUT1 is lowrn" );
}
else
{
log_printf( &logger, "OUT1 is highrn" );
}
break;
}
case 0x02 :
{
check_output = opto_check_out2( &opto );
if ( check_output == 0 )
{
log_printf( &logger, "OUT2 is lowrn" );
}
else
{
log_printf( &logger, "OUT2 is highrn" );
}
break;
}
case 0x04 :
{
check_output = opto_check_out3( &opto );
if ( check_output == 0 )
{
log_printf( &logger, "OUT3 is lowrn" );
}
else
{
log_printf( &logger, "OUT3 is highrn" );
}
break;
}
case 0x08 :
{
check_output = opto_check_out4( &opto );
if ( check_output == 0 )
{
log_printf( &logger, "OUT4 is lowrn" );
}
else
{
log_printf( &logger, "OUT4 is highrn" );
}
break;
}
default :
{
break;
}
}
tmp <<= 1;
}
Delay_ms( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.OPTO
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.