BLE 4 click is a Click board™ which provides Bluetooth Low Energy connectivity for any embedded application. It features the NINA-B312, an integrated wireless connectivity solution. The NINA-B312 module itself is based on the nRF52840 chip, a flexible, efficient Bluetooth 5 and Bluetooth mesh multiprotocol SoC. Armed with such a powerful processor, the NINA-B312 can achieve data rates of up to 2 Mbps and up to 5 dBm maximum radiated output power using internal antenna, ensuring a reliable connection and good signal coverage. BLE 4 click is ideal for small smart devices like home automation sensor and fitness applications that need to require really low power consumption and long battery life.
How does it work?
BLE 4 click is equipped with the NINA-B312, Stand-alone Bluetooth 5 low energy module by u-blox, which is based on the nRF52840 chip. The nRF52840 is the mid-range member of the nRF52 Series SoC family. It meets the challenges of a broad range of applications that need Bluetooth 5 feature sets, protocol concurrency and a rich and varied set of peripherals and features. In addition, it offers generous memory availability for both Flash and RAM. It is operated by a set of AT commands, over the UART interface, which makes the BLE 4 click very easy to use.
By integrating most of the critical components on the chip, the NINA-B312 allows the module to overcome any imperfections of external discrete components, allowing signal transmission power of up to 10dBm, and -94 dBm sensitivity for the receiver, using the on-chip antenna.
The NINA-B312 module is built around an ARM® Cortex™-M4 CPU with floating point unit running at 64 MHz. It has NFC-A Tag for use in simplified pairing and payment solutions, as well as numerous digital peripherals and interfaces such as PDM. Therefore, BLE 4 Click has the onboard 2-pin header, that can be used for connecting the optional NFC antenna. It is also fully multiprotocol capable with full protocol concurrency. It has protocol support for Bluetooth 5, Bluetooth mesh, and 2.4 GHz proprietary stacks.
Besides the mikroBUS™ socket, BLE 4 click also features two onboard buttons T1 and T2. These buttons can be used for various purposes and user programmable. This Click Board™ also has an onboard user programmable RGB LED – LD2, which in combination with the mentioned buttons can be used for various purposes for basic user interaction without any external components required besides the BLE 4 click.
This Click Board™ is designed to be operated only with 3.3V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V.
Specifications
Type
BT/BLE
Applications
Medical equipment and fitness applications, IoT devices, home automation, smart energy, etc.
On-board modules
NINA-B312, Stand-alone Bluetooth 5 low energy module by u-blox
Key Features
ARM® Cortex™-M4 CPU, integrated antenna, support for Bluetooth 5, Bluetooth mesh, ANT and 2.4 GHz proprietary stacks, onboard tacticle switches and RGB LED
Interface
GPIO,UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on BLE 4 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 | STATUS | – | User programmable RGB LED Indicator |
T1,T2 | – | – | User programmable tactile switches |
J1 | – | – | External NFC Antenna Connection Header |
Software Support
We provide a library for the BLE 4 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 BLE 4 Click board. A library performs the communication with the NINA-B312-00B series Bluetooth® 5 low energy module via UART interface.
Key functions:
void ble4_uartWrite( uint8_t *txData )
– UART write function.void ble4_setDeviceName( uint8_t *deviceName )
– Set device name setting function.uint8_t ble4_readByte()
– Read Single Byte.
Examples description
The application is composed of three sections :
- System Initialization – Initializes UART, sets AN and INT pin as input and RST, CS and PWM pin as output and start to write log.
- Application Initialization – Initialization driver enables – UART, hardware reset BLE module, restores factory settings of the module, set device name, select data mode and start to send data.
- Application Task – (code snippet) – This is an example which demonstrates the use of BLE 4 Click board. If ‘READ’ – repeatedly sends string “mikroE”. If ‘WRITE’ – receives messages from NINA-B3 series Bluetooth® 5 low energy module and LOGs received message. Results are being sent to the Usart Terminal where you can track their changes.
void applicationTask() { char tmp; uint8_t rdyFlag; if ( moduleMode == _BLE4_READ_MODE ) { rdyFlag = ble4_byteReady(); if ( 1 == rdyFlag ) { tmp = ble4_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } } else if ( moduleMode == _BLE4_WRITE_MODE ) { for ( cnt = 0; cnt < 9; cnt++ ) { ble4_writeByte( MESSAGE_DATA[ cnt ] ); Delay_1sec(); } Delay_1sec(); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- 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.
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.