Monday, 11 November 2013

BlueFlyVario found

This is a cool story. It is about the BlueFlyVario, but it shows that people are awesome, and that random events can be great.

Stephan was one of the first people who supported the BlueFlyVario vario project by purchasing a version 6 prototype. It was one of the first ten which means he had one with a green pcb. About a month ago he ordered another via the website. I figured he really liked it and was purchasing one for a friend. After I shipped it I forgot to ask him more about it as I got consumed in preparing version 7 (another blog post about that soon).

In the middle of last week I got an email via the website from Balazas in Hungry:
I found a Blue Fly Vario V6 device in Austria near a paragliding area in the bush last Friday while I was there for rock climbing. It was wet, and one of the plastic case is broken, but it works as I tried it. If you can help, I would send back to the owner, probably someone lost it.
It was awesome for Balazas to get in contact with me. In a later email he mentioned that he was motivated by a desire for those that do sports in the mountains to help each other as our sports can be dangerous sometimes. There was more awesomeness to come from him.

I have kept a reasonable record of who I have sent BlueFlyVario's to. I record the last four digits of the MAC address which forms part of the bluetooth name. So I asked Balazas and after his prompt response quickly worked out the vario was the first one I shipped to Stephan back in May. When he found out:
This is amazing, I lost this variometer approx 100m above ground and heard it crashing into the woods. I would not have given a penny that it is still working. I lost it about two weeks ago, so it must have been laying there in the heavy rains of last weeks, unbelievable!
I put these guys in touch with each other and Balazas quickly sent the vario back to Stephan:
A big thank you guys for finding out and sending it back to me. This is really great and a little sensation for me! First of all that someone found it second that it survived the fall from over 100 meters with very little damage and third that it found the way back home via Australia to Austria... 

You can see above the perspex protocase got cracked in the fall. A new one is on the way to Stephan right now. 

I don't recommend dropping your vario from 100m and leaving it for a few weeks in the rain. Even so, it is great to see that even with this punishment the vario still works.  In fact Balazas said when he first picked it up in the forest he turned out on and it beeped, then he paired it. Some people are awesome.

Monday, 14 October 2013

Working with other apps

The BlueFlyVairo prototype hardware is now compatible with at least three apps that I know of (other than my own BlueFlyVario Android app). XCSoar and XCTrack have been able to read the pressure stream from the BlueFlyVario for months now. Variometer - Sky Land Tracker is new. In this post I offer a few tips to get your device working with them. I don't control the ongoing development of these apps and can not provide support or endorsement. The purpose of this post is to let BlueFlyVario uses know of app choices they have.

XCSoar

