How does it work?
UNI HALL Click is based on the US5881, a unipolar Hall-effect switch designed in mixed signal CMOS technology from Melexis Technologies. The US5881 comes with very low magnetic sensitivity based on mixed-signal CMOS technology. It integrates a voltage regulator, a Hall sensor with a dynamic offset cancellation system, a Schmitt trigger, and an open-drain output driver, all in a single package. Its sensitivity enables high accuracy in position sensing by using a small air gap, making it suitable for various automotive, consumer, and industrial applications.
The US5881 exhibits unipolar magnetic switching characteristics. Therefore, it operates only with one magnetic pole – North. Applying a North magnetic pole greater than a magnetic operating point of 25mT, facing the branded side of the package, switches the output of the US5881 to a LOW logic state. In this way, it is possible to determine the pole of the magnet using the information that the host MCU receives from the sensor via the INT line of the mikroBUS™ socket. It is also possible to visually identify the magnet’s North Pole via an onboard red LED. Removing the magnetic field switches the output HIGH. The opposite magnetic pole facing the branded side does not affect the output state.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the LOGIC 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
Magnetic
Applications
Can be used for use in automotive and solid switch applications
On-board modules
US5881 – unipolar Hall-effect switch from Melexis Technologies
Key Features
Low power consumption, very low magnetic sensitivity, mixed signal CMOS technology, chopper-stabilized amplifier stage, sensitive only to North pole magnetic field, North pole indicator, 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 UNI HALL 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 | – | – | Magnetic North Pole LED Indicator |
JP1 | LOGIC LEVEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
UNI HALL Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Operating Point | 15 | 25 | 30 | mT |
Release Point | 9.5 | 20 | 28 | mT |
Software Support
We provide a library for the UNI HALL 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 way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for UNI HALL Click driver.
Key functions
- Detecting north pole magnetic fields status function.
Example Description
This is a example which demonstrates the use of UNI HALL Click board.
void application_task ( void )
{
unihall_state = unihall_detecting_magnetic_fields( &unihall );
if ( ( unihall_state == UNIHALL_NORTH_POLE_NOT_DETECTED ) && ( unihall_state_old == UNIHALL_NORTH_POLE_DETECTED ) )
{
unihall_state_old = UNIHALL_NORTH_POLE_NOT_DETECTED;
log_printf(&logger, " ~ NOT DETECTED ~rn");
}
if ( ( unihall_state == UNIHALL_NORTH_POLE_DETECTED ) && ( unihall_state_old == UNIHALL_NORTH_POLE_NOT_DETECTED ) )
{
log_printf(&logger, " ~ DETECTED ~rn");
unihall_state_old = UNIHALL_NORTH_POLE_DETECTED;
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.UniHall
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 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.