Sunday, 20 December 2015

GPS and Airspeed Shields

I was really happy to release the BlueFlyVario_Bluetooth_v11 a few weeks ago. Since then I have found some time to get the GPS and Airspeed shields ready to go. In this post I will describe how the shields work and what you need to do to integrate one to the BlueFlyVario_Bluetooth_v11. A word of warning - the shields are for experienced tinkerers who are good at soldering and want to experiment.

The Shield Concept

I have developed quite a few different BlueFly models over the past few years. It all started with a simple device that just sent pressure data via Bluetooth. In v6 I added audio, a TTL version came later, then with Kobo mods becoming popular we got the TTL_GPS model. Firmware update-able versions started with v10.

If I just kept on adding sensors and other components to the BlueFly we would end up with a device that has a lot of stuff that many people would not use. That would be a waste of time for me, and a waste of money for users. However, there were some key things I wanted to be able to offer experienced users. The micro-controller on the v11 has enough spare pins to allow extra things to be added. Instead of adding sensors on the main BlueFly board I decided to offer extra capacity with an add on shield. The 'shield' is just a small daughter-board the same size as the BlueFly board. This is sandwiched with the BlueFly and connected with headers to make a more powerful device.

The images below shows the circuit diagram and PCB layout of the shield. Note that the components which can be attached to RB10 and RB11 can either be configured as buttons or LED's depending on what is populated.




BlueFly_v11_Shield_GPS

Description: The B_v11_Shield_GPS adds a PA6H GPS on UART1 (U1) of the microcontroller. The GPS shield has a few extra components to smooth the power supply to the GPS and provide the PA6H LED output. Note that the BlueFly button protrudes through the hole in the shield. The GPS works in exactly the same way as the GPS on the TTL_GPS models of the BlueFly:

  • Any sentences coming from the GPS which begin with $ and ending with new line (\n) are echoed out on U2 by multiplexing the with the standard BlueFly output. 
  • The BlueFly does nothing with the GPS information other than pass it through. 
  • At this stage XCSoar is the only application which reads both the BlueFly output (in a few different modes) and the standard GPS sentences from the same data stream. 
Target Users: I expect that most people that want the v11 Bluefly and this add on v11 GPS shield will be wanting to connect it to a Kobo which as been modified to accept Bluetooth connections. Anyone who intends to use the BlueFly with a device that already has a GPS (like and Android or iOS devices) should not bother with this module.

Released Version: The BlueFly_v11_Shield_GPS is provided in kit form. The kit includes the items pictured below:

  • The BlueFly_v11_Shield_GPS board.
  • Some pins for connection to the BlueFlyVario_Bluetooth_v11 (these will need soldering). 





BlueFly_v11_Shield_Airspeed

Description: I have been tinkering with Airspeed for some time. It was not until I started experimenting with the MS4525DO differential pressure sensor that I found something I was happy with. This is the same sensor which is used in the PX4 airspeed sensor and is connected via I2C.

The MS4525DO upper port (the one near the top of the picture) is connected to the pitot pressure and the lower port is connected to the static pressure. The included pitot tube and clear tubing is a cheaply available RC model tube and will need modification at the nose to make it work properly as when it is machined the pitot hole gets a little closed. You will have to tinker with the physical layout of the tube to get it accurate, although note that there is no way to get accurate airspeed below about 10 to 15 km/hr.

Some additional notes (I will update the hardware settings manual at some stage):

  • The BlueFly needs a special hardware setting adjusted. To adjust usePitot send $BUP 1* to the BlueFly via the normal manner (or tick the box in the BFVDesktop application). This makes the BlueFly read this pitot sensor each cycle via I2C and adjust the sent data appropriately. This will be described fully in the manual update; but in the interim note that the LX mode sends the indicated airspeed (IAS) when usePitot is set.
  • When the BlueFly starts up with usePitot enabled it immediately begins a pitot calibration. This lights the red LED on the shield, then takes about five seconds of pitot data. The differential pressure measured is averaged and taken to be zero airspeed. 
  • You can trigger another calibration at any time by pressing the red button on the shield next to where the normal BlueFly button protrudes. It is important that the pitot tube is in no wind when the calibration is underway. 
  • If you set usePitot, but the shield is not connected, the BlueFly will send an error message. 
Target Users: I expect that most people that want the v11 Bluefly and this add on v11 Airspeed shield will be experimenting with different configurations. I am yet to be convinced that there is some logical place to put a pitot tube anywhere on a paraglider which has clean enough air; it is easier on a hangglider. At some stage I will probably design a 3D case to mount the pitot tube and vario components.


