Sunday, 7 June 2015

TTL_GPS Support Tips

The TTL_GPS model of the BlueFlyVario and a Kobo eReader can be the basis of a great vario in the hands of a reasonably experienced electronics tinkerer. Some people find it a little difficult to install successfully. This post provides a few tips.

Easy Install Method

There are many ways to install the BlueFlyVario_TTL_GPS to a Kobo. My current favorite install method involves using the included connector so that the vario is removable from the Kobo for easily adjusting Hardware Settings or doing firmware upgrades. If you are just experimenting with using a Kobo as a vario, or you are a little unsure what you are doing, then I recommend using this simple install (see the release blog post for more information). Advanced users can always install in a more robust way by de-soldering and re-soldering later. A few tips:
  • Install the right angled pins flush with the board. This makes the BlueFly sit flush to the front of the Kobo. The image below shows the sequence of pushing the plastic on the pins, cutting the pins, soldering, then removing the plastic from the pins.
  • Use the neoprene (essential) and heatshrink (not shown in the image below) to enclose the BlueFly, then fix to the front of the Kobo with double sided tape. Leave the covering on the sticky side of the neoprene and use the black squishy side to cover the pressure sensor (the sticky glue would block the holes). 


Using a USB to TTL Serial converter

A USB to TTL Serial converter makes it much easier to adjust hardware settings and is essential if you want to do firmware upgrades for the TTL_GPS model. You can adjust hardware settings when the BlueFly is connected to the Kobo with Putty and Telnet (see this blog post), but is is much easier with a USB to TTL Serial converter and the BFV Desktop application. The converter I use is shown in the image below. These can be purchased from eBay for a few dollars. Search eBay for "usb ttl serial". I only use the FTDI based converters as I am super confident that the drivers are kept up to date for most platforms.

Once the converter is plugged in to a Windows computer it should install as a serial port automatically. Have a look at the website of the converter chip manufacturer for appropriate drivers if it did not install. Take a note of what the serial port is. Depending on your version of Windows you might need to look in your device settings.

The connection between the converter and the BlueFlyVario_TTL_GPS is shown below. This converter is set to provide 5V of power. Note that the TTL levels on Rx and Tx are therefore 5V which is out of spec for the BlueFlyVario's 3.3V micro-controller, but I have not found it to be an issue with the 2.2k resistors in series. If the converter is set to provide 3.3V the BlueFly draws enough current on start-up to reset the converter, which is annoying. The most important thing to remember when connecting the BlueFly to the Converter is to ensure connections as follows; 
  • GND (BlueFly) to GND (Converter)
  • Tx (BlueFly) to Rx (Converter) 
  • Rx (BlueFly) to Tx (Converter)
  • V+ (BlueFly) to V+ (Converter)



With the converter plugged in with a USB cable run the BFV Desktop app (get the latest version from the support page). Next, connect to the relevant converter serial port at 57600 baud. Turn on the BlueFly by pressing the button and you should see data from the BlueFly streaming in. Using the BFV Desktop application you can then easily adjust all hardware settings. See the hardware settings manual (also on the support page) for information on the range of hardware settings.

If you want to update the firmware then I suggest ensuring communication with the BlueFly via the BFV Desktop app first. That ensures you have an working serial port connection. See the support page for information about updating firmware and how to use the DS30loader application. Note that you can only connect the BlueFly to one application at a time.

Debugging GPS Performance

The performance of the PA6H GPS is different the GPS in your Smartphone. It has no connection to the internet and often takes longer to receive satellites. Also, the antenna is generally not as good. Nevertheless, when it is working well most uses find it more than good enough to support flying. The most common questions I get about GPS performance ranges from the message "GPS Not Connected" to poor altitude performance.

The first step is to check if GPS messages are being sent to xcsoar. Check this in xcsoar by looking at the data stream coming in the Monitor (Menu|Config|Config2/3|Devices|Monitor). Check if the GPS messages are being sent to the vario. If the GPS LED flashing (it is either blue or red), then messages beginning with $GP... should be sent to xcsoar (GPS Data). A few are sent every second. If you can't see any messages then the BlueFly might not be connected properly, the xcsoar device settings might not be correct, the BlueFly hardware settings might be wrong, or there could be a hardware problem.

