Switch Science


Switch Science is one of the open source hardware retailers in Japan. We are manufacturing our own products.

You are viewing an older revision! See the latest version

Getting started with mbed HRM1017

このページの日本語版は、mbed HRM1017をはじめようをご覧ください。

Warning

Currently, we are working on registering HRM1017 on online compiler. It is scheduled around 23 July. Before getting done, please choose Nordic nRF51822 as your target on your online compiler.

Overview

Pinout:
/media/uploads/ytsuboi/hrm1017_pinout-20140611.png

Block chart:


The tact. switch on the board will be a reset siwthch. Currently, this is not working. We are working on this issue, and it will be solved by future release.

Solder jumpers on top of the board is connecting UART RX and TX between mbed interface and BLE module. When you want to connect UART signal out of the board, please remove the solder. We are using lead free solder.

A solder jumper bottom of the board is connecting 3V3 of BLE module - pin header and regulator - mbed interface. When you want to use exterior power source such as coin-cell buttery, please remove the solder.

Schematic(PDF)

Warning

When you want to drive LED and other energy eaters, please connect through FETs.
The maximum output current of nRF51822's ports is only 0.5mA!

Note

On Microsoft Windows, you need to install driver to use COM port. You can download the driver software from Windows serial configuration.

Distributors

- Switch Science

First touch

Please add nRF51822 to your online compiler and import this project.

Import programBLE_Health_Thermometer_IRC

Originally from Donal's blog article. http://mbed.org/users/donalm/code/BLE_Health_Thermometer_Blog/ Changed low freq. clock source from XTAL to IRC.


By pressing compile button, you can download hex file.
nRF51822 is havind SoftDevice technology, that allows change BLE stack. This hex file contains your program and this SoftDevice.

When you connect mbed HRM1017 to your PC via USB cable, "MBED" drive will be mounted. By Drag&Drop the hex file, you can flash. After flashing, "MBED" drive will be unmounted automatically, and will be mounted again. nRF51822 will be reset and your program run.
Note: You will not be able to find your hex file in the "MBED" drive, after unmounted/mounted.

Please install "nRF Toolbox" by Nordic to your smart phone. You can find your mbed HRM1017, by tapping "CONNECT" button of "HTM". Do you want to see the temperature? Please connect TMP102 I2C sensor like this.\

Low Frequency Clock

This program is originally from Bluetooth LE Example on mbed - Health Thermometer!. Nordic's mkit have 32kHz XTAL, but mbed HRM1017 doesn't. So, when you use mbed HRM1017, please use internal RC inside nRF51822. For detail, by changing following line shown in the picture.

//  SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, false);




Currently, there are two kind of BLE library on mbed.org.
Old one :

Import libraryBLE_API_Native_blog

BLE API as used in the blog entry.

Customized old one is here :

Import programBLE_API_Native_IRC

Originally from Donal's blog article. http://mbed.org/users/donalm/code/BLE_Health_Thermometer_Blog/ Changed low freq. clock source from XTAL to IRC.


The new one, that separated :

Import libraryBLE_API

High level Bluetooth Low Energy API and radio abstraction layer

Import librarynRF51822

Nordic stack and drivers for the mbed BLE API

Customized new one is here :

Import librarynRF51822_IRC

changed low freq. clock source to IRC

You don't need to customize BLE_API.

Information

We will make a pull-request after mbed HRM1017 getting registered to platforms page, and then you will not need to customize the library or choose customized library.
We're sorry for this inconvenience.

FAQ

My program is not ran by writing HEX file!

By downloading hex file directly to "MBED" drive with Internet Explorer, this matter happen. Please do not save directly with Internet Explorer. You can resolve this issue by downloading to other place and drag-n-drop the file into MBED drive.

The LED on the board is an access lamp of mbed interface.
Please connect your LED and current-limiting resistor through FET.

Warning

When you want to drive LED and other energy eaters, please connect through FETs.
The maximum output current of nRF51822's ports is only 0.5mA!

I can not reset by pressing tactile switch!

Sorry, we are working on solving this issue.

Examples

ANCS

Import programBLE_ANCS_SDAPI_IRC

changed low freq. clock source to IRC

1. Compile the code, transfer the hex file to mbed.
2. Use serial terminal software on your PC to connect to mbed com port (9,600bps, 8N1).
3. On iOS7, select "Settings", "Bluetooth". You should see "ANCC" on the devices list. Click it to connect. LED2(connected) should turn on.
4. A Dialog will appear: "Bluetooth Pairing Request" Press "Pair"
5. When you receive push notifications, you can see the log on serial terminal.


All wikipages