34
Bluetooth SIG Member Bluetooth SIG Member Using Bluetooth® Smart to Control Embedded Systems with a Mobile Device [email protected] 800-411-6596 +44-2392-232392

How to use Bluetooth® Smart to control your embedded device with a mobile device

Embed Size (px)

Citation preview

Page 1: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Bluetooth SIGMember

Using Bluetooth® Smart to Control Embedded Systems

with a Mobile Device

[email protected]+44-2392-232392

Page 2: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Any device can send state/status

You forgot to Floss your teeth yesterday. Today you need to brush your

teeth for more time.

You didn’t complete your 10k steps goal yesterday. Spend more time at the

gym today.

I am behind the sofa cushion. Find me here..!!

Page 3: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

IOT: Base elements

Flow

On/Off

Light

PressureOpen/ Closed

Temperature (Hot/Cold)

Location

Page 4: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMemberHow do we connect every device

to the internet?

Portability / mobility

Battery Life

Expensive + Battery life

Page 5: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

A gateway to the internet

Gateway

Page 6: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMemberWhat does a smart phone offer

as a gateway?

Standard Wi-Fi Bluetooth NFC

Mobile can be master? Yes Yes Yes

End Device Broadcast Yes Yes No

Scanning No Yes No

Battery Life of End Devices /Slaves Few hours

[3.0] Few Hours

[LE] Few YearYears

Bandwidth provided Video State [LE] Voice [3.0] State

Asynchronous Data transfer by End Devices Not Supported Supported Not

Supported

Range of connection 75-120 m 10 – 100 m 10cm

Relative Cost of Implementation Low Lower Lowest

Page 7: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

What is BLE?

• Bluetooth low energy technology is an evolution in technology that enables new applications in wireless devices that are able to last months or even years off a small, button-cell battery

• Ultra-low power consumption• Low cost• Multi-vendor

interoperability• Enhanced range

relative to classic Bluetooth

* Graphic courtesy of Bluetooth® SIG

Page 8: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

BLE technical specifications

• Uses FHSS spread Spectrum technology to overcome interference• Operates at 2.4 GHz ISM band which is accepted worldwide• Very Low Duty Cycle:

– Radio spends very little time in TX/Rx mode– Radio shuts down very fast

• Asynchronous Connectionless MAC– Small Packets [MTU = 20 bytes]– Uses only 3 channels for advertising hence less time to establish link– Fast Connection and teardown in < 6ms *Graphic Courtesy of iebmedia.com

Page 9: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMemberWhat can a Bluetooth Smart

connection do for you?

• Connect your embedded device to a smartphone:- monitor & collect data- control operation and adjust settings- field service interfaces- over-the-air software updates- and more …all touch-free & without opening a cabinet!

• Easy to change the HMI controls and gauges – it’s all software

• Secure: Control and limit access

Page 10: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Product objectives

• Time to Launch to market = 1 month / 3 months / 6 months • Customer never needs to replace battery• Over the AIR update: no need to plug any wires

Marketing Objectives

• Lower Bill of Materials• Low NRE / Engineering Costs

Operations Objectives

• Sell the product worldwideSales Objectives

• Where do I start?Engineer objectives

Page 11: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

• Range and Data throughput• Battery Life and Sleep current• Over the AIR update

BLE Radio Objectives

• Design the Radio or go with a Module?• Application Firmware: Integrate with BLE stack or Separate

Applications Processor?

Application Objectives

• GATT Model• GATT Specification: Profiles, Characteristics, Services• Custom GATT profiles

Determine Data Flow Needs

• Testing product using Generic Applications• Generic Apps on PC / Mobile • Cross Platform mobile app development

Mobile App Objectives and Testing Product

• Regulatory Certification• Bluetooth SIG Qualification• Benefits of pre-certified and pre-qualified modules Go to Market

5-step checklist to start your design

Page 12: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

1: BLE radio objectives

BLE Range: up to 100 meters• 2.4 GHz is attenuated heavily by human body• Placing radio in metal enclosure or right on top of coin cell

battery will cause multipath/ reflections and packet loss

BLE Data throughput: Radio data : 1Mbps, BLE spec: .27Mbps • It is designed for sending small chunks of data or ‘state’ of

the device• Given the low duty cycle, it not optimized for large file transfer

or streaming

Page 13: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

1. BLE radio objectives (cont.)

Battery Life:Assuming a transaction of 3ms, Tx/Rx avg. current consumption: 17mA Std. CR2032 coin cell battery: ~220mAhCalculations: = 220mAh/17mA /.003s = ~ 13 hours = ~15.5 mil. Packet transactions

Important contributors to extend battery life• Sleep current modes: BLE radio are in Sleep mode for almost all the times

a. Sleep with OSC onb. Sleep with Timer Onc. Sleep with External Interrupts On \ Deep sleep

• Adding DC-DC converter helps reduce power consumption in TX/RX mode

No. of End Device packet transmission per minute

Estimated Battery Life on CR 2032

Estimated Battery Life on std. AA [~1Ah]

1 24 year 100 years

12 2 years 10 years

60 0.5 year 2.5 year

Page 14: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

OTA (Over the Air Update)- Supported by most radio vendors- While choosing Flash size

* double of the firmware size * future addition of features

1. BLE radio objectives (cont.)

Page 15: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

2: Embedded application objectives

Design your own radio or go with a module?

• RF expertise• Time consuming: PCB Design• Upfront Engineering cost • Easy to make changes • Module: Fast prototype and low annual

