Even though FlexVolt sensors have a pretty long battery life, roughly 10 hours depending on use, it would still be nice to be able to keep an eye on the battery level, right? It would help to know when the sensor battery is low. It would also be nice to know how much life the battery has left.
Battery monitoring required changes to the FlexVolt firmware – the programming in the sensor microprocessors. I implemented and tested battery monitoring in the FlexVolt firmware today, and now it’s ready to go! All sensors that ship out from now on will have the updated firmware so that they can transmit battery status to the apps. Next I will update the apps to make battery status visible, including some sort of ‘time remaining’ status, and notifications when battery is getting low!
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
I’ve just finished prototyping a version of FlexVolt, using the Hacker, with a Bluetooth 4.0 radio module. There is still much work to do, but this paves the way for a FlexVolt sensor that uses Bluetooth 4.0/LE, which would make an iOS app possible! Folks have been asking about iOS apps for a while, and the answer used to be – “No, I’m not thinking about an iOS app right now because Apple makes it hard to work with Bluetooth 2.” Now the answer is “Coming soon!”
Want to connect to FlexVolt sensors using your own software? You’ll need the FlexVolt Connection API. The API (Application Programming Interface) lists in detail all the commands and procedures necessary for connecting to a FlexVolt sensor.
The FlexVolt App is on GitHub*! Check it out here. Whether you want to help work on the app, you want to figure out how to write your own software to talk to FlexVolt sensors, or you just want to see what an app looks like, go have a look!
* If you’ve never used GitHub before, it’s a great place for collaborative software projects. Or collaborative recipe books! The point is, the project files live in the cloud, it’s easy for any number of folks to access and change them, all the changes get synced and merged properly among all users, and it’s easy to go back in time to any previous state because all change history is saved.
As always with a new app, I need your feedback. Use the in-app bug report generator on the ‘help’ and ‘connection’ pages, or send comments to email@example.com. Feature requests, bug reports, or general critiques are all welcome and appreciated!
The Chrome App should run on any computer running the Google Chrome Web Browser. You’ll still have to pair your Android or computer with the sensor first. Use the default pairing code ‘0000’.
Home Page: Trace Plotting Task:
Bluetooth 8-Channel models are out of stock – let me know if you want one and it’ll help me gauge how many to order this round.
Fulfilled ALL remaining pre-orders. The 8-channel Bluetooth model was the hold-up due to some design revisions, but now the design is complete and tested.
Chrome App (in beta testing now!) – A much improved version of the FlexVolt Viewer has been developed using google’s Chrome app framework. It’s a big step up from the Processing version in both form and function!
Android App (in beta testing now!) – An Android-compatible version of the FlexVolt Viewer app is currently being tested by a small group of FlexVolt users. This app should become publicly available before the end of March, 2015!
Moving Forward With User Feedback
I have been receiving great feedback from FlexVolt customers and the app beta-testing group. Medical professionals who are interested in using FlexVolt have expressed excitement over the existence (‘finally’) of a device like FlexVolt, which makes EMG measurement simple and affordable. I am working with input from these professionals to add useful software features, including additional measurement modes and physical therapy games, to make FlexVolt better!
A round of FlexVolts shipped this week. Another round is ready to go, as soon as the end-panels are machined. I have yet to make a workable jig for machining the usb-plug and switch holes (rectangular) in the enclosure end-panels. For now, I machine them on a Bridgeport milling machine, which does a beautiful job, but is extreme overkill!
A learned this week that it can be difficult to find original products and avoid knock-offs. One example is a pcb-protected 14500-style rechargeable lithium-ion battery. The market is flooded with fake ‘trustfire’ and ‘ultrafire’ batteries. Some of these fakes have lower, or higher, capacities. Some are missing the over/under charge protection! I have for the time being chosen a Michigan-based battery supplier, paying higher prices for batteries to guarantee they are what they should be….
AND – I have a nearly-working mobile app running on Android. It finds and connects to FlexVolt. It can plot interactively. With a bit more work, I will have muscle signals plotted on my phone – Hooray!
As usual, the process of ordering PCBs – communicating with the assembly house, placing orders, correcting errors, working through questions, dealing with them using the wrong files, and finally seeing good photos of complete PCBs and asking them to PLEASE ship them to me before Christmas – took longer than it should have.
The good news : The next round of FlexVolts is on its way to me, and that means that in 1-2 weeks, it’ll be on it’s way to you!
The additional good news for me: The next FlexVolt order I place will likely be large enough to move to a more response PCB printing and assembly house = Hooray!
Here’s what the new 8-channel bluetooth PCBs look like:
FlexVolt Bluetooth 8-channel, version 2.
This version has a bigger footprint, allowing for 8 channels in a row, instead of 4 on 4 stacked (version 1). The USB interface was removed for simplification and safety – now Flexvolt NEVER has to be connected to the computer while you are measuring data, and you can’t measure data while it’s charging. This might seem like the loss of a feature, but the gains in safety are worth it, and nearly everything has Bluetooth! For systems that don’t have Bluetooth, USB dongles can be obtained and set up very cheaply.
The software is nearly done. I’ve migrated everything to JAVA (from Processing), added a bunch of features, and made it easier for community members to add their own app pages! Now back to work…