XCSoar was the first app that the BlueFlyVario was compatible with. It is perhaps the most popular open source glide computer available. Here are a few tips to getting it working:

  • Use the following procedure:
    • Pair with the BlueFlyVario device in your Android device bluetooth settings (not from in the BlueFlyVario app). 
    • Turn off the vario and restart your device again (this might not be needed, but it can't hurt).
    • Install XCSoar from the Play Store. 
    • Ensure Bluetooth is turned on your Android device and open XCSoar. 
    • Ensure the BlueFlyVario is turned on (the next step must be done in 180 seconds or the blue flashing light will go off and you will need to restart the BlueFlyVario - you can alter this time in the hardware settings). 
    • Open XCSoar (click Fly) and go to the devices menu (Config|Config 2/3|Devices). 
    • Select device A: and click Edit. Select the BlueFlyVario device you paired with (It will be BlueFlyVario-XXXX, where XXXX are the last four digits of your mac address). Change the Driver to 'BlueFly Vario'. Keep K6Bt Off and Ignore checksum Off (I have not played with these settings).  
    • Select device B: and Edit it to Built-in GPS & Sensors. This is what Device A was before you changed it in the last step. The order of devices is important. If you did not do this then XCSoar would connect with an internal barometer (if present) instead of the BlueFlyVario. 
  • It should now be working. If not, then continue as follows:
    • Exit XCSoar and restart your Android device. 
    • Restart the BlueFlyVario.
    • Open XCSoar. 
    • Go back to the devices menu and see if it is connected. Also, does the blue light on the BlueFlyVario change from flashing to solid. If it is connected (solid blue light) but the data does not seem to be registering baro or vario you might also want to look at the Monitor from within XCSoar to see what is being streamed. 
  • Ali got this far and still could not get it working on a particular model of tablet (even though the BlueFlyVario app worked well). He managed to get it working by installing BluetoothBridge from the Play store. The bridge connects to the BlueFlyVario, then in XCSoar he connects to the bridge using TCP/IP. A novel solution to what I suspect is some kind of incompatibility between XCSoar and the bluetooth system on his device. 
XCTrack

XCTrack is more focused towards paragliding competitions. You can get it from Play here. To get it working with the BlueFlyVario you will then need to upgrade to the developmental version from within the app using Menu|Preferences|Testing and Debug|Update XCTrack. Once you have the new version installed change the 'Sensors' preference 'Use external bluetooth'. 

Variometer - Sky Land Tracker

This app is from the Korean developer SuengHo. Get it from the Play store here. There are many features I have not tested. To get it working with the BlueFlyVario click on the bluetooth icon on the main screen and follow the instructions in the app. 

If you know of other apps the BlueFlyVario is compatible let me know and I will update this blog post. 


Friday, 30 August 2013

Where are BlueFlyVarios?

After the last post a few people asked me where all the BlueFlyVarios have gone. I did a little analysis that I feel is worthwhile sharing. The graph below shows which countries the first 142 units of prototype version 0.6b have been sent to.  It is not entirely accurate as there are a few of them which I have sent to someone to pass on to others. Also it does not capture the 40 or so units of earlier prototypes. About 20 of the most recently orders ones would still be in the post. Still, it is interesting.

It is unsurprising that over a third of them have gone to Australians. A lot of these have gone to friends (thanks guys!) and friends of friends. The one to Antarctica should probably also be counted as an Australian as he is down there for work. It would be cool to see a picture of it in use over the ice. If you group Australia with NZ, US, CAN and UK then you can see around 60% of the various have gone to countries that use English as the primary language. I guess that is probably a result of how the word gets around and that my blog posts, facebook page and app are all only published in English.

European countries represent about 40% of the total. This was bumped up recently with half a dozen to a German pilot. In recent weeks I have seen increase interest from continental Europe.

It is nice to see a pair going to Israel and Iran. I do not really want to make comments on international politics, but I do like the fact that a love of paragliding is shared by many nations.

Ten going to Reunion was a bit of a surprise. I did not really know much about that French island off the coast of Africa prior to the order. It is now on my list of places I must visit for a flying holiday.

And last, thanks to my mate Jim who is doing it tough in the Philippines for a few years.


Monday, 19 August 2013

More than 100 BlueFlyVarios shipped in 10 weeks

The Last 11 Weeks

The latest prototype with on-board audio has been hugely popular, much more so than I expected. I thought there would be demand for about five units a week, but over the last month it has been more like fifteen. I have been a little overwhelmed with the interest and at times have had a few issues with component supply. Many components have a lead time of three weeks or more, and I failed to order enough of them. I think I have sorted out supply for at least the next two months unless demand increases again.

The graph below shows how the project has grown by plotting web based orders since the prototype was released on 31 May. In addition to the 100 or so units graphed below I have supplied about 20 to local pilots and non web based orders. There was a significant increase in demand just after I created the Facebook page to help spread the word, and there has been a small slowdown while I have had some component supply issues. These are now fixed and I should be ready to fulfill interest over the next few months.



Production Streamlining

I am still assembling each vario by hand. I have to say that assembling, programming, debugging, testing, packing and shipping 120 mini varios at home is not a task to be embarked on without due consideration. I have considered various options for getting someone else to do assembly and shipping. The PCB assembly part is the most obvious, but it only represents about 30% of the time to make each vario and I think outsourcing it would be more hassle than it is worth, and more expensive. I have become much more efficient at the overall process and now it takes me about half as much time for each vario as it did when I started.

I am lucky that this year I have little work in the evenings or on the weekends and have time to continue to pursue this hobby. Also, for the last eight months I have not been able to fly as I continue to recover from being broken in an accident in December last year. I should be able to get back in the air in the coming weeks and am looking forward to actually testing one of the varios myself. This will mean less time to make and develop varios if the weather cooperates, but thankfully for the project (and unfortunately for my flying prospects) the weather often offers non-flying days.

Further Development

The current version 0.6b prototype is proving stable and I intend to continue producing it for at least the next few months. Only one person has reported a error with the hardware (the switch broke) from over 100 varios in use. I have a few ideas for the next hardware version. Most of these are about making them easier to assemble. I have been very focused on hardware production and development, perhaps when I get back in the air I will focus more on making the app better.

Tuesday, 30 July 2013

Translucent Blue Cases

If you have been following the blog for a while you will know that I have been shipping the BlueFlyVario with the DP5031 prototype cases from SeeedStudio since prototype version 5. It is a great case that very adequately does the job of protecting the components on the board from knocks. Since prototype version 6 the PCB also has clear pvc heatshrink on it to help keep the battery and neoprene in place, and protect the components from dust and sticky fingers. Together the heatshink and prototype case make the device look a little polished, but it still retains the prototype look and feel.

I figured I was ordering quite a few of these cases from Seeed so approached them about getting a large custom order. With the help of Dangerous Prototypes I was able to organise for the cases to be made from translucent blue acrylic. After a few minor challenges the cases arrived earlier this week and I have already shipped a bunch with the current prototype version 6 to fulfill orders from the last week and a half.

A nice thing about the way this custom order was shipped to me from Seeed is that each prototype case came in a robust bag. When combined with a BlueFlyVario this is how it looks when I ship the components.


Not everyone is super comfortable with the prototype case. In a blog post coming up soon I will outline what others have done to design an enclosed case which can be 3D printed. 

Friday, 19 July 2013

App updated to improve performance

A rainy day gave me the opportunity to improve a few things in the BlueFlyVario app. A new version (0.61b) has been uploaded to Google Play and should push out in the next day.

Performance Improvements
  • A more efficient way to read the incoming bluetooth stream has been implemented.
  • Some code has been added to throttle the frame rate. Previously the app just tried to redraw itself as quickly as possible, and as a consequence sucked up all available cpu cycles. The frame rate is now limited to 20 fps, although you can change this through Menu|Settings|Layout and Display|FPS. If you have a slow old device you might like to slow it to 10 fps or even 5 fps. If you set it too high it will just go as quickly as possible.
  • Some memory optimizations and tuning to reduce the need for garbage collection and improve execution speed.

Stability Improvements
  • Some new code has been added to change the way that Bluetooth connections are made. If you are having problems with a stable Bluetooth connection, or being able to reliably connect, try the following:
    • Start the BlueFlyVario app. Go to the app's Menu|Settings|Bluetooth area. Ensure the normal connection method is set and ensure connect on start is not checked. 
    • Exit the app (fully, by either restarting your phone or force stopping the app)
    • Unpair the BlueFlyVario from within the Settings area of your phone, then restart your phone. At this point you should have no BlueFlyVario record in the bluetooth connections, and when you start the app it should not try to make a connection. 
    • Next, turn on the BlueFlyVario hardware and pair it with the phone from the phone's Settings area. Note that you will not need a pin on newer Android devices.
    • Now, start the BlueFlyVario app and use the Menu|Connect Device to connect. It should connect to the hardware via the 'normal' method and using the pair record from the phones Settings area. 
    • If that does not work (it might not on android 2.3.x devices), change to the 'reflection' connect method.
  • Some bug fixes to avoid very irregular application crashes. 
The best news from all of this is that the performance improvements should increase the phone's battery life while the app is running, perhaps by as much as 30% due to avoiding wasted cpu cycles. 

Tuesday, 2 July 2013

Hardware Settings

I this post I am going to try to be pretty comprehensive all of the settings that control the BlueFlyVario prototype version 6 hardware. These settings are altered from the Android app using Menu|Settings|Hardware Settings. This menu item can only be accessed when the hardware is connected to the Android app. Although many of the settings are similar to those that control the audio on the Android device, they are completely independent. Both the app and the hardware work on the raw pressure stream, and none of the hardware settings alter how that raw stream is sent out. When you change a hardware setting through the app it is altered immediately and is stored in the memory on the hardware.

Edit: This post describes hardware settings in the version 6 prototype. There are some new hardware settings for the version 7 prototype. You can read about them here.

General Settings

The first few settings are pretty self explanatory:
  • useAudioWhenConnected (default = false) - If true the hardware audio will sound when the device is connected via Bluetooth. 
  • useAudioWhenDisconnected (default = true) - If true the hardware audio will sound when the device is not connected via Bluetooth. 
Next:
  • positionNoise (default 0.1) - This setting controls one of the parameters for the KalmanFilter that is built into the hardware. A higher value gives less sensitivity by smoothing out the noisy pressure measurements. Try 1.0 to see the difference.
And near the bottom:
  • secondsBluetoothWait (default 180) - This setting controls how many seconds the hardware will keep its bluetooth radio on while waiting for a connection. 
Audio Thresholds

The audio switches on and off based on the measured vertical speed. The settings liftThreshold, liftOffThreshold, sinkThreshold and sinkOffThreshold control when the sound comes on and off. The graph below describes how this works and what the defaults are. It is fine to set the on and off thresholds to the same value, but you will get funny results if the off threshold is higher than the on threshold. 


Essentially what happens as you enter lift is that the vario senses a decreasing pressure. Note that there is a slight delay between the movement and the sensed lift due to the way the filtering works. An updated value of filtered lift gets calculated from each pressure measurement, 50 times a second (or every 20 ms). The first time the lift goes above the liftThreshold a beep is scheduled for a duration controlled by the beep cadence formula (see below). That beep will last for as long as the beep cadence, then a period of silence will be scheduled, this time based on the most recently measured lift duration. Only at that time 'beeping' could end, but if the lift continues to be above liftOffThreshold, then another sequence of beep followed by silence will be played.

Beep Cadence

When beeping commences a beep is initiated for a duration based on the measured vertical speed. As soon as the beep stops a silent pause will then be initiated, again for a duration based on the measured vertical speed. The graph below shows the formula used to control the beep duration based on the measured lift. Essentially, it means the faster you are going up, the faster the beeps will occur. Note the rateMultiplier settings can make it go faster as shown below. A rateMultiplier setting of 0.5 will make it beep twice as fast. 


Audio Tone

In addition to the thresholds and cadence, the audio tone is adjusted based on the measured speed by the four settings liftFreqBase, liftFreqIncrement, sinkFreqBase and sinkFreqIncrement. The graph below shows how the frequency changes based on these settings, and also shows what the defaults are. The frequency of the sound is constantly being updated to control the tone as the filtered vario value changes. This is occurring with every measurement (every 20 ms) whether or not the audio is on. This will result in changes of pitch in beeps as they are playing based on updated filtered vario values, and on occasion the sink tone will sound at the end of a beep if the filtered vario value changed to below 0 during a beep being played.


Volume

The BlueFlyVario uses an electromagnetic transducer. You can see the datasheet here . (Edit: I am now using this one ) These devices are driven by a square wave from a microcontroller pin (using the inbuilt PWM ). Using the trick described in the graph below the volume is controlled without needing a variable resistor. Think of the transducer diaphragm being 'kicked' by a high pulse. The more gentle the 'kick' the quieter the sound. The volume setting is not linear.

Reset Hardware Defaults

If you really screw this up, and for some reason you can not fix it through the app, then it is possible to reset the hardware settings to their default values using the procedure shown below. You might have to do this if the bluetoothWaitTime gets set to less than the amount of time required to establish a connection. 

Some Notes
  • The settings I picked as defaults are not the best. Please provide feedback by commenting on this post with what settings work for you and why.
  • The trick to a well performing vario is to get a combination of 'positionNoise' and 'liftThreshold' that works best. If you have almost no filtering (i.e. a low position noise of 0.01) then the calculated vario value will be very noisy. In this circumstance the audio threshold would need to be set at 0.4m/s or higher to avoid errant beeping. These settings would be good if we wanted the vario to be ultra responsive to really jerky movements. However, for flying we bounce around a bit more gently. A position noise of 0.1 with a audio threshold of 0.2 seemed to work pretty well for me. 
  • Most people will probably want to adjust the sinkThreshold setting to less than their glider sink rate, so it is not on all the time.
  • Battery Life will be affected by what settings you choose. The largest consumers of battery life are the bluetooth radio and the electromagnetic transducer. Having both on full time would reduce battery life to less around 8 hours. Most people want the vario to beep when they are in real lift, and the sink tone to only come on when they are in significant sink (-2.0 or so). This will mean that the audio will only be sounding for less than 50% of most flights, which would give you over well over 10 hours battery life when not connected via bluetooth. I will post a more detailed description of battery consumption in a separate post.
  • This could be a chapter of a user manual...