presentation_btbox_2012

30
BT-BOX Ben Valdovinos

Upload: valdo3333

Post on 18-Dec-2014

260 views

Category:

Education


0 download

DESCRIPTION

Ben Valdovinos Senior Design Project 2012

TRANSCRIPT

Page 1: Presentation_BTBox_2012

BT-BOXBen Valdovinos

Page 2: Presentation_BTBox_2012

Overview• The BT-Box is a general purpose Bluetooth based data

acquisition system that connects computers or smart phone to sensors

• Applications in the medical field• Fall Detection

• Applications in the environmental field• Temperature and humidity sensing

• BT-Box’s technology is general purpose and its applications are very diverse

Page 3: Presentation_BTBox_2012

Requirements• Small size: 3.5” x 2.5” x 0.75”• Bluetooth communication between BT-Box and

computer/phone• Data storage on micro SD card• Accepts different sensors and is reprogrammable• System runs on re-chargeable battery• Implement Fall-Detection Algorithm• Design PCB to place all components in small area• Optional: Development of smart phone interface

Page 4: Presentation_BTBox_2012

BT-Box

A whole system is being created

Small enough to be worn at the waistline when used for Fall

Detecting

Page 5: Presentation_BTBox_2012

System Level Block Diagram

Page 6: Presentation_BTBox_2012

Existing • ioBridge

• Internet-enable anything!• Attach sensors/actuators to a web

gateway or module and control via cloud services

• 100$

• Life Alert• Summon help at the push of a button• Limited to in/around home

Page 7: Presentation_BTBox_2012

Microcontroller

BrandOperating

VoltageClock Speed

Flash Memory

RTCCIO

PinsPrice

Microchip PIC32MX3XX

3.380

MHz128 KB Yes 85 5.17

Flexis Coldfire MCF21X

3.366

MHz128 KB No 134 3.21

Atmel AT32UC3A01

283.3

66 MHz

128 KB Yes 144 4.40

Analog ADUC7060

3.310

MHz32 KB No 14 5.15

Page 8: Presentation_BTBox_2012

Accelerometer• ADXL345 from “Analog Devices”• 3mm x 5mm x 1mm• 23uA in measurement mode and 0.1uA in standby mode

at 2.5 V• 3-axis measurement with 10-bit resolution• Up to 16g (1° accuracy)• Embedded memory with FIFO technology• Activity/inactivity monitoring • Single and double-tap detection as well as free-fall

detection

Page 9: Presentation_BTBox_2012

Memory Card

Type Size (mm) Weight (g)Max Transfer

Rate (SPI)Supply Voltage

SD 32 x 24 x 2.1 2 25 Mbit/sec 3.3

mini SD 21.5 x 1.4 0.8 50 Mbit/sec 3.3

micro SD 11 x 15 x 1 0.25 50 Mbit/sec 3.3

Page 10: Presentation_BTBox_2012

Rechargeable Batteries

Type Output Capacity Size (mm) Price

Lithium Ion 3.7 V 1000 mAh50.8 x 33.5 x

5.9 11.00

Ni-Cd AA 1.2 V 1200 mAh 50 x 10.5 dia. 1.55

Ni-MH AA 1.2 V 2500 mAh 50 x 10.5 dia. 3.99

http://www.batteryspace.com

Page 11: Presentation_BTBox_2012

Bluetooth Module• For future works, connection to smart

phones will be easier with Bluetooth• Adds usability, convenience, and ease-of-use• Range is not an issue• Buying a module is faster than designing my own PCB

• flash, crystal, filters, antenna, and amplifiers included in RN-42

Page 12: Presentation_BTBox_2012

Bluetooth

WT12 WT41 WT21 RN-41 RN-42

TX POWER 3 dBm 19 dBm 7 dBm 15 dBm 4 dBm

CLASS 2 1 1.5 1 2

RANGE 30m 500-1000m 100-200m 100m Max 20m

OP. VOLT 3.3 3.3 1.8-3.6 3.3 2.7-3.0

Sleep Mode 1 mA 3.0 mA 1.5 mA 2.5 mA 0.026 mA

Power 2 mW 79 mW 5 mW 31.6 mW 2.5 mW

SIZE (mm) 26x14x2.4 35x14x3.5 17x11x2.6 19x13.4x2 13.4x26x2

Page 13: Presentation_BTBox_2012

Software Hardware• Microchp’s MPLAB IDE

• C++ • Microcontroller programming

