element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Safe and Sound
  • Challenges & Projects
  • Design Challenges
  • Safe and Sound
  • More
  • Cancel
Safe and Sound
Blog Safe & Sound - The Companion IoT Jacket #10: MSP432, BLE and 3D Printing module one
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ipv1
  • Date Created: 6 Jul 2017 11:47 AM Date Created
  • Views 1080 views
  • Likes 4 likes
  • Comments 4 comments
  • safe and sound
  • ip_iot
  • safe & sound
  • safety_jacket
Related
Recommended

Safe & Sound - The Companion IoT Jacket #10: MSP432, BLE and 3D Printing module one

ipv1
ipv1
6 Jul 2017

  • The Design Evolution
  • The First Module: The Sensors and Communication Core
    • a. The Challenges
    • b. I2C and The Sensors Booster Pack
    • c. Simple Network Processor API and the CC2650 Booster Pack
      • - The Pain in the B*&&
    • d. Some more tasks
    • e. Enclosures
  • Conclusion

With the last week upon us, its time to complete this project and hence the home stretch. In this post, I am going to start by explaining the mutation of my design, the change in design and then the first module in detail. This is one of four blog posts that will explain my implementation, demonstrate the project and finally summarise the work done. I initially planned to schedule these posts due to health issues, however, the extension in deadline has caused a change in that plan and I will be checking in for the comments.

 

 

The Design Evolution

 

My initial intention was to create a safety jacket for industrial workers, however as my understanding of the components evolved, so did my design. Firstly, my initial design included a CC1310 which works on a frequency band which is not allowed in my country which puts a bit of a dent in my plan. The alternative is to use the BLE connectivity for the IoT-ivity.    Next the BQ25570 and superCap combination does not have enough juice to run the complete system, hence, an alternative power source needs to be deployed. Lastly, I am not a professional programmer hence I would have to depend on copy-paste and a lot of trial and error to get things to work.

 

My final design is hence divided into three sub-sections as described below.

 

image

 

I will be explaining these blocks one at a time so as to provide sufficient detail and place for discussion. Lets get started.

 

The First Module: The Sensors and Communication Core

 

 

One of the requirements of this design challenge is the inclusion of the MSP432 Launchpad and in my case, we need to add the CC2650 Booster Pack to the mix. The Sensors Booster Pack provides all necessary parameter for this case and this data is sent wirelessly to the Android/iOS or PC which can then send the data to the cloud and other data sinks.

 

 

a. The Challenges

 

 

