How does it work?
IR Eclipse Click is based on the EE-SX198, a transmissive photomicrosensor with a phototransistor output from Omron. It consists of one infrared transmitter and receiver facing each other and spaced apart by a 3mm slit. The sensor activates when an object in the gap, such as a piece of paper, eclipses the transmitter beam. The object intercepts the optical beam of the emitter, thus reducing the amount of the optical energy reaching the detector. Some smaller objects do not fully intercept the optical beam emitted by LED; therefore, some parts of the beam come to the detector and allow current flow from the phototransistor (considered noise).
The IR Eclipse Click communicates with the host MCU using only the INT line of the mikroBUS™ socket. The INT pin provides information to the MCU about the presence of an object in the gap and about the sensor’s activity. Also, the INT LED serves as a visual indicator of the activated sensor.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the LOGIC LEVEL jumper. This way, both 3.3V and 5V capable MCUs can 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
Optical
Applications
Can be used for printers, copiers, vending machines and other projects that require the photo interrupter ability, detection of a moving part, or even a speed of rotation
On-board modules
EE-SX198 – transmissive photomicrosensor with a phototransistor output from Omron
Key Features
Photo interrupter ability for any application, up to 3mm detection space, detection through digital signal, object detection LED indicator, board compatible with both 3.3V and 5V capable MCUs, and more
Interface
GPIO
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on IR ECLIPSE 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 |
LD2 | INT | – | Object Detection LED Indicator |
– | LOGICAL LEVEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
IR ECLIPSE Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Sensing Distance | – | – | 3 | mm |
Detector Wavelength | – | 850 | – | nm |
Software Support
We provide a library for the Ir Eclipse Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika 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 Ir Eclipse Click driver.
Key functions
- Detecting states of IR beam from EE-SX198 photo interrupter sensor.
Example Description
This is an example of IR ECLIPSE click board.
void application_task ( void )
{
state_new = ireclipse_int_status( &ireclipse );
if ( ( state_new == IRECLIPSE_HIGH ) && ( state_old == IRECLIPSE_LOW ) )
{
state_old = IRECLIPSE_HIGH;
log_printf( &logger, " Counter = %d rn", n_cnt );
n_cnt++;
}
if ( ( state_new == IRECLIPSE_LOW ) && ( state_old == IRECLIPSE_HIGH ) )
{
log_printf( &logger, "--------------------rn" );
state_old = IRECLIPSE_LOW;
}
}
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.IrEclipse
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. A UART terminal is available in all MikroElektronika compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika 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.