Thursday, 28 February 2013

Prototype Version 0.5b

As I recover from my accident I have been doing a little work progressing the prototype hardware to the next version. This version incorporates a few user suggestions, improves the look, and is slightly easier for me to make.

A summary of key changes from version 0.4b:
  • A new case based on the Dangerous Prototypes Sick of Beige DP5031. This is slightly smaller than a tic-tac box in length and width, but it is a little thicker. The extra $1.50 compared to a box of tic-tacs is worth it, considering that final assembly is easier, it is noticeably smaller, and it looks way cooler. A few people have mentioned that they are concerned that the sides are exposed. I am not. If you are, just put the whole thing in a small ziploc bag or 40mm heatshrink. 
  • I have switched from mini USB to micro USB for the charging point. This is the same as pretty much every Android device and it should be easier for most people. The connector is a little more flimsy, but I have been generous with the amount of solder I use to keep it on. 
  • I have changed the battery type to a 35x30x6mm 600mAh LiPo. This smaller capacity is a compromise based on what was available (I could not get more of the old one) and what would fix in the new case. The battery life is now around 12 hours, which is still way more than is really needed. 
  • The new PCB layout is a little neater. All of the LED's are lined up on the side. The RN42 antenna does not hang over the edge of PCB. Apart from looking cooler, this results in the device being easier to make.
  • I have changed a few of the tantalum capacitors to ceramics. This has reduced the electrical noise by about 10%.
I have only made a small run of prototype version 0.5b. There are a few available through the order site. See the image below:



Prototype version 0.6b is in the works. It will be very similar to version 0.5b, but with a few more PCB layout tweaks to make it even easier to manufacture. I intend to release the complete design files for that version under some sort of permissive free licence (including PCB gerbers, schematic, and PIC24F code).



Saturday, 9 February 2013

XCSoar Integration

Great news! Thanks to the XCSoar dev team (particularly Tjeerd), the BlueFlyVario is now integrated with XCSoar. For the moment the integration is in the XCSoar testing app available on Google Play here https://play.google.com/store/apps/details?id=org.xcsoar.testing&hl=en. I understand that features in the testing app will migrate to the stable version over time. Because of my injury I have not flown with this yet so my comments are based on testing on the desktop.

The BlueFlyVario pressure data sent via bluetooth is used by XCSoar in a similar manner that would be used to process pressure data from an internal pressure sensor or a serially connected device. The current implementation uses a Kalman filter to smooth the data. (http://git.xcsoar.org/cgit/master/xcsoar.git/tree/src/Device/Driver/BlueFlyVario.cpp). It provides XCSoar with barometric altitude and vario data (see line 90 and 92 of the driver).

A few tips to getting it working:

  • Make sure you have paired the BlueFlyVario with your device prior to starting up XCSoar. You should only ever need to do this once (not every time you use it). 
  • Ensure that your device's bluetooth radio is turned on prior to starting XCSoar. 
  • Ensure that the BlueFlyVario is turned on prior to starting XCSoar. 
  • Click Menu|Config|Config 2/3|Devices (You can also do the same thing through Menu|Config|Config 2/3|System|Setup|Devices - this is what the screenshot below is from). Select a disabled device and click Edit (probably "B: Disabled" if the only other device you have connected is the internal GPS). Set the "Port" to the particular BlueFlyVario device (you will only see the BlueFlyVario device here if the bluetooth radio is turned on). Set the Driver to "BlueFly Vario". At this point you might need to close and restart, perhaps reboot the device, maybe use the reconnect feature. It was a bit fiddly for me the first time around. For me now, the BlueFlyVario connection to XCSoar seems pretty robust and happens automatically. 
  • You might like to switch a few of the info boxes around. The Vario Trace one is handy to get good feedback from testing. Don't forget that to get the Barometric Altitude working you need to set QNH.
  • You might like to turn on the Audio Vario gauge.
  • You might like to change the "Look" by setting the InfoBox geometry to one that includes the  word Vario in it. 

An example of what the setup should look like.
How you could configure the screen to included extra data from the BlueFlyVario.
A todo in the XCSoar code is to do something with the BlueFlyVario battery status that is sent every ten seconds. I am not sure if that will end up being used. 

This does not mean I am going to give up on developing my BlueFlyVario android app. There are many things I still want to do with my app that I could not do easily in XCSoar. Additionally, my understanding of C magic is quite poor. I will stick with developing my stuff for Android in Java.