Released Version: The BlueFly_v11_Shield_Airspeed is provided in kit form. The kit includes the items pictured below:
  • The BlueFly_v11_Shield_Airspeed board. 
  • A basic pitot tube and clear tubing. 
  • Some pins for connection to the BlueFlyVario_Bluetooth_v11 (these will need soldering). 


BlueFly_v11_Shield_GPS+Airspeed

Description: This provides the capabilities of both modules in one. See the image below:



Assembly

To assemble the shield onto the BlueFly requires some skill or a friend who knows what they are doing with a soldering iron. There are many ways it could be assembled together, and in the end you will need some kind of case which houses everything. At some point I will probably design a 3d printable case but so far I have only tested it with a Frankenstein mix of tape and heatshink which will be unacceptable for most people.

Some assembly tips:

  • You will need to disassemble the BlueFly and disconnect the battery. 
  • Start by soldering the pins on to the BlueFly, short ends in the pcb from the component side, then solder from the bottom. You should use all 11 pins (4 on one side, 7 on the other). 
  • Use the 5mm standoffs from the BlueFly to position the shield above the main board. Note the button protruding through the hole at just the right height. 
  • Solder the pins to the shield from the top. 
  • Plug the battery back in (protect it from the pins with some tape), connect to the BFVDesktop application, then start testing. 
See the image below for an indication of what a shield looks like when connected to the base BlueFly.



Next Steps

There is quite a lot more to do:
  • Design a 3d printable case for use with the airspeed sensor.
  • Much more testing with the airspeed sensor. 
  • Integration of GPS and airspeed information with other apps
  • Update the hardware settings manual. 
The shields are available for purchase now. Note that I am only producing them in low volumes and will hand assemble and test each one based on the number of orders received.  





