One I’d convinced myself it would be possible using a Bluetooth 4.0 module to connect FlexVolt to iOS devices, I had to start figuring out how to make the hardware, firmware, and software changes necessary to switch modules.
Fortunately, I was able to find a Bluetooth 4.0 module that is very similar to the Bluetooth 2.1 modules I have been using. The modules are the same size and use the same pin layout, making them interchangeable on the FlexVolt PCBs. Great!
Less fortunately, the modules use substantially different AT commands and protocols, so I had to spend some time learning how to program and communicate with the new Bluetooth 4.0 modules. I updated the FlexVolt firmware so that it can program and communicate with either module – the old Bluetooth 2.1 EDR and the new Bluetooth 4.0, based on a firmware switch.
On the app side, Bluetooth 4.0 and Bluetooth 2.0 follow somewhat different steps to connect a device and send data back and forth. I found a new Cordova Bluetooth Low Energy plugin and wrapped it in new connection services to find, connect to, and receive data from the new Bluetooth 4.0 modules.
FlexVolt Viewer running on an iPad
FlexVolt Viewer, running on an iPad, connected to a FlexVolt sensor over Bluetooth LE
Putting it all together
I now have a prototype FlexVolt sensor talking to the FlexVolt app! That’s exciting!
Bluetooth LE limitations
Bluetooth LE has a significantly lower data rate compared with classic Bluetooth. While current Bluetooth FlexVolt sensors can run 8 channels at 1 or 2kHz sample rates, the Bluetooth LE versions will be limited to approximately 1 channel at 1kHz, or 2 channels at 500Hz, etc.
Which Sensor Do I want? Classic Bluetooth 2.1 or Bluetooth LE?
Bluetooth 2.1 EDR (currently available)
- High data rates – At least 16kSamples per second. For example, 8 Channels at 2kHz is no problem.
- ~10 hour battery life
- You want/need a sensor now (Bluetooth 4.0 sensors are still being developed and tested)
- You need high data rates for research or your own prototyping/development
- You want to try out your own data processing filters and algorithms, so you need high sample rate raw data
- Lower data rates – Roughly limited to 1kSamples per second. So 1 Channel at 1kHZ, 2Channels at 500Hz, etc.
- 15-20 hour battery life. That ‘LE’ stands for low energy! Even though LE is really designed to take advantage of long idle periods between data transmissions, the relatively constant data stream used by FlexVolt still enjoys energy savings with Bluetooth LE compared to Classic Bluetooth
- You want to use FlexVolt with iOS devices
- You like the longer battery life
- Navigate Apple rules and figure out how to make an iOS version of the FlexVolt app available on the iOS App store, iTunes.
- Finish hardware, firmware, and software design and testing for use with Bluetooth LE module and iOS devices.
- Sort out buying options on the products page so people can choose between Bluetooth 2.1 and Bluetooth LE