Friday, 12 August 2022

v22 TTL_GPS firmware updates

This is just a quick post to announce new firmware has been release for the v22 TTL_GPS models:

The update involves a pretty comprehensive rewrite of the serial data processing code to improve performance and remove some bugs. This was needed to ensure compatibility with the Kobo Nia and restore some functions on other Kobo models. The updates include:
  • The Bluefly was overwhelmed with data from the Kobo during startup, which switched off further command processing capacity. This has been fixed and the Bluefly should be responsive. 
  • The Kobo startup code on some models was interfered with by the Bluefly. The startup procedure no sends not data from the Bluefly at all until after the startDelayMS time (default of 2 seconds after power on). 
  • Other minor bug fixes including LX mode output, outputFrequency restoration and shutdown reliability.   
See here for firmware update procedures. 

Saturday, 23 July 2022

Firmware updates for v22 models

During the first six months of this year I released four new version 22 Bluefly models to complete the transition to a new processor. Read the earlier blog posts from 2022 to see what the changes are and for a more in depth description of each model. In this post I will describe the firmware update procedure for each model. There are some similarities with the v12 and earlier versions firmware update procedures, but from v22 onwards there is a custom version of ds30loader built just for the Bluefly. 

Updated firmware  

From time to time I need to fix bugs or want to add new features to the Bluefly main application. There are some subtle differences between the firmware for each of the v22 models. 

The software on the Bluefly processor includes a small ds30 bootloader and the main Bluefly application. When the processor reboots it first runs the bootloader program which checks to see if the ds30StudioPro program is trying to communicate with it. If the bootloader does not get the message, then it branches to the main application and the Bluefly will do it's thing. 

At the time of this blog post the most recent versions of the firmware include bug fixes and minor updates. I recommend updating the firmware if you are having troubles, but for many pilots if you are happy with your Bluefly the way it is then updating the firmware is probably not needed. Fixes include:

  • Fixed a bug where the processor hangs unexpectedly. 
  • Fixed a bug where the IGC memory is turned off too early during shutdown and IGC files were not being signed correctly. 
  • Minor updates to default settings. 
  • Other minor fixes. 
It is important you get the firmware built for your model. The most recent version of the v22 firmware will be uploaded here: https://www.blueflyvario.com/files/v22/

Note the numbering format: {MODEL_NAME}_{Hardware Version}.{Hardware Revision}.{Single Digit Model Code}{Two Digit Firmware Build Number}

Tools to download

You will also need the ds30StudioPro program and the latest BFVDesktop application. Get them here:
You will need a computer which can run windows applications, a USB cable (and only for the TTL_GPS model - a USB to Serial converter and some soldering skills) 

Firmware update procedure

The update procedure is similar for each model 

Step 1: Make sure you have your power and connections right.
  • BTH_USB and BTH_GPS_IGC models:
    • Both of these models have the ds30 bootloader communicating through UART1, which is the micro USB port of the Bluefly. 
    • Plug the Bluefly into your computer with a USB cable and make sure to note which COM port is listed. 
    • You might want to connect to the BFVDesktop application just to make sure you know which COM port the Bluefly is installed as. Ensure that you shutdown the BFVDesktop application before trying to update the firmware - only one application can connect to the Bluefly at a time. 
    • Shutdown the Bluefly by long pressing the button. 
    • For bricked varios that are unresponsive to button presses there are additional instructions below. 
  • USB_TTL_GPS_IGC model:
    • This model has the ds30 bootloader communicating through UART3, which is connected to the USB-C port of the Bluefly. 
    • Plug the Bluefly into your computer with a USB cable and make sure to note which COM port is listed. 
    • You will need to power this model, either by starting up the Kobo if it is connected to the TTL port of the Bluefly, or by temporarily closing the USB PWR lines (note that if you are connected to a Kobo and you do this you will damage something - see the warning in the release blog post).  
    • Shutdown the Bluefly by long pressing the button. 
  • TTL_GPS model:
    • This is quite a bit more involved. 
    • You will need to solder a USB-Serial convertor to the UART 3 connection on the back. You really only need GND, Rx and Tx connected if you are already powering it from elsewhere (like the main TTL connection connected to a Kobo).
    • Shutdown the Bluefly by long pressing the button. 