• Python version 2.6• Computer• Bluez

• Eagle • PCB Design

• Bluetooth Module• Micro SD card• USB • Battery • MCU• Accelerometer

Page 14: Presentation_BTBox_2012

Experimental Results• Accelerometer interfacing with microcontroller• Save to SD Card• Bluetooth file transfer established between smart phone

and computer using Linux

Page 15: Presentation_BTBox_2012

Risks & Challenges• Bluetooth implementation• Minimizing size and power consumption• Perfecting the Fall Detection Algorithm• Designing the PCB with Eagle• Working with a 32-bit MCU

Page 16: Presentation_BTBox_2012

EE Courses• Microcontrollers – ES 310• Electronics – ES 330/230• Wireless Communications – ES 485-03• Intro to Antenna Theory – ES 485-01• Analog and Digital Communications – ES 442• Electromagnetic Theory – ES 430

Page 17: Presentation_BTBox_2012

Preliminary Costs• Uno32 Chipkit• ADXL345 Breakout Board

Page 18: Presentation_BTBox_2012

Bill of MaterialsItem Cost Acquired

MCU $5.17 NO

ADXL345 Accelerometer $14.95 NO

RN-42 Evaluation Board $40.00 NO

SanDisk micro SD $4.00 NO

micro SD Socket $3.95 NO

Lithium Ion Battery $11.95 NO

USB Connector $1.20 NO

USB LiPoly Charger $14.95 NO

PCB $169.00 NO

RN-240M $59.00 NO

TOTAL $324.17

Page 19: Presentation_BTBox_2012

Schedule

MCU Programming Environment Ready

Fall Detection Complete

Save Data on SD Card

Bluetooth Works

Assemble Box

Page 20: Presentation_BTBox_2012

References• Microchip website: http://www.microchip.com • Dr. Farahmand’s website:

http://www.sonoma.edu/users/f/farahman/ • SD Group Technical Committee, SD Card Specifications:

Physical Layer, Version 3.01

Page 21: Presentation_BTBox_2012

Advisors• Project Advisor: Professor Jack Ou• Industry Mentor:

Page 22: Presentation_BTBox_2012

Questions?• www.benvaldo.com/senior-project-blog

Page 23: Presentation_BTBox_2012

Basic Data Packet

Access Code Header PayloadPreamb

leSync Word

Trailer AM_ADDR TYPE FLOW ARQN SEQN HEC DATA

4 64 4 3 4 1 1 1 8 0-XXX

Accelerometer Data Payload

Header Board ID # Time Event

8 8 64 8

Page 24: Presentation_BTBox_2012

Accelerometer

Page 25: Presentation_BTBox_2012

Accelerometer fall detection• 8 interrupts

DATA_READY, SINGLE_TAP, DOUBLE_TAP, ACTIVITY, INACTIVITY, FREE_FALL, WATERMARK, and OVERRUN

• Algorithm• Determine the start of the fall• Detect impact, which has

largest impact• Aftermath: body doesn’t rise

immediately• Comparing orientation

before and after.

Page 26: Presentation_BTBox_2012

Algorithm

Page 27: Presentation_BTBox_2012

RTCC• 24-Hour Format (Military Time)• Visibility of One-Half-Second Period• Provides Calendar: Weekday, Date, Month and Year• Alarm Intervals are configurable for Half of a Second, One

Second, 10 Seconds, One Minute, 10 Minutes, One Hour, One Day, One Week, One Month and One Year

• Alarm Repeat with Decrementing

Page 28: Presentation_BTBox_2012

SD card specifics• Initial communication through synchronous one-bit

interface• Host provides clock signal and can command card to

use different operating voltage• Host prepares card for read/write of data block• SDHC and SDXC cards can operate at 1.8-volt• Formatting

• For SDSC cards: FAT16• For SDHC cards: FAT32

• Power use 66-330mW (20-100mA) @ 3.3-V• Max transfer of 50-Mbit/sec

Page 29: Presentation_BTBox_2012

Function boards• Power, Ground, and various I/O ports• Will be encased inside box• Automatically identified by microcontroller

Page 30: Presentation_BTBox_2012

Microcontroller• PIC32MX320F128H• 128K Flash Memory, 128 KB Program Memory

• Processing power needed for Fall Detection

• 2 internal oscillators• 2 SPI, 2 I2C• 16 ADC Channels, 85 I/O Pins• Other Microchip 32-bit MCU’s are viable option• Much room for further project development