Sunday 14 August 2016

New BlueFly USB models released

I am pleased to release two new USB models of the BlueFly today. These models complement the Bluetooth and TTL_GPS models by providing devices which can connect via USB. Both are available for purchase on the new website http://blueflyvario.com/shop. This post is pretty long as there are many different ways you can use these two new varios.

Which BlueFly vario do you want? Choose between:
  • The Bluetooth model to connect to Android or iOS for use with flight apps.
  • The TTL_GPS model to solder to a Kobo or other device with a TTL Serial port.
  • The USB model as a stand alone audio vario; or for connection to USB ports on many devices.
  • The USB_GPS model for a wired connection to a Kobo or other device with a USB port, but without an inbuilt GPS.
BlueFlyVario_USB_v11

The new USB model is designed for use as a stand alone audio vario. In many ways it is similar to the BlueFlyVario_USB_v10. However, it now shares the more powerful battery and enclosed sky blue case as the Bluetooth model. In some ways it is a cheaper version of the Bluetooth model with a FTDI FT230X USB to serial chip instead of the more expensive Bluetooth module.


The package includes the items shown above:
  • BlueFlyVario_USB_v11 main board programmed with the latest firmware, and with a small piece of neoprene protecting the sensor.
  • 600 mAh Lithium Polymer battery.
  • 4 x 5mm nylon M3 hex standoffs and 4 x 6mm M3 nylon screws.
  • The skyblue BlueFly case.
To assemble the vario use the same procedure as the BlueFlyVario_Bluetooth_v11. The battery on the USB model should last much longer than 10 hours. The actual duration will depend on your audio settings. Charge it with a phone charger with a micro USB connection, or by connecting it to a USB port. 

For advanced users the BlueFlyVario_USB_v11 is the most hackable model yet:
  • It is compatible with the same shields as the Bluetooth_v11 model. 
  • The button and speaker both have headers underneath them if you want to remove either and wire in other components. 
  • On the PCB U2 is connected to the FT230X chip (which is then connected to the USB port), but there are exposed headers if you want to plug U2 directly into a TTL connection. 
  • You can close SJ1 if you want to power the vario directly from the USB power instead of the battery. Do not close this jumper if the battery is still connected or it will get uncontrolled voltage to the battery and it may be damaged.
  • U1 is exposed for shields or to connect to another UART device which sends NMEA strings. There is space on the USB model for a PA6H GPS, which brings us to the next model.  
  • You can close SJ2 if you want to connect VBackup of the GPS to the battery power (for the model shown below).



BlueFlyVario_USB_GPS_v11

The USB_GPS model is exactly the same circuit board as the USB model, however it has a PA6H GPS soldered in place. If you are just going to use the vario as a stand alone audio vario then the GPS adds no value. However, if you want to make a wired USB connection to an Android or Windows device which does not already have a GPS, or you want to connect to the USB port of some models of the Kobo, then this might be the vario for you. 


Note that I have not tested the USB_GPS model with a wide variety of devices. If you are considering using this vario please make sure that your device has an operating system which can access the serial output from FTDI based chips, and that xcsoar or whatever app you are going to use can find that serial output in the operating system. 

Connecting to PC

If you have either of the USB models you will probably want to connect it to a PC to adjust some hardware settings. When you connect it with a standard USB cable your PC should install the appropriate FTDI drivers in Windows 7 and 10. Use the BFVDesktop application (available in the software section of the support page) to connect to the installed serial port. 

Connecting to Android

To connect to Android you will need a USB-OTG cable and Android 4.0 or later. See the image below for an example of the connection required. You will probably use a procedure similar to that described in this blog post. You might also want to use the FTDI UART Terminal app to test the connection or send Hardware Settings as described in Annex A of the manual. That app is shown in the image below; make sure to set the baud rate at 57600. 


Connecting to Kobo with xcsoar

Establishing a connection to the Kobo USB port with the FT230X chip in the USB models is a little more involved. 
  1. First you need to modify the USB PID on the BlueFly FT230X chip. The standard PID on the FT230X is '6015'. This PID is not recognized by the standard ftdi_sio driver on the modified Kobo kernel. If you modify it to the PID associated with the FT232 chip ('6001'), then FTDI drivers work appropriately. This step is achieved by using the FT_PROG EEPROM Programming Utility from FTDI on a Windows PC. With your BlueFly connected you will 'Scan and Parse' to find the FT230X chip. Then navigate to 'USB Device Descriptor'|'VID PID', select 'Custom PID' in the drop down, change the PID from 6015 to 6001, then 'Program Devices' to write that to the BlueFly FT230X. 
  2. You need a USB OTG Y cable as shown below. The UART chip in the Kobo needs external power to work (the BlueFly does not provide it). This will work best if the BlueFly and Kobo are fully charged. If not, the external power pack will be quickly drained as both the Kobo and the BlueFly are charged from it.
  3. After you have installed xcsoar on your kobo you need to enable USB-OTG from the System menu at the start up screen. This will reboot the kobo and make its linux use a different kernel which has the ftdi_sio drivers. I have tested this step with the Kobo Mini and the Kobo Glo HD with xcsoar version 6.8.6. 
  4. In xcsoar navigate to Menu|Config|Devices|Edit, change the port to ttyUSB0, baud 57600, driver BlueFly. After clicking ok you might have to Disable and Enable a few times. Click the Monitor to see the data stream. 

If you connect the USB models to other devices please contact me and I will update this post.