If you have GPS messages and are still having problems then check the HDOP and VDOP values in the $GPGSA messages. See this page for a description of these sentences. To enable detailed analysis set up the NMEA logger (Menu|Config|Config2/3|System|Setup|Logger|NMEA logger = On), record a track, then download the log to the PC using the Kobo in Nickel mode. If the HDOP and VDOP look good then the GPS should be giving a good fix.

For some earlier versions of the BlueFlyVario_TTL_GPS firmware it is possible $GPGGA sentences were clipped when you get a DGPS fix. If the messages are clipped (one character in the checksum instead of two) then update to the latest BlueFly firmware.

Lastly, note that the GPS vs Vario altitude in xcsoar is sometimes messed up. This article by Neil Page describes the various altitude settings. Use barometric altitude in preference to GPS altitude.

If these tips did not help then the best way to ask for support is to email me using the contact section of the website

15 comments:

  1. To avoid Kobo modifications, can the TTL_GPS be connected externally thru a USB-serial converter and USB-OTG (to provide external power)?

    Thanks,
    Paolo

    ReplyDelete
    Replies
    1. This is possible, but I have not got it to work yet. You will need a version of xcsoar which has modified the kernel so the USB port will recognize the appropriate driver for your USB-serial converter. After that it should be easy.

      Delete
  2. Al, any thoughts on using a GPS+Glonass module (rather than the Ladybird 1 GPS)? The Titan2 would fit straight on the PCB. Would we see quicker fixes and better altitude (GPS) using the Glonass satellites I wonder?

    ReplyDelete
    Replies
    1. I have considered it, but do not have too much experience with GLONASS. The GMS-G6 module is slightly more expensive than the PA6H. Switching out the GPS is a reasonably simple task with a hotplate surface mount reflow setup. It should only take a few minutes.

      Delete
  3. I currenty have connected TTL_GPS to a BT module, and from there I successfully connect everything towards XCSoar running on my Onyx T68.
    Question is: as long as I can use BFV desktop application, could I update the firmware ? Or is it mandatory to use a TTL to USB converter ?

    ReplyDelete
    Replies
    1. To update the firmware you need to use the ds30loader application, and you need a serial connection from that to the TTL_GPS module. A TTL to USB converter is the easiest way.

      Delete
  4. connected ok. xcsoar ok. BOARIO ttl GPS v10 ok. config. device "A" ok. ok maps. Now what do I do? thank you

    ReplyDelete
    Replies
    1. In device A do you see the data streaming in from the BlueFly in the monitor? Did you set the baud rate and Driver properly?

      Delete
    2. Port: ttymxc0
      Baud rate: 57600
      Driver: BlueFly Vario
      Ignore checksum: On
      Ok
      What should i do Now?

      Delete
    3. Port: ttymxc0
      Baud rate: 57600
      Driver: BlueFly Vario
      Ignore checksum: On
      Ok
      What should i do Now?

      Delete
    4. Can you see the data streaming in using the monitor in the xcsoar device setup menu?

      Delete
  5. Hi Al,
    I tried ton modify BFV settings through Wifi and Telnet Protocol, but it doesn't work (I managed to establish the telnet connexion to the BFV, but when I send commands, nothing happens...). So I want to try using BFV desktop application. As my BFV is already in place, solded and protected by a glued case, I can't use a USB to serial converter anymore.
    Is there a way to use BFV Desktop through the USB connexion of the Kobo to the computer ? By emulating a serial port linked to the usb connexion for example ?

    ReplyDelete
    Replies
    1. I think the easiest way to adjust the settings is to use a xci file. See this post http://blueflyvario.blogspot.com.au/2015/08/more-bluefly-and-xcsoar-integration.html, and the hardware settings manual.

      Delete