Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

Bluetooth LE Button

  1. bodong.li@kaust.edu.sa Product Description A physical button that connects to smart phones to enable functions on the phone side. Design Focus Small Fast response Long battery life The Button
  2. Component Selection Components Parts Remarks Bluetooth LE TI CC2541 Cost-effective, MCU embedded Battery CR1632 Small, ø16×3.2mm 3V, 140mAh (Marked power) Buck convertor TI TPS62730 Enable BLE low power mode Tactile Switch SKQYAAE010 SMD, Compact, High-speed Antenna Puls W3008 Ceramic SMD, 1.7 dBi gain LED LED RED 0402 Small forward voltage (1.8 V) Passive components SMD 0402 Save PCB space
  3. Design Breakdown Power supply Buck convertor Power management 3~2.2 V Button Sensing and Display CC2541 Bluetooth MCU (8051) LED 2.1 V Antenna + Matching Network Communication GPIO write TX RX GPIO read
  4. Schematic
  5. PCB Layout Top Bottom GND PWR 4 layer PCB Top side: •CC2541 •TPS62730 •Switch •Antenna •Crystal •LED •Passive SMD Bottom side: •Battery •Debug port *Preliminary design, refinement required
  6. Mechanical Concept Design 20 mm 8mm
  7. Peripheral Smart phoneButton Central device scan Establish connection turn on key press notification advertise read P0_0 ? 1 0 send notification characteristic change N Y create event GATT clientGATT server Flash LED (P1_0) System Flow Chart
  8. Firmware Development • The firmware of the button function is programed in the 8051 MCU of CC2540, which is included in the mini Keyfob module (shown below) from TI CC2540 mini development kit. • Programming environment: IAR Embedded Workbench for 8051. • The right Key and LED of the mini Keyfob module are enabled. • The “SimpleBLEPeripheral” project provided by TI is used as a reference.
  9. Code Implementation 2. Declare HandleKeys function 1. Enable “simplekeys” service and register Key event to be processed in “SimpleBLEPeripheral_ProcessEvent” task function simpleBLEPeripheral.c simpleBLEPeripheral.c SimpleBLEPeripheral_Init 3. Process Key event in “simpleBLEPeripheral_ProcessOSALMsg” simpleBLEPeripheral.c S..Peripheral_ProcessEvent S..Peripheral_ProcessOSALMsg 4. Response with enable/disable advertising1 by updating GAP and send notification2 through GATT simpleBLEPeripheral.c S..Peripheral_ProcessEvent S..Peripheral_ProcessOSALMsg S..Peripheral_HandleKeys Code Location … 1 2
  10. Software Development • The debugging and testing is performed on an Iphone 5. • Programming environment: Xcode 5. • An App is developed with button connection, button test, and flappy bird game functions. • Bluetooth communication is handled by BLE Controller object, when BLE notification is sent to the Iphone, the updated key information is passed to BLE Connection View Controller through delegation. BLE Connection View Flappy Bird View • BLE Connection View includes BLE initialization view and button test view. • Source Code of CC2540 Keyfob IOS demo and Spritybird app are used as references.
  11. App Flow AppDelegate object AppDelegate object BLE Connection View Controller object BLE Connection View Controller object Flappy Bird View Controller object Flappy Bird View Controller object BLE Controller object BLE Controller object Flappy Bird View Controller View Flappy Bird View Controller View BLE Connection View Controller View BLE Connection View Controller View UIButtonUIButton Scene object Scene object BirdNodeBirdNode SKSprite Node SKSprite Node UILabelUILabel UISwitchUISwitch UIImageUIImage
  12. Button Connection Interface BLE Button Start scanning Key status indicator Connection status indicator Button Connection Interface handles the Bluetooth scanning and connection status indication.
  13. Button Test Interface Real time updated data Minimum time interval between clicks/touches Maximum frequency (mean of 5) Screen touch dataBLE button click data Button Test Interface implements a function to get the button clicking time interval for studying the usability of the BLE button as well as providing data for power consumption test.
  14. Button Characterization • The power consumption of the BLE button is characterized using a 34410A high precision multimeter and an external power supply. • The firmware is modified to control one key and one LED only. As there are other peripheral devices connected on the Keyfob such as buzzer, accelerometer which introduce leakage current to the module, the measured power consumption only reflects the relative power performance of the BLE key press application. • In the following test, the multimeter is configured with 0.6 ms sample interval time, 50000 current data of the button performing different tasks within 30 seconds is recorded and analyzed.
  15. Test Result Connection interval: 100 ms Slave latency: 0, RF power: 0 dB
  16. Clicking Frequency Comparison Calculated Ieffective 1.17 mA 1.30 mA 2 The button can reach a clicking frequency of 7 Hz, close to 9 Hz maximum frequency of the screen touching.
  17. Conclusion • For simple BLE applications, using embedded MCU reduces circuit complexity. In this case, battery size becomes the major constrain for the further miniaturization of the device. 16 mm diameter CR1632 could be an option when the power consumption is properly managed. • For more complicated system on button cell sized board, 6/8 layers PCB design needs to be considered. • By using the plastic button, ceramic chip antenna can be placed on the top side of the board, which saves the overall board space. • CC2541 Low power mode saves additional 20% energy. • Red LED using as a indicator, powered directly by the MCU, avoiding additional transistors. • In data transmission mode, the effective current consumption of the BLE with button function is above 1 mA. • The BLE button can be used for action intense applications.
  18. References CC2541-TPS62730EM Reference Design CC2541 Programming Guide CC2541 Mini Development Kit Sample Code https://github.com/kirualex/SprityBird (Sprity Bird Source Code) http://processors.wiki.ti.com/index.php/Category:KeyFobDemo (Keyfob Source Code) Software used Circuit and PCB design: Diptrace Freeware Edition Firmware development: IAR Embedded Workbench Software development: Xcode 5.1.1 Mechanical concept design: SketchUp http://youtu.be/aoQFClP3_eY A Demo can be found in the link below.
  19. Time Line* CC2540 received Design completed July 14 July 16 July 27 July 9 Order placed for CC2540 MINI DK Firmware completed July 19 Apple developer license received July 23 Software completed Characterization &Demo July 30 * Completed during spare time
  20. Thank you!
Advertisement