Step 2: Loading the firmware
  • Note that this will overwrite any hardware settings and they will be reset to defaults.
  • Open ds30StudioPro.
    • On the Project tab: Select the Input HEX file*.hex file for the model you are updating.
    • On the Communication tab: Set the port to the one which you know from step 1 communicates with the Bluefly, and the baud rate is set at 115200.
    • On the Bootloader tab: Make sure the Write Destination is just the main flash and not the boot flash.
  • Press the Write button
    • This will start the ds30StudioPro looking for the bootloader on the vario. If the Bluefly main application is still running then you will get an error - the Bluefly needs to be shut down before you press the Write button. 
    • Within a few seconds, press the button on the Bluefly to start it up. If everything works then the ds30bootloader on the Bluefly will communicate with the ds30StudioPro application, the firmware will start writing, and you will have new firmware in the vario in under a minute.
    • When the writing is finished the Bluefly should restart within about 10 seconds. 
    • You might get a communications error because there are some buffers that need flushing in the UART communication pipeline - if so, then shut down the vario and try again. 
    • For bricked varios: There is a special procedure for varios that are bricked (they are unresponsive to button presses to start up / shut down). For bricked varios you need to momentarily short MCLR and GND programming tabs to force a vario restart after pressing the Write button. 

Step3: Testing and Settings
  • Before you disconnect everything, open up the BFVDesktop application and connect to the Bluefly again.
  • Look at the firmware version by restarting the Bluefly and seeing the strings in the opening lines.
  • Test two way communications by sending some commands or adjusting some settings.
  • For IGC models, you might want to press the IGC button and Format the IGC memory. The default settings would have started to overwrite the IGC files at the first sector of the memory. 




Sunday, 29 May 2022

BlueFlyVario_USB_TTL_GPS_IGC_v22 and BlueFlyVario_TTL_GPS_v22 released

The TTL_GPS model of the Bluefly is designed to add a vario and GPS to a Kobo running xcsoar by soldering it to an internal UART serial port. For technically savvy pilots this has been a popular way to build a powerful and reliable flight instrument. The previous TTL_GPS model was released in late 2021, but the chip crisis has meant that the main processor is no longer available. The new v22 TTL_GPS models use the same PIC32MM processor as the earlier v22 bluetooth models and share most of the same codebase. 

Today I release two v22 TTL_GPS models: a base model BlueFlyVario_TTL_GPS_v22 to replace the v12.2 version released last year, and a new enhanced model BlueFlyVario_USB_TTL_GPS_IGC_v22 which adds a USB interface and onboard IGC memory recording. 

Base Model BlueFlyVario_TTL_GPS_v22 Hardware Design

Most people installing the Bluefly on a Kobo will want this base model. It is cheaper and offers the same functionality as earlier versions. 

The base model TTL_GPS_v22 is functionally very similar to the last v12.2 model. It has the same L96 GPS, shares the same form factor, and primary TTL_GPS pinouts. Most users will connect it to the Kobo via the UART 1 TTL port. Other noteworthy elements of the hardware design are:

  • It uses the new PIC32MM microcontroller as the other v22 models. 
  • There is a new all metal button that is more robust, but still needs to be used carefully. Most users will not use the button as the vario powers on as soon as the TTL port has power from the Kobo. 
  • On the back the RST and GND pads can be shorted while the vario is powered on to reset all settings to default. Make sure to deliberately power it off using the button to save the new settings. 
  • There are a few ways to use V_Backup if you really think you need it, but I do not recommend connecting it or closing the solder jumper unless you have read the L96 datasheet and know what you are doing. 
  • The programming pads are also connected to UART 2, which caries the serial communication from the microcontroller to the GPS. 
  • The UART 3 pads on the back provide another TTL input/output like UART1. If I release firmware updates you will need to interface with these to update the firmware.
  • There are quite a few components not populated as the USB_TTL_GPS_IGC uses the same board.  


Enhanced Model BlueFlyVario_USB_TTL_GPS_IGC_v22 Hardware Design

