BT-BOX
Ben Valdovinos
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
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
BT-Box                            Small enough to be worn at the
                                   waistline when used for Fall
                                             Detecting

A whole system is being created
System Level Block Diagram
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
Microcontroller

                  Operating Clock  Flash       IO
    Brand                                RTCC         Price
                   Voltage  Speed Memory      Pins
 Microchip                  80
                    3.3          128 KB   Yes   85    5.17
PIC32MX3XX                 MHz
Flexis Coldfire             66
                    3.3          128 KB   No    134   3.21
   MCF21X                  MHz
   Atmel
                            66
AT32UC3A01          3.3          128 KB   Yes   144   4.40
                           MHz
    28
  Analog                    10
                    3.3           32 KB   No    14    5.15
 ADUC7060                  MHz
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
Memory Card
                                        Max Transfer   Supply
  Type      Size (mm)      Weight (g)
                                         Rate (SPI)    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
Rechargeable Batteries
     Type        Output   Capacity    Size (mm)       Price
                                     50.8 x 33.5 x
   Lithium Ion   3.7 V    1000 mAh                    11.00
                                          5.9
    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
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
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
Software                              Hardware
• Microchp’s MPLAB IDE            • Bluetooth Module
  • C++                           • Micro SD card
  • Microcontroller programming
                                  • USB
• Python version 2.6
                                  • Battery
  • Computer
                                  • MCU
  • Bluez
                                  • Accelerometer
• Eagle
  • PCB Design
Experimental Results
• Accelerometer interfacing with microcontroller
• Save to SD Card
• Bluetooth file transfer established between smart phone
 and computer using Linux
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
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
Preliminary Costs
• Uno32 Chipkit
• ADXL345 Breakout Board
Bill of Materials
         Item             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
Schedule
                            MCU Programming
                            Environment Ready




Fall Detection
  Complete                                      Bluetooth
 Save Data on                                    Works
   SD Card


                 Assemble Box
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
Advisors
• Project Advisor: Professor Jack Ou
• Industry Mentor:
Questions?
• www.benvaldo.com/senior-project-blog
Basic Data Packet
      Access Code                          Header                          Payload
 Preamb   Sync      Trailer AM_ADDR TYPE FLOW ARQN SEQN HEC                 DATA
    le    Word
    4      64        4        3        4     1         1   1           8   0-XXX




                          Accelerometer Data Payload
          Header          Board ID #         Time              Event
             8                8               64                8
Accelerometer
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.
Algorithm
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
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
Function boards
• Power, Ground, and various I/O ports
• Will be encased inside box
• Automatically identified by microcontroller
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

Presentation_BTBox_2012

  • 1.
  • 2.
    Overview • The BT-Boxis 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
  • 3.
    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
  • 4.
    BT-Box Small enough to be worn at the waistline when used for Fall Detecting A whole system is being created
  • 5.
  • 6.
    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
  • 7.
    Microcontroller Operating Clock Flash IO Brand RTCC Price Voltage Speed Memory Pins Microchip 80 3.3 128 KB Yes 85 5.17 PIC32MX3XX MHz Flexis Coldfire 66 3.3 128 KB No 134 3.21 MCF21X MHz Atmel 66 AT32UC3A01 3.3 128 KB Yes 144 4.40 MHz 28 Analog 10 3.3 32 KB No 14 5.15 ADUC7060 MHz
  • 8.
    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
  • 9.
    Memory Card Max Transfer Supply Type Size (mm) Weight (g) Rate (SPI) 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
  • 10.
    Rechargeable Batteries Type Output Capacity Size (mm) Price 50.8 x 33.5 x Lithium Ion 3.7 V 1000 mAh 11.00 5.9 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
  • 11.
    Bluetooth Module • Forfuture 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
  • 12.
    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
  • 13.
    Software Hardware • Microchp’s MPLAB IDE • Bluetooth Module • C++ • Micro SD card • Microcontroller programming • USB • Python version 2.6 • Battery • Computer • MCU • Bluez • Accelerometer • Eagle • PCB Design
  • 14.
    Experimental Results • Accelerometerinterfacing with microcontroller • Save to SD Card • Bluetooth file transfer established between smart phone and computer using Linux
  • 15.
    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
  • 16.
    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
  • 17.
    Preliminary Costs • Uno32Chipkit • ADXL345 Breakout Board
  • 18.
    Bill of Materials Item 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
  • 19.
    Schedule MCU Programming Environment Ready Fall Detection Complete Bluetooth Save Data on Works SD Card Assemble Box
  • 20.
    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
  • 21.
    Advisors • Project Advisor:Professor Jack Ou • Industry Mentor:
  • 22.
  • 23.
    Basic Data Packet Access Code Header Payload Preamb Sync Trailer AM_ADDR TYPE FLOW ARQN SEQN HEC DATA le Word 4 64 4 3 4 1 1 1 8 0-XXX Accelerometer Data Payload Header Board ID # Time Event 8 8 64 8
  • 24.
  • 25.
    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.
  • 26.
  • 27.
    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
  • 28.
    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
  • 29.
    Function boards • Power,Ground, and various I/O ports • Will be encased inside box • Automatically identified by microcontroller
  • 30.
    Microcontroller • PIC32MX320F128H • 128KFlash 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

Editor's Notes

  • #2 Add an “applications” slide
  • #4 Python running on a computer is replacing the cell phone, which is the end goal of another project. There isn’t enough time for the development of an app or application writing. So I will have python script receive data and save to a file.
  • #5 Emphasize the size. Where do you wear it. Future works: now I just detect fall. Later I send messages with phone. Make it clear I am making a whole thing here. Emphasize my project last year in 310. picture of where yoy could wear this. How many people fall. Disease. Simple and high level. Still technical. Interesting. Convincing. Whos my audience?
  • #7 Iob is not mobile. Look at climate pod….expensive. Mines small, low cost, mobile,
  • #8 Microchip: information about mcu is easily available. Somewhat difficult to find info with other websites. Company is known and robust,plus I have experience with them.Fall detection has been done with 60KB
  • #9 Great accelerometer for fall detection
  • #13 RN-41 and RN-42 both have options for antennaAdd in power usageThese are claimed by the manufacturer
  • #14 Add hardwareTools for smart phone
  • #26 Single_tap = acceleration in one-axis is above set threshold, for shorter time period than in DUR registerDouble_tap = acceleration in two-axes is above set threshold, for shorter time period than in DUR period