volumes where time to market is important

• DIY: Post proto and high volume production

Page 16: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

2: Source a BLE radio

Application and Stack on single BLE Chip

Separate Applications and BLE Processor

Page 17: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

3: Determine data flow needs

The BLE Stack: GATT Model• Based on attributes• Simple to use• Key terms:• Central / peripheral• GATT specifications

– Services– Characteristic– Profiles Physical Layer

[PHY]

Link Layer [LL]L2CAP

Host Controller Interface [HCI]

ATTGATTUser Applications

SMP

GAP

Page 18: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

GATT specificationsService: Human Readable specification of set of characteristics, eg. Glucose Monitoring, Blood Pressure Monitoring

Characteristics: Defined attribute types that contain a single logical value. These are machine readable only, eg. Battery voltage

Profiles: Define how services can be used to enable an application or use case. Profiles enable interoperability among products made by different manufacturers, eg. Healthcare, Proximity Sensing

3: Determine data flow needs (cont.)

Page 19: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

• Bluetooth SIG has adopted numerous profiles to make it easier for developers. Can be found at Bluetooth developer site

• But what if the existing profiles don’t work for you? You can create custom profiles

• How? Push / Pull / Broadcast– Product sends to smartphone (Push)– Smartphone Connects/Reads/Writes (Pull)– Product broadcasts data even when not connected [indicators /

notifications]

• Security : – Button pairing– Pin code– Unique key pairing

3: Determine data flow needs (cont.)

Page 20: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember4: Mobile app objectives & product

testConcurrent Code Development

Embedded code

Mobile app code

iOS & Android mobile; PC; etc.

App. c Main. c

Hardware prototype

Your embedded device

To market

Page 21: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Embedded Device to Mobile DeviceEmbedded Device to PC

Image courtesy : TI and Punchthroughdesign.com

Test product using a generic interface

4: Mobile app objectives & product test (cont.)

Page 22: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Packet sniffer

4: Mobile app objectives & product test (cont.)

Page 23: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Packet sniffers

* Image courtesy of Frontline

4: Mobile app objectives & product test (cont.)

Page 24: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Cross platform mobile apps

4: Mobile app objectives & product test (cont.)

Page 25: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

5: Go to market

Regulatory Certifications :

• Verification that the operation of a device meets set limits or performance expectations within a given country or geographical region

Americas

Canada

European Union

China

Japan

Australia

Page 26: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

5: Go to market (cont.)

Bluetooth SIG qualification Process:• all Bluetooth products must be qualified to use the Bluetooth trademark/logo• fully qualified product is listed as End Product Listing (EPL)

* Graphic courtesy of Bluetooth® SIG

Page 27: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember 5: Go to Market (cont.)

Benefits of using a pre-certified module

Discrete Design Pre-Certified / Pre-Qualified Modules

Fees for Regulatory Tests Approvals [FCC/ETSI/IC]

25000 9000

Software Dev. Costs for Test Firmware

20000 1000

Additional Countries 20000 (approximate)

1000

Bluetooth Qualification * (Associate member)

4000 4000 [only EPL]

Total Costs 70,000 15,000

* Bluetooth SIG Fees are based on membership levels Adopter: $8k / Associate : $4k / Innovation Incentive Program (companies with annual revenue <$1 m USD): $2.5k USD (2 products max.)

Page 28: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Summary: How to get started

• Project objectives influence the product design & development process• Regulatory compliance can significantly delay product launch & raise

costs• Pre-certified module can reduce time to market, simplify prototyping,

streamline compliance & eliminate need for RF infrastructure• For complex applications, use the co-processor approach for proof of

concept and initial prototypes• For mobile development, use of generic cross-platform application

development compilers• Perform regulatory compliance tests and obtain Bluetooth EPL listing to

use the Bluetooth logo

Page 29: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

A word about Anaren’s BLE solution

Page 30: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Bluetooth Smart Development Kit

• Works with Atmosphere web-based development platform– Simultaneously creates & compiles embedded code for

demo board and code for mobile app creation– Examples based around the AIR-for-WICED multi-

sensor development board with exposed GPIOs, UART, SPI and I2C connections

• Includes:• Unlimited access to the online Atmosphere

collaborative development platform • Multi-sensor dev board• USB cable (probably Type A to Micro B)• 2 single-row header pins• Quick Start Guide• Regulatory Guide Part #: A20737x-MSDK1

Page 31: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Atmosphere online development platform

• Enables developer to simultaneously generate embedded code & mobile app code in one, environment

• Public site & community at: https://atmosphere.anaren.com

• Users accesses tool via freeaccount registration (agrees to T&C & use of AIR for WICED modules)

• Downloads & installs on PC/Mac/Linux device

• Mobile app to be available on App Store & Play Store

Page 32: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Where you can learn more

References :• https://atmosphere.anaren.com• http://anaren.com/airforwiced• http://developer.bluetooth.org/• http://en.wikipedia.org/wiki/Bluetooth_low_energy• https://mentor.ieee.org/802.18/dcn/13/18-13-0049-00-0000-f

cc-modular-transmitter-guidance.pdf

Page 33: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Bluetooth SIGMember

Questions?

[email protected]+44-2392-232392

Page 34: How to use Bluetooth® Smart to control your embedded device with a mobile device

Bluetooth SIGMember

Bluetooth SIGMember

Thank you for your time!

[email protected]+44-2392-232392