Technical Reference Manual: (Hardware Version: 2.1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

(Hardware Version: 2.

1)

TECHNICAL REFERENCE
MANUAL

Prepared by
IoT Group

Centre for Development of Advanced Computing


(CDAC)
Knowledge Park, Bangalore
CDAC-Bangalore

Document History

Revision History
Version Description Date Modified by Approved by
1.0 Initial Document 10-04-2016 Kaushik, Thajudheen

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 1


CDAC-Bangalore

Contents

Contents ............................................................................................. 2
1. Introduction ................................................................................ 4
2. Definitions ................................................................................... 4
3. Literature .................................................................................... 4
4. Components required for minimal network setup ............................. 5
5. Hardware Architecture .................................................................. 5
Component Description ...................................................................... 6
Connectors ....................................................................................... 7
USB Connector ............................................................................... 7
Li-Po/Li-Ion Battery Connector ......................................................... 7
Expansion Header (UbiSense/UbiDAC Header) .................................... 8
Debug Header ................................................................................ 8
Antenna Connector ......................................................................... 9
Switches ........................................................................................... 9
RESET Switch ................................................................................ 10
USER Switch ................................................................................. 10
Power Switch................................................................................. 10
Indicator LEDs .................................................................................. 10
Power Indicators ............................................................................ 11
User LEDs ..................................................................................... 11
Crystals ........................................................................................... 12
16MHz Crystal Oscillator (HFCLK Clock) ............................................ 12
32.768 KHz Crystal Oscillator (LFCLK Clock) ...................................... 12
Major ICs ......................................................................................... 12
Hardware Description ........................................................................ 13
Power Management ........................................................................ 13
Battery Charger ............................................................................. 13
Power (LDO) Regulator ...................................................................... 14
Microcontroller & Peripherals .............................................................. 14
Bluetooth Low Energy SoC (nRF51822) ............................................... 14

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 2


CDAC-Bangalore

USB to UART Bridge (CP2102) ............................................................ 14


Debug Interface ............................................................................... 15
RF Interface ..................................................................................... 15
6. Basic Operations ......................................................................... 16
Connecting Li-Ion/Po battery to the BLE Mote ...................................... 16
Connecting to PC with USB/Serial ....................................................... 16
Programming & Debugging ................................................................ 17
7. Software Development Guide........................................................ 17
Programming with BLE Stack (SoftDevice): .......................................... 21

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 3


CDAC-Bangalore

1. Introduction

The BLE-Mote is a low power WPAN (Wireless Personal Area Network) Node
complaint to Bluetooth 4.0 standards with support for Low Energy Profile.
The device is suitable for various WPAN application developments including
Health/fitness monitoring, Wireless remote, Beacon Tag etc.
The robust RF front end with state of the art Security Engines and efficient
power management system makes it suitable for various practical
deployments.
This User manual gives an overview of the hardware architecture & a detailed
description of its operations. Each segment of the document refers to specific
hardware component or subsystem which may not include all the technical
information. Further information can be found in the corresponding
component datasheets and the documents mentioned in Literature section.

2. Definitions

WPAN Wireless Personal Area Network


BLE Bluetooth Low Energy
RF Radio Frequency
VCOM Port Virtual COM Port. It enables Serial Communication Port over
USB Interface
RSSI Received Signal strength Indication
SoC System on Chip
PA Power Amplifier
LNA Low Noise Amplifier
BALUN Balancing Unbalancing

3. Literature

 nRF51822Information–
https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF51822
 CP2102 Information-
https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.a
spx
 Bluetooth Low Energy- https://www.bluetooth.com/what-is-bluetooth-
technology/bluetooth-technology-basics/low-energy

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 4


CDAC-Bangalore

4. Components required for minimal network setup

The following components are required for demonstrating BLE Mote


functionality
 BLE Mote
 External 2.4GHz Antennae (*required for external antenna type only)
 Micro USB cable
 Debuggers and supporting software
Optional*
 Single cell Li-Po/Li-Ion Battery/5V USB adaptor.
 CDAC's Data Acquisition Card - (Ubi-DAC)
 CDAC's Sensor Board- (UbiSense)
 Mobile Phone/Tablet with BLE support
*The components requirement may vary depending upon the application.

5. Hardware Architecture

This section includes overall technical details of BLE Mote Hardware. The
Figure-1 below shows the main components on the device.

(Figure 1: Architectural block diagram of BLE Mote)

The main elements of the Mote are

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 5


CDAC-Bangalore

 Nordic Semiconductors’ nRF51822, an ARM CortexM0 based SoC with


32KB on-chip RAM and 256KB on-chip flash with an integrated2.4GHz RF
transceiver for Bluetooth Low energy.
 Balancing-Unbalancing Circuit (BALUN)
 2.4 GHz On board Chip antenna or u.FL Antenna Connector
 Expansion header for interfacing UbiSense/UbiDAC
 Debug (SWD) Connector for programming and debugging
 USB interface through a USB-to-UART bridge IC.
 Power through USB Connector, Li-Po Battery
 Low noise LDO Voltage Regulator
 Onboard Li-Po/Li-Ion Battery charger

(Figure 2: Various components on BLE Mote)

Component Description
This section contains a brief description about various hardware components
of BLE Mote. Figure-2 shows the location of various elements and are
described in the following section.
 Connectors
 Switches
 Indicator LEDs
 Configuration Setups
 Major ICs

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 6


CDAC-Bangalore

Connectors

USB Connector
This standard Micro USB connector (P3) can be used for connecting the Mote
with PC for supplying power & data transfer. The USB interface can be used
to transfer data between the mote & the Computer (using virtual com port)
with the help of onboard USB-UART BridgeIC (CP2102). Figure-3 shows the
position of USB connector.

(Figure 3: Micro USB connector)

Li-Po/Li-Ion Battery Connector


The J2Header is a Li-Ion/ Li-Polymer battery connector. This 2pin connector
hasVCC_LI-ION_CHG (Pin-1)and GND (Pin-2). Figure-4 shows the location of
Li-Po/Li-Ion rechargeable Battery Connector. A single cell (3.7V)
rechargeable Li-Ion/Li-Po battery should be connected to this terminal.
Connecting any higher voltage/ different chemistry battery may damage the
device. Though the battery capacity may be chosen as per the application
requirement, it is recommended to use a 3.7V rechargeable Li-Ion/ Li-Po
battery of capacity up to 1000mAh. Higher capacity battery may take very
long time to charge as the maximum battery charging current is limited to
450mA by the charge controller.

(Figure 4: Li-Ion/Po Battery Connector)

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 7


CDAC-Bangalore

Expansion Header (UbiSense/UbiDAC Header)


This is a standard 14 pin header meant for connecting CDAC's Add-On cards
like UbiSense or UbiDAC. The connector pin out is given below.Figure-
5showsthe location of this connector. For more details on UbiSense&UbiDAC
refer to the corresponding User manuals. Table-1 gives the functional
description of 14 pin Header. (Note- The functionality of the BLE SoC
nRF51822 are user configurable)

(Figure 5: Expansion Header)

Pin Name Function Pin No Pin No Function Pin Name


VCC_MCU VCC 1 2 GND GND
P0.10 I2C_SCL 3 4 I2C_SDA P0.11
P0.13 SPI_MOSI 5 6 SPI_MISO P0.14
P0.15 SPI_CLK 7 8 SPI_CS P0.16
P0.17 GPIO_INT 9 10 GPIO_INT P0.18
P0.19 UART_TX 11 12 UART_RX P0.20
P0.05 GPIO_ADC 13 14 GPIO_ADC P0.29
(Table 1: Expansion Header Pin Description)

Debug Header
A 10pin Male Box header (P1) has been provided as a hardware debug
interface for the nRF51822 BLE SoC. This header contains theSWD (Serial
Wire Debug) interface and the location of this headeris shown in figure-6
below. The pin out is compatible to the standard ARM 10 Pin connector
(Ulink2 Type). This 10 pin header can be connected to a standard 20Pin JTAG
header of aUlink (or similar debugger) with the help of an external 10Pin to
20 Pin Adaptor. The BLE Mote can be connected to a SWD ARM Debugger
through a 10-to-20 Pin adaptor and the debugger can be connected to a host
PC through USB as shown in Figure-7.

(Figure 6: Debug Header)

Pin Name Function Pin No Pin No Function Pin Name


BLE-Mote_2V1: Technical Reference Manual v1.0 Page 8
CDAC-Bangalore

VCC_MCU VCC 1 2 SWDIO SWDIO/nRESET


GND GND 3 4 SWCLK SWDCLK
GND GND 5 6 SWO NC
NC NU 7 8 NU NC
GND GND 9 10 RESET MC_RESET
(Table2: Debug Header Pin Description)

(Figure 7: Debug Connection)

Antenna Connector
The BLE Mote hastwo options for antenna. Either an onboard ceramic chip
antenna which can be directly soldered to the PCB or an external Antenna
which can be connected with the uFL connector. The external antenna should
bea 2.4GHz 50OhmsuFL antenna. If a suitable uFL antenna is not available, a
SMA type antenna can also be connected using a uFL to SMA cable. Figure-8
shows the location of the eternal antenna connector.

(Figure 8: External uFL or SMA Antenna Connection)

Switches
Two (Stacked) push-button tactile switches (SW1) have been provided on the
BLE Mote.One for the Microcontroller RESET and the other for User Key.Both
the switches are stacked as shown in Figure- 9 below.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 9


CDAC-Bangalore

(Figure 9: Switch Positions)

RESET Switch
The BLE Mote has a dedicated reset button for nRF51SoC Hardware Reset.
The Upper button of SW1 is connected to the low active SWDIO/nRESET (Pin
23) signal of the SoC with a pull-up and series resistor. The default state of
this signal is high. Pressing push button S2 drives the reset signal low to
hardware reset the BLE SoC and the USB-UART Bridge IC. The BLE SoC (and
USB-UART bridge) remains in power down/reset mode until S2 is released.
After releasing SW1, the BLE SoC follows the power on reset sequence. If the
user does not want to reset the USB-UART bridge IC when the SW1 is
pressed, they can remove R14.

USER Switch
The Lower button of the Push button switch SW1 is connected to a GPIO pin
(P0.07/PUSH_BUTTON) of the BLE SoC. This is a user configurable switch,
which can be used as an external hardware input to the BLE SoC. This is
connected to Pin11 of the SoC with a pull up resistor. The default state is
high for this Pin, upon pressing User Key drives the signal low.

Power Switch
There is a power switch provided in BLE Mote to switch ON/OFF the power
supply to the device. This switch is a 6Pin SPDT push button switch which
opens/closes the power supply from the LDO to the ICs. Power supply to the
Li-Ion battery charger is not controlled by this switch (which allows battery
charging even while the device is OFF)

Indicator LEDs
There are 4LED indicators present on BLE Mote to indicate various events
related to power & application status. The locations of the LEDs are shown in
Figure-10 below.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 10


CDAC-Bangalore

(Figure 10: LED Indicator Positions)

Power Indicators
Two LED indicators are mounted on BLE Mote for indicating Power status.
The Table-3 below gives the details about LED indication.

LED Function Indication


Name
D3 Device Power ON VCC_MCU is available and Valid (Device is
(Power Status ON)
ON LED) OFF VCC_MCU is not available or not Valid
(Device is OFF)
D4 Battery ON Battery charging
(Charge Charging OFF No battery charging / Charging
ON LED) status Completed
(Table 3: Power LED Indicators)

User LEDs
Two user LEDs (D1 &D2) have been provided for configurable output
indication from the BLE SoC. These LEDs are connected to the GPIO pins of
the BLE Soc as shown in Table-4 below. Driving these Pins low through
program enables the LEDs to Glow. These LEDs can be used for any
application as per user requirement.

LED Connected Function Indication


Name to
D1 (User P0.24 (Pin User ON When GPIO (P0.24) is Logic Low
LED-1) 43) defined OFF When GPIO (P0.24) is Logic High
D2 (User P0.22 (Pin User ON When GPIO (P0.22) is Logic Low
LED-2) 41) defined OFF When GPIO (P0.22) is Logic High
(Table 4:User LED Indicators)

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 11


CDAC-Bangalore

Crystals
The BLE SoC nRf51822 requires two external clock inputs i.e. a High
frequency clock and a low frequency clock. To provide the clocks, two
crystals X1 &X2 are available on BLE Mote. These are required for proper
operations of the SoC. Location of the crystals are shown in Figure-11 below.
When the external 32.768 KHz crystal is not available the internal RC
oscillator is automatically activated. This clock can be used when accuracy is
not important.

(Figure 11: Crystal Positions)

16MHz Crystal Oscillator (HFCLK Clock)


The external crystal oscillator X1 is available on the BLE Mote to supply
16MHZ clock signal to the BLE SoC. This is the source for the HFCLK clock of
the SoC. This crystal has been connected between XC1 (Pin37) & XC2
(Pin38) of the SoC. To achieve correct oscillation frequency, the load
capacitance must match the specification in the crystal data sheet, which has
been calculated to be 12pF for the BLE Mote.

32.768 KHz Crystal Oscillator (LFCLK Clock)


The external crystal oscillator X2 is available on the BLE Mote to supply
32.768 KHz clock signal to the BLE SoC. This is the source for the LFCLK
clock of the SoC. This crystal has been connected between XL1 (Pin46) & XL2
(Pin45) of the SoC. To achieve correct oscillation frequency, the load
capacitance must match the specification in the crystal data sheet, which has
been calculated to be 12pF for the BLE Mote.

Major ICs
The BLE Mote is based on nRF51822 SoC. It also has some associated ICs for
Power Management, RF & Peripheral related functions. The Table-5 given
below describes about each of the IC functionality.
BLE-Mote_2V1: Technical Reference Manual v1.0 Page 12
CDAC-Bangalore

IC Part No Vendor Type/Function Description


nRF51822 Nordic Bluetooth Low ARM Cortex-M0 based BLE
Semiconductors Energy SoC SoC with integrated RF
Transceiver.
CP2102 USB to UART USB to UART Bridge
Bridge
AAT3681A Li-Ion Battery Li-Ion Battery Charger
Charger
AP7333- LDO for Low Noise LDO regulator
33SAG VCC_MCU
(Table 5: List of Major ICs)

Hardware Description
This section of the document describes the various operations related to BLE
Mote and the corresponding ICs. Each functional module has been described
separately.

Power Management
The BLE Mote has smart power management system for efficiently powering
various components of the mote. This mote can be powered through USB or
Li-Po/Li-Ion Battery.

(Figure12: Power Management Block in BLE Mote)

Battery Charger
The power obtained from the sources is fed to the Battery Charger IC
through diodes. The battery charger IC AAT3681Ais a Li-Ion / Li-Polymer
Battery Charge Management Controller with programmable maximum charge
current. In BLE mote design this has been programed for 450mA. This
charger IC can take a voltage upto7.5V and supply to the Li-Ion battery for

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 13


CDAC-Bangalore

charging. The IC is intelligent enough to choose between the different charge


methods for charging the battery.The charging status of the battery is
indicated with the Charge ON LED indicator (D4). The Battery charge
management IC works only when the external Li-Ion/Li-Po battery is
connected (in correct polarity) to the Li-Ion battery Header (J2).

Power (LDO) Regulator


The power regulator (LDO) IC AP7333-33is used to get a 3.3V fixed &
smooth DC voltage irrespective of the input source (USB)/ Li-Ion battery
voltage. This is a fixed output type voltage regulator which does not require
any external resistor divider or feedback circuit.

Microcontroller & Peripherals


The Microcontroller & Peripheral subsystem consists of anRF51822 BLE SoC,
a CP2102UART-USB Bridge, a Debug Interface (SWD), a Expansion Header,
User Keys and LEDs. These elements are shown in Fugure-13.

(Figure 13: BLE SoC and peripheral ICs)

Bluetooth Low Energy SoC (nRF51822)


The nRF51822 BLE SoC is the ideal System-on-Chip (SoC) for various low
power Bluetooth Low Energy based Wireless Personal Area Network (WPAN)
applications. The device combines a low power ARM Cortex-M0 based MCU
system with up to 32KB on chip RAM and up to 256KB on-chip flash with a
robust 2.4GHzRF transceiver compliant to Bluetooth 4.0 (LE) standards. This
enables the device to handlenetwork stacks with security, demanding
applications, and over-the-air download.

USB to UART Bridge (CP2102)


The BLE SoC does not have a USB port. So an external UART to USB bridge
IC has been used in BLE Mote to provide USB connectivity. TheUSB to UART

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 14


CDAC-Bangalore

bridge IC has both USB & UART controllers, which converts the USB data to
UART and Vice versa. The USB signals are connected to the USB Port (P3)
and the UART signals are connected to the BLE SoC as shown in below Table-
6. The CTS and RTS signals have been provided for hardware flow control,
but this is optional. User can operate the device in software flow control
modealso. When P3 is connected to a PC it appears as a virtual COM port in
the PC which can be accessed with a terminal (hyper terminal/ Putty,
Minicom etc.) with proper settings.

CP2102 Functionality Connected to


Pin (Pin of
Name nRF51822)
TXD Asynchronous data output (UART Transmit) RXD (P0.20)
RXD Asynchronous data input (UART Receive) TXD (P0.19)
CTS Clear To Send control input (active low) RTS (P0.21)
RTS Ready to Send control output (active low) CTS(P0.23)
SSPND This pin is driven high when the CP2102enters GPIO (P0.25)
the USB suspend state.
RST_N CP2102 RESET Active Low (Open Drain) MC_RESET
(Table 6:CP2102 Signal Connections)

Debug Interface
The BLE SoC supports ARM Serial Wire Programming& Debug interface. The
ARM-SWD compatible 10pin interface P1provides connection to the
Programmer hardware (e.g. uLInk, J-Link, ST-Link). An external 10 to 20 Pin
adaptors may be required for connecting P1 to a standard debugger.

RF Interface
In BLE Mote, the radio frequency transceiver is built in to the SoC. The RF
signal out from the SoC is differential 2.4 GHz modulated signal. This
differential signal required to be converted to a single ended signal with the
help of a BALUN (Balancing-Unbalancing) circuit. In BLE mote a chip BALUN
has been used for better performance and robustness.
The Input differential impedance of the BALUN is matched with the complex
conjugate output impedance of the SoC. The output impedance of the BALUN
is matched with the antenna of 50Ohms.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 15


CDAC-Bangalore

6. Basic Operations

Connecting Li-Ion/Po battery to the BLE Mote


The BLE Mote has onboard Li-Ion/Polymer battery charger IC, which takes
care of the charging, discharging and monitoring of the battery. To enable
the battery functionality, an external 3.7V rechargeable Li-Ion/Po battery
should be connected. It is recommended to use a 1000mAh battery to the
port J2 (as shown in Figure-16). It is very important to connect the battery
with correct polarity as shown in below figure. Wrong polarity may damage
the board permanently. The battery should be connected to the port J2
before supplying external source (USB). A USB power bank can also be used
for supplying to the BLE Mote.

(Figure 16: Connecting external Li-Ion/Po to BLE Mote)

Connecting to PC with USB/Serial


The BLE Mote can be connected to a PC using a micro USB cable. A micro
USB Male (Type-B or AB) to standard USB (Type-A) is recommended for this
purpose.

(Figure 14: Connecting BLE Mote to a PC using USB Cable)

When the BLE Mote is programmed (for serial data) and operational, the
above mentioned method can be followed to connect it to a host PC. In the
host PC, a serial terminal application such as Putty, Hyper terminal (for
Windows) or Minicom (for Linux) can be used for monitoring data. The serial

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 16


CDAC-Bangalore

terminal can be configured for the same baud rate as programmed in the BLE
mote and other settings accordingly.

Programming & Debugging

JTAG Debugger will be connected to BLE Mote through a 20pin to 10pin


converter. For programming and debugging please refer to Software
Development Guide (section 7).

(Figure 15: Connecting Debugger to BLE Mote)

7. Software Development Guide

Steps:

1. If you have Keil MDK-ARM Lite already installed, go to step 2.


Otherwise, download and install Keil MDK-ARM Lite from
https://www.keil.com/demo/eval/arm.htm to your hard drive.

2. Install JTAG Debugger (SEGGER J-Link) Application. Download and run


the J-Link Software and documentation pack for Windows from
http://www.segger.com/jlink-software.html

3. During installation you will be prompted to select the IDE that should
be updated with the latest SEGGER DLLs. Check the box for Keil MDK and
any other IDEs you want to use with SEGGER.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 17


CDAC-Bangalore

4. Open Keil MDK-ARM. Go to Project->Manage->Pack Installer


5. Click on Refresh button. Select Nordic Semiconductor ->
nRFDeviceFamilyPack and click Install button

6. Copy nrf51822_SDK from DVD provided and Extract it.


7. In Keil MDK-ARM, open the project
<your folder>\nrf51822_SDK\Board\BLE_Mote\blinky_example\arm\
blinky.uvprojx and build the project.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 18


CDAC-Bangalore

8. Connect the JTAG debugger and Micro USB to BLE-Mote and power
ON the device.

9. In Keil MDK-ARM, go to Project->Options for Target-> Debug.


Select J-LINK and click on settings

10. In Debug menu, Select Port as SW, Max Clock as 20KHz. Device
will appear on the SW Device menu.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 19


CDAC-Bangalore

11. Got to Flash Download menu, select Program, Verify, Reset and
Run. And click OK.

12. Now click on Download button to flash the code into BLE Mote and
the User LEDs will start blinking now.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 20


CDAC-Bangalore

Programming with BLE Stack (SoftDevice):

While working with Bluetooth application, need to flash SoftDevice .hex file
before flashing the application code. To flash SoftDevice use J-Flash Lite
application. Instructions as follows.

1. Open J-Flash Lite as administrator

2. Select Device as nRF51822_xxAA, Interface as SWD and Speed


as 20. Click OK.

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 21


CDAC-Bangalore

3. Choose Data File as <your folder>\nrf51822_SDK\SoftDevice\


s110_nrf51822_7.0.0_softdevice.hex and click on Program.

4. Now program the BLE application from Keil MDK-ARM as explained


above. BLE example projects can be found in <your
folder>\nrf51822_SDK\Board\BLE_Mote\BLE\

BLE-Mote_2V1: Technical Reference Manual v1.0 Page 22

You might also like