NOTE: DC Motor doesn’t come with this Click board™, if you are interested you can find 2207V-2500KV BLDC Motor in our shop. Or you can buy the full package here.
How does it work?
Angle 5 Click is based on the MA302, a 12-bit digital contactless angle sensor with ABZ and UVW incremental outputs from Monolithic Power Systems. This Click board™ can detect the absolute rotor position of a Brushless motor in real-time, even without a target magnet, by measuring the fringe field of the rotor. The sensor must be positioned at the correct place (in this case below the rotor) to get the maximum value of the rotor magnetic field without being disturbed by other fields. The rotor magnetic field is then measured, and an adequate position was determined from that information. It uses the SPI serial interface for digital angle readout and configuration, alongside with programmable magnetic field strength detection function for diagnostic checks.
The magnetic field is detected with integrated Hall devices located in the center of the package. The angle is measured using the Spinaxis™ method, based on phase detection and generates a sinusoidal signal with a phase that represents the angle of the magnetic field. The angle is then obtained by a time-to-digital converter, which measures the time between the zero-crossing of the sinusoidal signal and the edge of a constant waveform. The time-to-digital represents an output from the front-end to the digital conditioning block. This output delivers a digital number proportional to the angle of the magnetic field at the rate of 1MHz in a straightforward and open-loop manner.
The Angle 5 Click communicates with MCU using the standard SPI serial interface for angle reading and register programming, which supports SPI Mode 0 and 3 and operates at clock rates up to 25 MHz. It also has the magnetic flags used for indication when the magnetic field at the sensor position is out of range, defined by the lower and upper magnetic field thresholds, routed on the PWM and INT pin of the mikroBUS™ socket labeled as MGH and MGL.
This Click board™ possesses an incremental encoder and block commutation function that uses three output pins each: ABZ and UVW. The ABZ output emulates a 10-bit incremental encoder (such as an optical encoder) providing logic pulses in quadrature, while the UVW output emulates the three Hall switches usually used for the block commutation of a three-phase electric motor. The ABZ and UVW pins of the MA302 are routed on two standard 2.54 mm (0.1 inches) pitch 1×3 header, mounted on the Angle 5 Click, so it can be easily accessed by an external application.
This Click board™ is designed to be operated only with a 3.3V logic voltage level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels. However, the Click board™ comes equipped with a library that contains 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 various applications such as detecting the absolute rotor position of a brushless motor in real-time, even without a target magnet, by measuring the fringe field of the rotor.
On-board modules
Angle 5 Click is based on the MA302, a 12-bit digital contactless angle sensor with ABZ and UVW incremental outputs from Monolithic Power Systems.
Key Features
Fast data acquisition, magnetic field strength detection, contactless sensing for long life, supported both end-of-shaft and off-axis, and many more.
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Angle 5 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 |
J1 | M1x3 | – | A, B, Z incremental encoder outputs |
J2 | M1x3 | – | U, V, W block commutation outputs |
Angle 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | 3.3 | +4.6 | V |
Applied Magnetic Filed | 30 | 60 | – | mT |
Magnetic Field Detection Accuracy | – | 5 | – | mT |
Effective resolution | 11 | 11.8 | 12.8 | bit |
Operating Temperature Range | -40 | – | +125 | °C |
Software Support
We provide a library for the Angle 5 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 contains a basic functions for using Angle 5 click.
Key functions:
uint16_t angle5_read_raw_angle ( void )
– Reads Raw Angle datafloat angle5_read_angle_deg ( void )
– Reads Angle data in deg
Examples description
The application is composed of three sections :
- System Initialization – Initializes the SPI module and all necessary GPIO pins.
- Application Initialization – Initializes dvicer init
- Application Task – Reads the angle position of the magnet and log data to USB UART
void application_task ( ) { char demo_text[ 20 ]; char log_txt[ 2 ] = { 13, 0 }; float new_angle = 0; mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( " ", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_TEXT ); new_angle = angle5_read_angle_deg( ); FloatToStr( new_angle, demo_text ); mikrobus_logWrite( " Angle: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_TEXT ); Delay_ms( 100 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI Library
- UART Library
- Converisons Library
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.
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.