TI has been hard at work releasing the new version of TI RTOS and I did a video demonstrating the sample code. I had shown how the demo code for the Sensors BP did not work at all (https://www.element14.com/community/community/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/blog/2017/04/10/safe-sound-safety-jacket-for-the-tolling-industry-7-cloud-ccs-and-sample-code-issues) and I took it as an opportunity to learn about coding drivers.

 

 

b. I2C and The Sensors Booster Pack

 

 

The first step was to write code to interface the TMP007 and Ambient Light Sensors. Project Zero works and was my starting point and the addition of I2C Setup code was the first step since most of the sensors use the two wire bus for communication.

 

 

[I2C Setup Code - [Code to be added from a Gist by the 9th of July]]

 

 

The code for the TMP007 was coded with the sample codes as a base and the Ambient sensor code was easy to implement as well. The idea is to have tasks for each sensor so that their frequency can be managed. Additionally some sensors can provided interrupts and would be better implemented separately. 

 

 

[TMP007 code - [Code to be added from a Gist by the 9th of July]]

 

 

c. Simple Network Processor API and the CC2650 Booster Pack

 

 

The BLE code was the hardest part to work with and the most rewarding in terms of the learning experience. The CC2650 module has a processor inside it and can function as a standalone network processor, however in this application, it is required to serve as a slave device to the MSP432 such that it can be replaced or even upgraded to the newer Bluetooth 5.0 devices. The communication happens over a UART and an additional three pins are required to make things work.

 

 

The CC2650 in our case has the UART slave firmware loaded, however, SPI can be chosen as an alternative to UART requiring a simple firmware upgrade. Once the firmware is loaded, Project Zero from the MSP432 SDK - Bluetooth Plugin resources can help expedite the process of setting up your first project.

 

 

Project Zero has the following important points.

 

1. It works with the newer versions of the TI-RTOS. There have been some extensive changes in the TI RTOS system hence some projects are not yet fully operational.

2. Three services come preconfigured which include an LED service(Read and Write), a notify service(to subscribe to events) and a data service(I have no idea what that does    )

3. The advertisement data does not include any information on the services which means the client has no idea of the service being provided unless it connects and interrogates the server.

4. All UUIDs are 128-bit which is an inconvenience since they are just too long and painful to remember.

 

 

In addition to changing the name of the CC2650 from Project Zero to a more appropriate one, I also added the services for the temperature sensor which is a notify service and an ambient light sensor service which I experimented with more that I should have  

 

 

The advertisement data had to go through massive modifications as well and it was a HUGE pain in the B*&&. Here is why.

 

 

- The Pain in the B*&&

Bluetooth profiles can be configured using a free tool from https://www.bluetooth.com/~/media/developer-studio/index . Most manufacturers have provided their own plugin that will parse the code for their SDKs and for TI the plugin can be downloaded from http://software-dl.ti.com/lprf/bds/ti-bds-plugin.html .

 

 

Unfortunately, the generated code is no longer compatible with the newer BLE SDK plugin.

 

image

 

I wanted to do something with the newer compiler so the only option is to do a trail and error of the produced code. My requirement is to advertise the services since my NodeJS app likes to get that info off the bat. A better understanding of the BLE Frame and packets is necessary and I found the explanation at http://www.argenox.com/a-ble-advertising-primer/ very useful. The docs at https://docs.mbed.com/docs/ble-intros/en/latest/Advanced/CustomGAP/ are very useful.

 

 

By editing the project_zero.c and relevant profile.c files, the desired result can be achieved. Long story short, I was able to remove some manufacturer information and replace it with service information. There are only 31-bytes available for the Device Name, Flags, URIs and service data so the choice was a difficult one. All UUIDs were shrunk down to 32-Bits so that everything fits in. Instead of a tutorial, I am sharing the code on github for anyone interested in following along.

 

 

The result is the ability to get data from the sensors over BLE and an understanding of how to use the SNP better. For a TI tutorial on the subject that is a bit out of date, please visit http://software-dl.ti.com/lprf/simplelink_academy/modules/ble_01_bds/ble_01_bds.html Another must visit is http://software-dl.ti.com/lprf/simplelink_academy/overview.html

 

 

d. Some more tasks

 

 

There are two more tasks that the MSP432 must perform and that is the transmission of data over a serial line and monitoring of power. The data will be used in a module explained in the proceeding sections. Needless to say that the MSP432 is being used to do a lot of stuff and still feels under-utilzed.

 

 

e. Enclosures

 

 

This is a wearables challenge and my target is a jacket which leave a lot of room for imagination. I chose a small box like enclosure which will be placed in the pocket of the jacket. The enclosure was design in Autodesk Fusion 360 and 3D printed on a Cel Robox.

 

image

image

image

image

 

The result is a tight box with the headers exposed which will be used in module 3 of my design. The Sensors booster pack has been trimmed and enclosed in a box that can be fitted to the jacket. I2C lines will run down inside the jacket to where the core module is.

 

Conclusion

 

I have started laying out the final submission starting with module one which has the MSP432, the sensors booster packs and the CC2650 with a lot of custom code. With the enclosure complete and handed off to my better half, the final product should be something to look forward to. Getting there...

  • Sign in to reply

Top Comments

  • ipv1
    ipv1 over 8 years ago in reply to DAB +2
    Wise words. Unfortunately TI's Cloud CCS does the upgrade automatically and there could possibly be a setting somewhere to take the compiler version down a minor rev. My issue was that the discovery of…
  • ipv1
    ipv1 over 8 years ago in reply to Jan Cumps +1
    Unfortunately no. I tried with a number of frequencies but then the BER rises in the name of Shannon.
  • ipv1
    ipv1 over 8 years ago in reply to DAB

    Wise words. Unfortunately TI's Cloud CCS does the upgrade automatically and there could possibly be a setting somewhere to take the compiler version down a minor rev. My issue was that the discovery of the dependencies came too late and like I said, the information is quite scattered due to the large portfolio.

     

    TI in making a combined API created a monster that takes a while to tame. image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 8 years ago

    Nice update.

     

    I have found it useful to lock in tool versions for projects so that we did not run into update problems like you experienced with the BLE.

     

    It is always better to use a version of software you know than take a chance on an update that might do more TO YOU than it does For You.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ipv1
    ipv1 over 8 years ago in reply to Jan Cumps

    Unfortunately no. I tried with a number of frequencies but then the BER rises in the name of Shannon. image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 8 years ago

    The 1310 can be configured for different frequencies. Is there none of these  in sub-1 GHz range that can be used ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube