User Manual: Da14585 Getting Started Guide With The Iot Multi Sensor Development Kit
User Manual: Da14585 Getting Started Guide With The Iot Multi Sensor Development Kit
User Manual: Da14585 Getting Started Guide With The Iot Multi Sensor Development Kit
The focus of this User Manual is to easily introduce the IoT Multi sensor Kit. This is a reference
design which include IoT Sensors Reference Application. This reference design integrates a number
of sensors and provides to the user a sensor fusion experience using the IoT Sensors Android/iOS
Application.
UM-B-102
DA14585 Getting Started Guide with the IoT Multi
Sensor Development Kit
Contents
Contents ............................................................................................................................................... 2
Figures .................................................................................................................................................. 3
Tables ................................................................................................................................................... 3
1 Abstract .......................................................................................................................................... 4
2 Terms and Definitions ................................................................................................................... 4
3 Introduction.................................................................................................................................... 5
3.1 How long should it take? ....................................................................................................... 5
3.2 Block Diagram ....................................................................................................................... 5
3.3 Key Features ......................................................................................................................... 6
4 Kit Content ..................................................................................................................................... 6
5 System Requirements ................................................................................................................... 7
6 Hardware Description ................................................................................................................... 7
6.1 PCB and Board Layout: ........................................................................................................ 7
6.2 Sensors Overview ................................................................................................................. 8
6.2.1 Environmental Sensor ........................................................................................... 8
6.2.2 Motion Sensor: Accelerometer/Gyroscope ............................................................ 9
6.2.3 Audio Sensor: Microphone .................................................................................... 9
6.2.4 Electronic Compass (Magnetometer) .................................................................. 10
6.2.5 Barometric Pressure Sensor ............................................................................... 10
6.2.6 Optical Sensor: Ambient Light and IR Proximity ................................................. 10
6.3 Buttons and LEDs ............................................................................................................... 10
6.4 NOR Flash Memory ............................................................................................................ 11
6.5 Power Supply ...................................................................................................................... 11
7 Software Downloading and Programming ................................................................................ 14
7.1 Drivers and Tools ................................................................................................................ 14
7.1.1 SmartSnippets™ Installation ............................................................................... 14
7.1.2 KEIL Installation ................................................................................................... 16
7.2 Development Software Source ........................................................................................... 16
8 Run the pre-loaded Demo ........................................................................................................... 18
9 Build Your First IoT Application ................................................................................................ 21
9.1.1 How to Start Development ................................................................................... 21
9.2 Flash Programming in MSK Applications............................................................................ 22
9.3 Beacon Reference Applications .......................................................................................... 26
9.3.1 Building and Running the Example ..................................................................... 26
10 Appendices .................................................................................................................................. 30
10.1 Appendix A: Memory Map ................................................................................................... 30
10.2 Appendix B: Enclosure ........................................................................................................ 30
10.3 Appendix C: mkimage script steps ...................................................................................... 31
11 Revision History .......................................................................................................................... 33
Figures
Tables
Table 1: DA14585 IoT MSK Top Main Devices..................................................................................... 7
Table 2: DA14585 IoT MSK Bottom Main Devices ............................................................................... 8
Table 3: GPIOs for Buttons and LEDs ................................................................................................ 10
Table 4: GPIOs for the Flash Memory ................................................................................................. 11
Table 5: Communication Interface Board (CIB) .................................................................................. 13
Table 6: Beacon Reference Applications ............................................................................................ 26
Table 7: Revision History..................................................................................................................... 33
1 Abstract
Dialog Semiconductor has created the DA14585 IoT Multi Sensor Development Kit (MSK) to help IoT
device designers and engineers accelerate building their development platforms for designing IoT
applications and solutions. This guide is intended to be an easy introduction to the IoT MSK. No
experience of programming microcontrollers or the cloud is required. It helps with the setup of the
hardware development environment, installing the required software, and downloading and running an
example application on the MSK.
3 Introduction
The IoT MSK is based on DA14585 (a SmartBond™ Bluetooth Low Energy SoC) and a number of
motion and environmental sensors. The DA14585 SoC is an optimized version of DA14580, offering a
reduced boot time and supporting up to eight connections. It has a fully integrated radio transceiver
and baseband processor for Bluetooth Low Energy. It can be used as a standalone application
processor or as a data pump in hosted systems.
The IoT MSK board embeds a 2-Mbit QSPI Flash memory that can be used to store the downloaded
software images over the SUOTA (Software Update Over The Air) profile and can also serve as storage
for the second bootloader. Programming the IoT MSK is easy. There are two user manuals focusing
on Software and Hardware details respectively.
Users can build a rich cloud application with the data from this IoT MSK in just a few steps. In addition,
the cloud applications provided by Dialog can be used to monitor the data from the IoT MSK sensors
and program IFTTT events.
NOTE
The key aspects of the hardware/software of the IoT MSK are explained in detail in this user manual. A Quick
Start Guide is also available.
4 Kit Content
This section describes the required hardware and software to start using the IoT MSK.
The IoT MSK can be ordered via various distributors with Digikey or Mouser.
Inside the IoT MSK package you will find:
• IoT Multi Sensor Kit board
• Programming interface board
• Mini USB cable
• Quick Start Guide
Download the development SW source. The Dialog IoT Sensors Mobile Application can be
downloaded from App Store or Google Play. The schematics, PCB, Gerber files, Alegro files, and bill
of materials (BOM) are available for download through this link.
5 System Requirements
The IoT MSK is programmed with a preloaded demo. To run it, you need a central device (smartphone
or tablet) with 4.3 (minimum) or 8.0 (minimum) operating systems and BLE technology 4.0 (minimum).
To start developing IoT applications, you need Windows™ Operating System, (ver. 7 or higher) and
KEIL development environment.
6 Hardware Description
This section gives an overview of the design architecture of the IoT MSK. For further reading more
details are provided in UM-B-095.
suitable for monitoring indoor air quality and can detect air contamination from paint, furniture, garbage,
and others, using volatile oxide compound (VOC) levels. From the VOC readings, two air quality
parameters can be displayed using smart algorithms: the indoor air quality index (IAQ) and the e-CO2.
This sensor is connected to DA14585 via an I2C interface.
NOTE
Note: In full operation mode with the accelerometer and gyroscope enabled, the current consumption is
typically 0.72 mA. This drops to 11 μA in sleep mode.
NOTE
Note: For additional flexibility, the DA14585 IoT MSK is equipped with an additional PCB footprint of an
alternative accelerometer/gyroscope sensor: BMI160. The ICM42605 should be unsoldered before using
BMI160.
Warning
The microphone is not supported by the software reference applications provided with the DA14585 IoT MSK.
Warning
This sensor is not mounted on this reference design and is not supported by the software reference
applications provided with the DA14585 IoT MSK. Users wanting to use this sensor need to do the soldering
themselves.
Note
When the kit is powered, the Yellow LED will blink for 60 seconds. During this time, the device will advertise.
After 60 seconds, the device enters sleep mode and will only start advertising again when movement is
detected
Note
The user push button is active-low and is de-bounced by an RC filter with a time constant of about 2 ms.
Note
A pull-up resistor has been added in series with the chip select (CS) pin. This allows the CS pin to follow the
voltage applied to the VCC pin during power-up and power-down which keeps the device not selected.
Note
For further reading more information about the CIB, refer to Communication Interface Board User Manual,
UM-B-065
Note
• The SmartSnippets™ version should be 2.0.6 and above if you wishes to use Eclipse/GCC.
• Registration is required in order to download the SmartSnippets™.
2- Run the SmartSnippets™ Studio installer (.msi). Several of the required tools are automatically
installed, others need to be manually downloaded and installed.
3- Select to install the latest version of SEGGER J-Link GDB server and click Next.
4- Select the destination folder for the SmartSnippets™ Studio and click Next
Note
The communication interface board (CIB) includes an MCU embedded J-Link debugger, see Figure 7. This
ensures the USB to JTAG function by loading the software from Segger to the internal ROM. This debugger
provides also a virtual COM port to the PC/laptop as shown in Figure 11.
Note
• The Keil development tools can be run as a Free/Lite version without a product license. (File >
License Management). The Free/Lite version offers 32KB code limitation and may be used for
SmartTag and Beacon applications. Because of this limitation the Keil environment can’t be used for
the IoT Sensors application, if the user does not own µVision Keil License he may choose and activate
Note
The DA14585 IoT Multi Sensor Development SW Source can be downloaded from the customer
support web page.
Note
For further reading additional information about the software architecture, see Development Kit Developer’s
Guide UM-B-101. This document describes the architecture and implementation details of DA14585 IoT MSK
reference design and the supporting applications.
As an option, user may enable the cloud functionality Figure 14 (Internet availability is required). The
IoT MSK Cloud feature allows data that are collected by the sensors on the IoT MSK to be uploaded
to the cloud. The data on the cloud can be used in several ways:
• View historical data for a range of time. Example: View temperature logged over the 3 last
days. Refer to Figure 15.
• Set triggers to receive E-mails when sensor data meet a condition. Example: If brightness is
below 15 lumens send me an E-mail
• Control the IoT MSK Led when cloud conditions are met. Example: If temperature in Las Vegas
is less than 20 Celsius turn on the Led.
• Play 3D Game. The user can use the IoT MSK as a joystick and play a 3D Game online.
• Setup IFTTT scenarios what can be triggered by the IOT sensor data or button press.
• Use Amazon Alexa to control the IOT device Led.
Upon successful connection to the IoT MSK application, you can navigate from the side menu to the
following items:
• Environmental sensors
• IMU sensors
• Sensor Fusion 3D
• Cloud specific settings
• Configuration settings
• Information
• Disclaimer
• Magnetometer status
The IoT MSK advertises for 60 seconds (advertise timeout) before it goes to sleep. During this time
the yellow LED will blink. The IoT MSK advertises for another 60 seconds when it detects movement
and is paired again with the app. Error! Reference source not found. shows the application state
machine.
The user can build, program, and run a simple reference application on the IoT MSK. Make sure that
you have all required tools installed as described in Section 7. The IoT MSK includes reference
applications provided with preconfigured KEIL projects.
After downloading the IoT MSK Software, the IoT Sensors Reference Application can be found in
the target_apps directory.
1. Open the folder containing the IoT software files. This is the folder where you extracted the zip
file DA14585_IOTP_v6.160.x.yy.zip
2. To open the project in Keil,
in <IoT_MSK_root_directory>/projects/target_apps/iot/iot_585/Keil_5,
double-click iot585.uvproj.
3. Refer to Figure 17: IoT Sensors Reference Application State Machine To build the KEIL
project.
Note
+For further reading, a group of compilation switches control the application’s behavior. The most important
switches are listed in Table 5: Configuration Parameters in Development Kit Developer’s Guide UM-B-101.
+ The application is placed/executed in RAM. For further reading more details about RAM management,
see How to change the RAM size tutorial.
+ For programming into Flash, see the next section.
Warning
+ You need a KEIL μVision license because the code size of most of the IoT reference applications exceeds
32 Kbytes. (Other provided projects can be compiled using the free version of Keil). For further reading See
Section 8: Memory Footprint of Development Kit Developer’s Guide UM-B-101.
+ The DA14585 IoT Sensors Reference Application can be compiled using the ARM GCC compiler. Dialog
Semiconductor provides an example Eclipse project showing how to accomplish this. For further reading
AN-B-064 describes the required steps to download and compile this project.
The secondary bootloader defines the memory map of the Flash consisting of two images and a program
header, see Appendix A: Memory Map.
Note
The MSK reference application software implements the SUOTA receiver role. To support SUOTA, a dual
image bootloader must be programmed in the OTP memory of the DA14585 and the corresponding non-
volatile memory map must be applied in SPI Flash memory during the production phase.
These images are created by mkimage scripts or the mkimage application. Figure 18 shows the
location under the IoT MSK SDK.
make_image_beacon.bat altbeacon_dynamic
make_image_iot.bat iot585
make_image_tag.bat smart_tag_585
make_all_images.bat
Here after we will use the Smart Tag application as the compile example.
1- First you run the make_image_tag.bat script, you need to copy two files, in the same
location as the mkimages scripts, as shown in Figure 20.
- The generated .hex file by you keil project : smart_tag_585.hex
- The SW Tag version tag_sw_version.h file found in :
projects/target_apps/tag/smart_tag/src/config
make_image_tag.bat smart_tag_585
2- Then With SmartSnippets Studio, you can burn the generated .bin file (multi-image for tag
application that we took as an example)
Note
• Erase: Erases the entire SPI Flash Memory
• Burn & Verify: Adds a verification step after the burn process. After burning data to SPI Flash
memory, it is verified that the contents of the memory are the same with the contents of the file that
has been burned.
Warning
When trying to burn the .bin at SPI Flash Memory, You are presented with the option to make it bootable. You
MUST NOT select the bootable option, because special header is added before the data and the data is
written starting at the selected offset. Please refer to Figure 21
3- With The image is now burnt in flash and by pressing the Reset button on the CIB board, it will
start working with the programmed application. Now you can see that the green Led blinks for
Smart Tag Application. After 4 Minutes the Smart Tag stops advertising and enters continuous
Deep Sleep mode. To restart advertising, you should Press Reset on the CIB board.
Note
As shown in Figure 19 , the mkimage tool has five different modes to create images.
• single: creates an .img file from the .bin file of the Keil project. This image contains the
software version and the software version date.
• multi: creates a .bin file from the .bin file of the Keil project. This .bin file contains two images
created by the mkimage single mode and a product header at the end of the file.
• whole_img: This mode is used to create a complete .bin file. This contains two alternative .img
files, created by mkimage single mode, that are needed when using the SUOTA functionality, the
config_struct.cfg file and the product header.
• multi_no_suota: This mode is used to create a whole .img file containing the .bin file of the
Keil project preceded by the config_struct.cfg file. The image can be created for either an
SPI Flash memory or an EEPROM Flash memory. The generated image will not include SUOTA
functionality.
• cfg: This mode is used to create a .cfg file containing a device configuration struct preceded by
its header. The device configuration struct header also contains a 4-byte CRC which is calculated
from the fields of the configuration struct. The application also checks a software version file and
includes the version in the header of the corresponding field.
Note
The whole_img mode is only for beacons. It is similar to the multi mode with the addition of the beacon
config struct.
After downloading the IoT MSK software, the Εddystone UID-URL Beacon Reference Application can
be found in the target_apps directory.
1. Open the folder containing the IoT software files. This is the folder where you extracted the zip
file.
2. To open the project in Keil, in
<IoT_MSK_root_directory>/projects/target_apps/beacon/eddy_uid_url_tlm/
Keil_5, double-click eddy_uid_url_tlm.uvproj.
3. In user_config.h, enable the USE_EDDYSTONE_URL flag and disable the
USE_EDDYSTONE_UID flag as shown in enable the USE_EDDYSTONE_URL flag.
The Εddystone UID-URL frame broadcasts a URL using a compressed encoding format. Once parsed
and decompressed, the URL is directly usable by the client.
Note
Note: The .url field of the Beacon Configuration Struct contains the URL, preceded by its length
incremented by 7 (<url_string>+7) and followed by the URL postfix (.com). The URL prefix (HTTPWWW) is
stored in the previous field of the struct .url_prefix.
4. Build (you need a KEIL μVision license), download, and execute your project. For the hardware
settings, see Figure 6.
The advertising string contains a encoded URL with a length ranging from 1 to 17 bytes. The Eddystone
UID-URL Beacon reference application advertises an EDDYSTONE-TLM advertising string every
User Manual Revision 1.1 15-Feb-2019
Note
The default broadcasted link is www.diasemi.com which can be modified. The Eddystone protocol provides
17 bytes for the URL packet. If the URL is too long you can use a URL shortener.
The Locate Beacon application searches for available beacons and lists them:
10 Appendices
11 Revision History
Status Definitions
Status Definition
The content of this document is under review and subject to formal approval, which may result in modifications or
DRAFT
additions.
APPROVED
The content of this document has been approved for publication.
or unmarked
Disclaimer
Information in this document is believed to be accurate and reliable. However, Dialog Semiconductor does not give any representations or
warranties, expressed or implied, as to the accuracy or completeness of such information. Dialog Semiconductor furthermore takes no
responsibility whatsoever for the content in this document if provided by any information source outside of Dialog Semiconductor.
Dialog Semiconductor reserves the right to change without notice the information published in this document, including without limitation the
specification and the design of the related semiconductor products, software and applications.
Applications, software, and semiconductor products described in this document are for illustrative purposes only. Dialog Semiconductor makes
no representation or warranty that such applications, software and semiconductor products will be suitable for the specified use without further
testing or modification. Unless otherwise agreed in writing, such testing or modification is the sole responsibility of the customer and Dialog
Semiconductor excludes all liability in this respect.
Customer notes that nothing in this document may be construed as a license for customer to use the Dialog Semiconductor products, software
and applications referred to in this document. Such license must be separately sought by customer with Dialog Semiconductor.
All use of Dialog Semiconductor products, software and applications referred to in this document are subject to Dialog Semiconductor"s
Standard Terms and Conditions of Sale, available on the company website (www.dialog-semiconductor.com) unless otherwise stated.
Dialog and the Dialog logo are trademarks of Dialog Semiconductor plc or its subsidiaries. All other product or service names are the property of
their respective owners.