There are a few reasons why you might want the enhanced model:

  • The addition of onboard IGC recording means that you can record a signed IGC file while the vario is connected to your Kobo. You might use this for a backup, or even as your primary file. This is able to be downloaded via the USB port using the BFVDesktop application or GPSDump. Read earlier blog posts about the Bluetooth models to understand how IGC recording works on the Bluefly.
  • Some pilots might want to connect the Bluefly via the USB port to a windows or android device running xcsoar or xctrack. You can close the USB PWR header to enable the vario to be powered from the USB port. 
    • However, warning: If you close this header and power the Bluefly from the USB-C interface while the Bluefly is connected to the Kobo, but the Kobo is powered down, then you will fry either the Kobo or the Bluefly. I recommend only closing this header if you do not intend to connect the Bluefly to a Kobo. 
    • It is ok to have your Bluefly connected to and powered from the Kobo via UART 1, and then plug in a USB cable to the USB-C interface on the Bluefly (but with USB PWR not closed) This will allow you to transfer data from the Bluefly via the USB-C interface (adjusting the settings, downloading IGC files, updating firmware). 
  • Some pilots might want to use this model connected via a USB cable to an external battery to use as a stand alone vario without a display. You could solder a switch across USB_PWR. 

Like the base model, most users will connect it to a Kobo via the UART 1 TTL port. Other noteworthy elements of the hardware design are:

  • The USB-C interface connected to UART 3 mirrors UART 1. 
  • The USB power connection to V-Backup is only for advanced users that know how the L96 V_Backup works. 


Firmware changes

The firmware builds on the earlier v22 models. It is functionally very similar to earlier versions. 

What is in the bag

The bag for both models contains only vario module, a small piece of neoprene, and some heatshrink to hold the neoprene in place. 

You will need to add your own wires and enclosure (if you want one).

Assembly

See the assembly instructions for the previous version

Wednesday, 4 May 2022

BlueFlyVario_Bluetooth_GPS_IGC_v22 released

This short post releases the BlueFlyVario_Bluetooth_GPS_IGC_v22. A few weeks ago I released the Bluetooth_USB_v22 model and indicated that the version with GPS_IGC was coming. It has been ready to go for a few weeks and I have already begun shipping it to replace the previous GPS_IGC_v12.3 model. 

This new BlueFlyVario_Bluetooth_GPS_IGC_v22 model provides a bluetooth connection to work with an app on your device, and also includes an onboard GPS for onboard IGC recording. For most pilots that will be XCTrack on Android, or Flyskyhy on iOS. The USB connector is used for charging or to provide a USB serial port connection to adjust hardware settings or download IGC files. The addition of an onboard GPS allows XCTrack to be used on Android devices which do not have their own GPS, such as some Android eReaders. 

Hardware changes

The circuit board is the same as the Bluetooth_USB_v22 model. When I released that model I indicated that there were some pads which are not populated with components. This new Bluetooth_GPS_IGC_v22 model populates the GPS and flash memory components, and incorporates new firmware. On the outside it looks exactly the same as the previous GPS_IGC model. 

The changes since the earlier GPS_IGC_v12.3 model are similar to what was described for the Bluetooth_USB_v22 model, such as a better processor and different power scheme. The GPS and memory chip are the same as the previous GPS_IGC. 

Firmware changes

The firmware builds on the Bluetooth_USB model, and adds the functions required to record the GPS data and store it in memory. It is functionally very similar to the previous GPS_IGC model. 

What is in the box

The box contains only the assembled vario, with some packaging to keep everything in place and to avoid the button being turned on. This model is shipped fully assembled by default.

Unboxing and first use

