Our new website is in BETA! If you would like to take a look then please visit new.dizzy.co.za :-).

+27 (0)11 022 5323 +27 (0)64 681 8495
- -
Index Counter Click (Go to Parent Category)

Index Counter Click

Index Counter Click is a simple prototyping high precision Hall-Effect switch solution with direction detection. This board is hosting TLE4966K an integrated circuit dual Hall-effect sensor from Infineon. The sensor is designed specifically for highly accurate applications which use a rotating pole wheel since offers high sensitivity and high stability of the magnetic switching points. Since this sensor is based on two hall probes that provide information about direction and speed of the moving wheel, this makes this product excellent choice for applications such as index counting, rotational speed and direction applications, motor driven position systems.

Index Counter Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.

R110  Qty:
Price ex. VAT. Weight: 16g. Stock: Lead-time applicable [i]. mikroE Icon
  • Description

How does it work?

The Index Counter Click is based around the TLE4966K, which is a high sensitivity and high stability of the magnetic switching points sensor with reverse battery protection (-18 V). This sensor has many features that make it a perfect solution for small designs such as the Index Counter Click board™. One of these features is certainly its high level of integration that allows a minimal number of external components.

index counter click

The TLE4966K provides excellent temperature compensation capability for keeping the output stable under changing temperature. It is designed specifically for highly accurate applications with a speed signal for every magnetic pole pair, as well as direction information. The TLE4966 Hall Sensors feature two integrated and calibrated sensor elements for detecting direction and counting indexes. This feature eliminates the need for a second sensor and cuts engineering and production costs. Using just one sensor also raises system quality and reliability.

The chopped Double Hall Switch comprises two Hall probes, bias generator, compensation circuits, oscillator, and output transistors.

The bias generator provides currents for the Hall probes and the active circuits. Compensation circuits stabilize the temperature behavior and reduce technology variations.

The Active Error Compensation rejects offsets in signal stages and the influence of mechanical stress to the Hall probes caused by molding and soldering processes and other thermal stresses in the package. This chopper technique together with the threshold generator and the comparator ensures high accurate magnetic switching points.


Type Optical
Applications Index Counter Click is excellent choice for applications such as index counting, rotational speed and direction applications, motor driven position systems.
On-board modules TLE4966K, an integrated circuit double Hall-effect sensor
Key Features High sensitivity and high stability of the magnetic switching points, reverse battery protection (-18 V), superior temperature stability
Interface GPIO
Compatibility mikroBUS
Click board size S (28.6 x 25.4 mm)
Input Voltage 3.3V or 5V

Pinout diagram

This table shows how the pinout on Index Counter Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).

Notes Pin Mikrobus logo.png Pin Notes
Direction DIR 1 AN PWM 16 NC
Speed SPD 2 RST INT 15 NC
NC 3 CS RX 14 NC
Power Supply 3.3V 7 3.3V 5V 10 5V Power Supply
Ground GND 8 GND GND 9 GND Ground

Onboard settings and indicators

Label Name Default Description
LD1 PWR - Power LED Indicator
JP1 VCC SEL Left Power supply voltage selection: left position 3V3, right position 5V

Software Support

We provide a library for the Index Counter Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Library Description

The library covers all the necessary functions to control Index Counter click board. The library contains a function that shows the status of the pins - direction and speed.

Key functions:

  • uint8_t indexcounter_get_dir ( void ) - Get state of the direction pin function.
  • uint8_t indexcounter_get_speed ( void ) - Get state of the speed pin function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes GPIO, sets DIR ( AN ) and SPD ( RST ) pins as input and begins to write a log.
  • Application Initialization - Initialization driver enables - GPIO, performs a control of the timer counter ( resolution of 1ms ) and sets the value of the timer counter, starting timer and number of pairs of rotating poles, also write log.
  • Application Task - (code snippet) This is an example which demonstrates the use of the Index Counter click board. This example shows the direction of movement, Rotations Per Minute ( RPM or speed ) of the three pairs of rotating poles positioned in the sensor operating range. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
    speed_state = indexcounter_get_speed( );
    dir_state = indexcounter_get_dir( );

    if ( enable_speed && speed_state )
        pulse_ms = time_cnt - start_timer;
        start_timer = time_cnt;
        speed_rpm = INDEXCOUNTER_ONE_MIN_CONV_MS / ( pulse_ms * n_pole_pairs );
        enable_speed = INDEXCOUNTER_SPEED_DISABLE;

        log_display ( speed_rpm );

    if ( ( !enable_speed ) && ( !speed_state ) )
        enable_speed = INDEXCOUNTER_SPEED_ENABLE;

  • void log_display ( float rpm_val ) - The function displays all results and a float value with a comma with two decimal places.

The full application code, and ready to use projects can be found on our LibStock page.

Other mikroE Libraries used in the example:

  • GPIO
  • UART

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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.


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.