29 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Perhaps. I have not decided yet. What do you think?

      Delete
    2. This comment has been removed by the author.

      Delete
    3. This comment has been removed by the author.

      Delete
  2. Hi, does this means -after this module will be ready- it might be connected to GPS modul and vario using TTL signals? I'm asking about KOBO touch implementation with no need to use BT or USB connection.. So I will only "switch" modules on pins on the case of KOBO and XCSOAR will have speed sensor.. ?

    ReplyDelete
    Replies
    1. I have not decided yet if I will do a TTL version with a speed sensor shield. The biggest problem is thinking of a good way to mount the pitot tube.

      Delete
  3. Very cool Al. I'm sure you're right that pitot would be too hard on a paraglider - shame though.

    ReplyDelete
  4. Good news and thank you for continuing the work to integrate the airspeed sensor.
    The longitudinal layout (as described by the comment above) would provide a low drag housing option.

    ReplyDelete
  5. hello from france
    Is it possible to use this (vario v11 + shield gps) on appli android tablet (less gps but with bluetooth) ? with xc soar or xctrack ?
    thanks

    ReplyDelete
  6. Hello
    I recently ordered with GPS+IAS shields.
    How is integration of these two features with XCsoar?
    How precise and reliable the GPS is without a dedicated antenna?
    But most important ¡Great job! THKS

    ReplyDelete
    Replies
    1. The GPS sentences are automatically used by XCSoar without any additional setup required. To use IAS it is best to change the outputMode of the BlueFly to LX and then use the LX driver in XCSoar. I think the GPS performs well enough with the patch antenna that is included on the PA6H module, once a signal is established it is about as good as most mobile phone GPS.

      Delete
  7. Hi
    Is it possible to use the GPS shield information in flyskyhy on an iPhone? Turning off the location/GPS feature on an iPhone when using the app would significantly increase the battery life

    ReplyDelete
    Replies
    1. It is possible, but I think it will require an update to flyskyhy. The GPS sentences (standard NMEA sentences) are multiplexed with the normal output from the BlueFly (which flyskyhy already reads).

      Delete
  8. Hi,
    First thank you for this idea !
    Then, is it possible to use the GPS shield information with Air Nav Pro on an iPod touch ? It'll be cheaper than an iPhone, and this application is really usefull on ios (I'm a hot air balloon pilot).
    Thank you

    ReplyDelete
    Replies
    1. It should be possible, but Air Nav Pro will probably need an update. Please ask the developer to contact me via the BlueFlyVario website.

      Delete
  9. Hi Alistair, Great news about the MS4525DO shield. I'm the glider pilot who visited you in Canberra a couple of years ago. At that time you suggested that using two MS5611 for pitot and static would give drift problems. As XCSoar already has the driver available I built some hardware and flew with it in my sailplane - you were right, the temperature difference at altitude produced unacceptable errors. I was using the system to test a magnetic compass interface which displays the calculated wind speed and direction on XCSoar. The system shows promise and I would like to try with the MS4525DO. I've done testing with Android and Kobo devices but prefer the e-ink screens. The MS5611 vario connected to a total energy probe in XCSoar works very well, and the audio for vario and speed director are also fine. With your new pcb do you have another I2c line available for a compass chip? Have you any more shields available?
    Andy Smith dadyeah@yahoo.co.uk

    ReplyDelete
  10. Hi Al. An HG mate bought the V11 GPS+AIS shields for use with a Kobo Mini. As the comms for the shields is only BT, can you suggest any way of getting the data across to the Kobo's serial port? I was thinking an HC-05 module on the Kobo's serial port, but in tinkering we have not managed to get a BT connection between the HC-05 and RN4677. Any ideas?

    ReplyDelete
    Replies
    1. I do not have a HC05 to test, but I imagine you need to adjust the HC-05 to be the master, record the mac address of the BlueFly somehow, then set it to auto-connect. I can do this easily with the RN42.

      Delete
  11. Thanks Al. Sorry more questions: So have you set the RN4677 to be a Slave? And is its UART to the V11 MCU, running at 115,200 Baud, 8 bit, no parity and 1 stop bit? And finally is the RN4677 pin set to "1234"?

    ReplyDelete
    Replies
    1. The RN4677 operates as a slave by default. Yes to all of the other questions.

      Delete
  12. Got the Kobo connected to BFV/AIS via HC-05. Trick was to powerup the RN4677 (so the BFV module) while the HC-05 was in INQ mode. If the RN4677 was already on, it would not chat to the HC-05.

    Next question, does the XCSoar Kobo BFV driver include AIS functionality? I ask as the XCSoar IAS box has no data in it - all the other flight data is present :)

    And final question for the night - with a BT connection made, there is no BFV audio anymore. Is this because BFV firmware recognises it is connected and sends audio to the connected device (and of course there is no audio on Kobo)?

    ReplyDelete
    Replies
    1. It is great you got it connected. You could have probably achieved the same result by manually storing the mac address of the BlueFly, but I am not familiar with the HC05.

      Currently, to get AIS working in XCSoar you need to use the LX mode of the BlueFly, and the LXDriver in XCSoar. You also need to set usePitot on the BlueFly (see the manual).

      To make the audio work when the BlueFly is connected make sure to set useAudioWhenConnected on the BlueFly.

      Delete
  13. Done! Used BFVdesktop to modify settings as you listed and everything works with Kobo connected to BFV via HC-05. Couldn't find "LX" in XCSoar 7.0 driver list, but found "LXNAV" and this seems to work. Thanks for all your help.

    ReplyDelete
    Replies
    1. Thanks Al, and Brendon who was the brains behind getting this to work. Getting air speed and baro pressure for more accurate altitude (gps alti isn't accurate enough when getting close to airspace) bluetoothed across to a daylight readable screen (kobo mini) that displays as much info as XC Soar does in a tidy little package (minimum drag) is pretty much a perfect hang gliding tool but almost impossible to find. And having the blue tooth option to a) mount it in a safer place than the base bar, and b) make it easy to align the pitot tube directly into wind for accurate air speed makes this a very desirable hang glider package. Looking forward to merrily beeping my way around the sky with this! Cheers!

      Delete
  14. Hi Al.
    What about a 'logger' shield ?
    So we can use it as a stand alone gps logger ?

    ReplyDelete
    Replies
    1. This would be good, but it would require a significant update to the firmware code. I am considering a version of the BlueFly with an sd card and gps for the future.

      Delete
  15. Hi Al,

    Do you have the shield(s) that includes GPS, vario, battery, and bluetooth? Also it would be nice to have IAS and the case.

    ReplyDelete
    Replies
    1. Vario, battery and blutooth are in the BlueFlyVario_Bluetooth_v11 model. The shields either provide GPS, IAS or both GPS and IAS. At some stage I will design a case for 3d printing that fits it all.

      Delete
  16. Hi Aaron. Im looking to replicate your BFV GPS +ASI Kobo setup. would you able to send me some photos of the build?

    ReplyDelete