When your vario arrives, do this:

  1. Remove it from the packaging. 
  2. Remove the packaging and tape protecting the button from being turned on in transit. The low profile clear button is difficult to turn on accidently in normal use. 
  3. Short press the button. You should hear the vario turn on. See here for an explanation of the beeps and lights: https://www.blueflyvario.com/knowledgebase/explain-the-button-lights-and-beeps/
  4. Plug in microUSB cable to a charger or a computer. The red light indicates charging. 
  5. Connect it to your Android (https://www.blueflyvario.com/knowledgebase/trouble-connecting-bluetooth/) or iOS device (https://www.blueflyvario.com/knowledgebase/connecting-ios-bluetooth/). The blue light indicates the bluetooth connection (double flash every 1 second or so).
  6. After some time the orange light will flash every second, indicating you have a GPS fix (provided you are somewhere where the antenna can pick up signals). 
  7. Connect to the BFVDesktop application via USB to adjust the settings or download IGC files. 
  8. You might instead want to connect to GPSDump to download IGC files, if you need them to be signed. 
  9. You might want to add some velcro to secure it to your flight deck or a lanyard (https://www.blueflyvario.com/knowledgebase/adding-a-lanyard/

Monday, 14 March 2022

BlueFlyVario_Bluetoooth_USB_v22 released

I really enjoy releasing new vario designs. I think this is the best base model Bluefly yet, even though this latest release has come about because of the crazy chip crisis. The v22 is the first model released in 2022. 

This Bluefly model provides a bluetooth connection to work with an app on your device. For most pilots that will be XCTrack on Android, or Flyskyhy on iOS. The USB connector is used for charging or to provide a USB serial port connection to adjust hardware settings. 

It looks the same as the last version, but there are important changes inside. 

Hardware changes

The biggest change in this model is that I have moved to a new processor, the PIC32MM0064GPM028. For most of the Bluefly history I have been using a 16 bit PIC24F processor. However, the chip crisis meant that these became impossible to purchase and I have run out. Over the last year I have been experimenting with other processors, but in the end the choice was made for me when I had to select what was available in the quantities needed. I am very lucky that my workflow allows me the agility to make changes quickly. 

The new processor has three UART instead of two, and its low power properties has allowed me to implement a new power scheme. This has resulted in a lower overall part count which results in less production mistakes to test and fix (the cost of little components is negligible compared to the effort in production for each component). 

In most other respects the hardware design of the vario is the same as the previous BlueFlyVario_Bluetooth_USB_v12.3; same case, same button, same pressure sensor, same bluetooth chip, and the same USB chip. 

This is the first vario where I have not exposed spare pins for experimenting. I have found that this is something that most pilots do not use or need. In the future I might produce an experimenter's version of this model. 

You might notice there are some pads which are not populated with components. I plan to use the same board for a new Bluetooth_GPS_IGC_v22 model. It will be a while longer until I have that new firmware tested and that model ready for release. 

Firmware changes

Changing to a new processor has required a rewrite of about half of the code. The use functionality is pretty much the same, with a few new hardware settings and some optimisation of parts of the code. In addition, the new processor is well supported by a Microchip library and in the MPLAB X IDE. This should make future tweaks to the firmware easier to roll out. 

There is new code to support the new power on/off arrangements. For the user it will feel the same as before, but now when you power down the vario it turns off one of the voltage regulators (which powers off everything other than the processor) and puts the processor into a very deep sleep mode. In this mode the processor consumes about 0.06 mA, but it still responds to a button press to reboot the vario and start it up again. A fully charged battery will last over two years in deep sleep mode, but if you do not plan to use the vario for more than a year I recommend disconnecting the battery. 

Under the code there is also a new version of the ds30 bootlaoder. It is the commercial version and is designed for this device. If I release firmware updates expect a new post describing how to use it. 

What is in the box

The box contains only the assembled vario, with some packaging to keep everything in place and to avoid the button being turned on. 


This model is shipped fully assembled by default.

Unboxing and first use

When your vario arrives, do this:

  1. Remove it from the packaging. 
  2. Remove the packaging and tape protecting the button from being turned on in transit. The low profile clear button is difficult to turn on accidently in normal use. 
  3. Short press the button. You should hear the vario turn on. See here for an explanation of the beeps and lights: https://www.blueflyvario.com/knowledgebase/explain-the-button-lights-and-beeps/
  4. Plug in microUSB cable to a charger or a computer. The red light indicates charging. 
  5. Connect it to your Android (https://www.blueflyvario.com/knowledgebase/trouble-connecting-bluetooth/) or iOS device (https://www.blueflyvario.com/knowledgebase/connecting-ios-bluetooth/).
  6. Consider connecting to the BFVDesktop application to adjust the settings. I do not think this is necessary for most pilots - I have chosen settings which I think work best.  
  7. You might want to add some velcro to secure it to your flight deck or a lanyard (https://www.blueflyvario.com/knowledgebase/adding-a-lanyard/

Friday, 5 November 2021

BlueFlyVario_TTL_GPS_V12.2 released

The BlueFlyVario_Bluetooth_TTL_GPS_v12.2 is ready for release. This model has been developed because the lead time on the XA1110 GPS module is crazy, and all of my stock of that module is reserved for the GPS_IGC model. Nonetheless, from crisis come innovation, and this model has some major benefits over the TTL_GPS_v12 released over three years ago. The number of pilots installing a BlueFly on a Kobo has reduced, but it is still very popular and I am pleased that I have found a way to continue to support it during the chip shortage. 

What is going on with chips? 

The global electronics chip shortage is madness. For a little electronics design and manufacturing company like Bluefly it is particularly bad. I am a one-man part-time business and the chip shortage has affected availability, price, and development.   

  • I can get one or two of almost any component, or if I was a big manufacturer am sure I could get half a million of critical components, but trying to find 500 to 5000 of anything made of silicon is hard. That is exactly the quantities that a company like the Bluefly is operating in. 
  • The price of all components are up 20% to 50%. 
  • All of this makes development harder. Over the last year I have been designing sub-components of a future vario project, using a different pressure sensor and new microcontroller family, but just as I was ready to build a full prototype, lead times for the components I included in the design extended to over a year. This has not been wasted time, but it will postpone my plans. 
The new GPS

There are a few GPS modules that are suitable for these little Blueflys.  I am looking for GPS modules that include an antenna for reduced part count, are surface mount for easily assembly, are small enough to fit in the design. Most importantly, the module must be available in the quantities needed. There are basically two types; those with a ceramic antenna (like the XA1110 of the previous model), and those with a small chip antenna. 

I have experimented with chip antenna in the past, but I could never get the performance to work as well as a ceramic antenna. However, with the TTL_GPS there are some criteria that made me think I could get it to work. I could make the circuit board large enough for a good ground plane, and there was no need for a battery with copper foil directly underneath the antenna. After a bit of research I found the Quectel L96 and decided to experiment with it. This has some advantages of having the same internal MTK chipset I am familiar with and the price is comparable. 

After my first prototype it was pretty clear that this was going to work. In fact, the performance of the ceramic chip antenna for this GPS with a larger ground plane is better than the previous ceramic antenna model (reduced time-to-first-fix). The image below shows the difference in size between the v12.2 (top) at 20mm x 60mm compared to v12 (bottom) at 17mm x 50mm. It is difficult to see, but without the height of the ceramic antenna the new vario has a much lower profile. 


New hardware features

The BlueFlyVario_Bluetooth_TTL_GPS_v12.2 has some differences from the earlier designs:

  • It is larger, as described above.
  • The component layout is different (switch and speaker on the opposite side, sparser components). This is all about designing the board to maximise the performance of the chip antenna. 
  • The headers/pins for the TTL serial connection have solder tabs to offer alternate ways to connect the wires. 
  • I have included a V_Backup tab. For most users I do not suggest that you use this (and do not suggest that you close the solder jumper to connect it to V+). If you feel that V_Backup is for you make sure you read the datasheet for the L96 to understand how it works. 
  • The ON solder jumper next to the voltage regulator is closed by default. This means that as soon as power is connected between GND and V+ that the vario will power on. If you want the same behaviour as the v12 then you can cut the connecting wire on the tab. 
  • The GPS LED is orange. When the GPS has a 3D fix it will flash. 
  • Pads for GND, RST and BOOT are exposed on the top of the board. 
    • Short GND and RST when powering on to reset the default hardware settings. 
    • Short GND and BOOT when powering on to enter the bootloader for updating firmware via TTL_Serial (if I release an update). 
  • Note that there are a couple of components near the GPS that are not populated. This is not a mistake. 
The image below shows the layout on the front and back of the board. 


New firmware

Some updates to the firmware for this model include:
  • Some changed default settings to match the different GPS (internal baud rate).
  • startDelayMS is set at 2000 by default. This adds a 2s delay between the vario powering on (indicated with a very brief chip), and data being sent out. It is used because the ON solder jumper is closed by default. The behaviour is that when your Kobo is started, and power flows from the Kobo serial port, the vario starts right away. 
  • There is a higher performing vario/GPS sentence multiplexing algorithm. 
What is in the bag?

The BlueFlyVario_TTL_GPS_v12.2 includes:
  • The vario module.
  • A small piece of neoprene. It is very important that this is placed over the pressure sensor to protect it from the light, but still allow air to come through. Make sure to leave the white tape on, and place the black squishy side of the neoprene on the sensor. 
  • Some blue PVC heatshrink to hold the neoprene in place and help protect the components. You will only put this on at the final assembly stage. 
  • Some telephone cable. Strip this for the individual wires. 

Simple Assembly

There are many ways to assemble the module on the Kobo. I suggest you read old blog posts on here and check out Nev's page at http://gethighstayhigh.co.uk/kobo-self-build/ for more ideas. Some pilots design 3D cases. I prefer a simple install method these days. 

Some important tips for all installs:
  • Keep the wires as short as possible. The location of the Bluefly will depend on which kobo you have. Note that xcsoar can be configured in any of the four orientations and you should select a layout to match. 
  • Put the neoprene on correctly. Make sure the black squishy side is on top of the pressure sensor to protect it from light, but still let air in. 
  • Keep your solder joints clean. Use a hot soldering iron with flux for the minimum time needed to get good solder joints. Clean the flux off with isopropyl alcohol. 
  • Make sure the antenna is hanging over the edge of the bezel, with nothing behind the keep out area on the back of the Bluefly board. 
  • In xcsoar, set the Bluefly as Device A, Port: ttymxc0 (or something like that, only one will work), Baud rate: 115200, Driver: BlueFly Vario.
The image below shows mid way through an install on an old Kobo Glo. Notice the neoprene in the right spot. At about this point I always make sure that I check the Monitor in the Devices menu of xcsoar to see the data streaming in. 

In my simple installs I generally just attached the vario using double sided tape (after heatshrink). Hot melt glue helps protect the wires.

Sunday, 25 July 2021

Bluefly IGC Validation

Six weeks ago I released a new model of the Bluefly with onboard GPS and IGC recording. The BlueFlyVario_Bluetooth_GPS_IGC_v12.3 has been more popular than I first thought. Today I am pleased to announce the BlueFly IGC files can be validated with GpsDump (Version 5.40), so you can use it as a backup for competitions that require validated IGC files. 

What is IGC File Validation?

It would be possible for a pilot to create a fake IGC file for competitions or records. Signing the file with a G-Record is designed to prevent this. Nothing is 100% secure, but the signing mechansim prevents casual tampering except by really determined highly technical hackers. Of course, faking an IGC file would be silly, but some people worry about it. 

The original IGC spec by the FAI requires a pretty sophisticated mechanism for signing IGC files, based on individual device serial number and public key encryption. Some high end devices implement this spec, but they are pretty much limited to use on sailplanes. 

A more relaxed version of the specification is produced by FAI CIVL for Hang Gliding and Paragliding use. This is what has now been implemented on the Bluefly and this new model has been submitted for approval by CIVL. In addition, the developer of GPSDump has implemented Bluefly IGC download and validation and that can be used right now for uploading your IGC files to online competitions.

You can read a lot more about IGC files and CIVL here

GpsDump and the Bluefly (XGD)

GpsDump is one of the most widely used programs for downloading IGC files from flight instruments. Stein has been very kind to implement the Bluefly IGC download protocol and validate the Bluefly G-Record. Once the data is in GpsDump it can then be saved as a GpsDump signed IGC file, which is widely supported by competitions and online validators. After you have your Bluefly successfully installed as a COM port, the first step is to read the list of files from the Bluefly. 

The list of IGC files on the Bluefly is then like this. Note that the duration is approximate only. 


Once the file is downloaded you can then 'Save IGC file made by GpsDump' and add a few details if you like. The GpsDump saved file is re-signed and can then be used by any competition that uses GpsDump files, which I think is almost all of them. 

Bluefly Validation (VBF)

The G-Record signing in the Bluefly can also be used to directly validate the files you have downloaded using the BFVDesktop application. See the release blog post for information on how to download the files directly. The IGC files on the Bluefly use the three letter code VBF in anticipation of this code being compliant with the specification (this may change to XBF in the future). 

To validate files from the Bluefly that you have downloaded directly using the BFVDesktop application you will need the validation program vali-vbf.exe. Use it from the command line like:

>vali-vbf.exe filename.igc

Please note that you will need firmware version 12.529 or later on your BlueFlyVario_Bluetooth_GPS_IGC for the Bluefly IGC validation to work. There were only a few copies of this new model sent out with an earlier version of the firmware. If you do not have 12.529 or later please contact me and I will help you update it.