Saturday 29 November 2014

Kobo Glo Install

I finally got around to installing the BlueFlyVario_TTL_GPS_v10 in a Kobo Glo. Most of the install procedure is the same as the Kobo Mini using earlier versions of the Bluefly. Unfortunately, the Kobo Mini is becoming hard to find. I choose the Glo instead of the Touch as the bezel has more room for the Bluefly. Also, I think the battery is larger to power the LED backlight on the Glo; although we will not use that light for XCSoar

What you will need

Gather the following things:

  • A BlueFlyVario_TTL_GPS_v10 module. You will not need header or Dupont connector that comes with it; but you will need the small piece of neoprene, some wires and some heatshink if you do not have a case. 
  • A Kobo Glo.
  • A Bluefly Kobo Glo Simple Case, you can download this solid design from Thingverse. Find a friend with a 3d printer or order a copy from an online 3d printing service. I had to update the older Kobo Mini Simple Case as it did not fit well on the Kobo Glo. [The case is not really needed, it makes the install look nice. You can of course just use the heatshrink]
  • Some countersunk M3x6mm screws and hex nuts to attach the case to the Glo. 
  • A good soldering iron and some skill using it. 
  • A drill and the right size drill bits. 
Step 1 - Set up XCSoar on the Kobo

This procedure starts pretty much the same as Steps 1 to 3 in this earlier post. Get the Kobo, make sure it works as a standard eReader, then remove the back cover and back up the internal SD card. Note the back cover of the Glo just pops off (with some uncomfortable force), there are no screws. After the SD Card is backed up install XCSoar as described on the XCSoar download page. When XCSoar is working power off the Kobo. 

Note these funny things about the Glo:
  • The power button on the Glo is a bit weird when the back cover is removed. You might have to squeeze the PCB towards the power button to get it to work. 
  • When the Glo has been powered off, from either XCSoar or Nickel, you need to wait about 20 seconds until the power button will work again. 
  • Sometimes Glo freezes at the start-up screen. A short press on the reset button (the hole near the USB connector) will restart it back to the XCSoar menu. 
Step 2 - Solder the BlueFly module to the Kobo

Start by soldering the four wires to the front of the Bluefly module. The wires will wrap around the edge of the module and through a hole in the front of the bezel. There is much less room behind the bezel on the Glo compared to the Mini. Position the case and module and it should be reasonably easy to work out where to drill the holes for the wires. You might use a bit of double sided tape to hold it in position. 



Trim the wires then solder them to the Kobo. Make sure to connect the Bluefly-Tx to the Kobo-Rx and vice versa. 



Note that there are two other serial ports on the Glo which you might be tempted to use - don't. For some reason any data on these ports causes the Glo to freeze. 

In this install we are not going to use the VBACKUP for the GPS as it is tricky to pick up clean power without damaging the Glo. If you really want to connect it then spend some time Googling and find examples of soldering it to capacitor C12. 

Step 3 - Install the Simple Case

After drilling the holes make sure to put the neoprene over the pressure sensor. Secure the case to the bezel using M3 screws and nuts. 



You will need to trim some of the plastic fins from the back cover and around the nuts to make sure it all fits together. 



Step 4 - BlueFly Configuration

Follow Step 8 from here to configure the hardware settings. I think it is best to set the Bluefly to output mode 2 at five updates per second, then adjust the settings in XCSoar to use the LX driver. This minimizes the amount of data. 

Using it

Note that by default the Bluefly will only power on and off based on button presses. If you wanted the Bluefly to switch on and off as the Kobo is powered on and off then you can close the solder jumper on the Bluefly module. 








Wednesday 26 November 2014

BlueFlyVario_Bluetooth_v10 released

Today I started shipping the first back orders for the BlueFlyVario_Bluetooth_v10. This comes just a week after releasing the BlueFlyVario_TTL_GPS_v10 and is the second in the lineup of version 10 models. I hope to release the USB model in a few weeks after I have caught up with all of the back orders of the TTL_GPS and Bluetooth models.

What is in the bag? [Edit - From May 2015 I started shipping a slightly different configuration - See this post for details]

The image below shows an assembled device.



To get one of these you will need to do final assembly yourself or convince a fiend who is mildly handy. There is a little more assembly with the v10 than there was with the v9. I can't ship the battery connected because the button is likely to be bumped in the post, and a beeping package is not cool. This means you will need to put the heatshink on yourself. The components in the package are:
  • A BlueFlyVario_Bluetooth_v10 module. This has been bench tested.
  • A translucent blue acrylic prototype case based on a custom version of the DP5031. The acrylic is covered in brown paper.
  • A 600mAh battery with 1.25mm 2 pin molex connector. The battery has some double sided tape on one side.
  • Some clear PVC heatshrink cut to size with a small hole for the button.
  • A small piece of neoprene for putting over the pressure sensor (this is really important).


New Hardware Features
There are a few hardware changes from the version 9 model. Many of the features are similar to the TTL_GPS_v10. In summary:
  • The most significant change in this version is to replace the small micro switch with a tact button. The operation of it is the same as the TTL_GPS_v10.
  • To accommodate the button there is a 4.5mm hole drilled in one side of acrylic prototype case.
  • The circuitry for the soft power on and off is the same as the TTL_GPS_v10
  • The layout of most components has changed. Most significant change is to make the USB connector central.
  • The PCB is slightly thinner.



New Firmware Featuers

The firmware changes are the same as the TTL_GPS_v10. The same boot loader is used, but it needs to be accessed through the Bluetooth connection set up as a virtual serial port on a PC. I will post more about that when I have future firmware updates.

Assembly [Edit - From May 2015 I started shipping a slightly different configuration and assembly is different - See this post for details]

Assembly is not hard. It should only take about 15 minutes. You will need a hairdryer or low heat gun (for the heatshink), a small screwdriver and pliers (for the prototype case), and some patience.

Step 1 - Unpack the components 

Make sure the you have all of the parts listed above

Step 2 - Pre-test the module

Connect the battery to the module and press the button. The vario should come to life.
  • Lift the vario up and down (gently - the battery is only loosely connected) and you should hear lift beeps and the sink alarm.
  • A momentary press on the button will turn the audio off. Lifting up and down now should only light the green led.
  • Another momentary press will turn the audio back on.
  • A long (2-3s) press will shut the vario down.
  • Turn it back on again then pair it to your Android device (you might need pass code 1234 if you have an old device).
  • Open the BlueFlyVario app (or another app like XCSoar) and connect it to the paired BlueFlyVario.
  • If the device connects after a few seconds and data starts getting sent through then all is good.
Step 3 - Battery

Carefully remove the double sided tape from the battery with your fingernail. Make sure the connector wires are not twisted then place the battery on the bottom of the module so the end of the battery (away from the wires) is lined up as shown in the image below. The trick is to leave enough space at each end of the battery so the prototype case hex spacers do not interfere with the battery too much. It is ok for the top of the battery to be slightly over the molex connector.



Step 4 - Neoprene

The neoprene is really important. Without it, the pressure sensor is really susceptible to light. The neoprene allows more than enough air to get into the small holes in the top of the pressure sensor. Half of one side of the neoprene has double sided tape, remove that and stick it to the board, making sure to completely cover the pressure sensor (do not put the sticky tape on the pressure sensor, that would seal the holes). 



Step 5 - Heatshrink

The clear PVC heatshink is not super important. It's main purpose is to hole the Neoprene in place. It does provide some protection to the components, but you should still be careful. Electronics are fragile.
  • Make the battery cable neat.
  • Put the heatshink over the module with battery and neoprene. The small hole should be lined up with the button.
  • Use a hairdryer on high heat or a heat gun on very low heat to shrink the pvc. Start at the button end and work along one side, then flip it over and do the other side. The heatshink is not going to be really neat. If it is holding the neoprene in plact then it is good enough.
  • If you completely screw it up then cut it off and just use some tape wrapped around a few times, or ask me for some more heatshink.

Step 6 - Prototype case

This video from earlier models shows how to assemble the prototype case. If you could not be bothered watching the video use these steps:
  • Remove the brown paper from the acrylic case.
  • Assemble the first side by putting the 12mm M3 screws through the side of the case with the hole for the button, and secure them with the 5mm hex spacers.
  • Place the assembled first side on the component side of the case lining up the hole with the button. If it does not line up perfectly you might need to scrape the button hole a little bigger with a sharp knife. Make sure the button actuates cleanly.
  • Secure the first side with the 6mm hex spacers on the battery side of the PCB. You might need to push the heatshrink aside a little.
  • Secure the second side on top of the battery with the remaining screws.
Adjust the hardware settings following the instructions in the Hardware Settings Manual. Play with the range of apps available. Enjoy you vario. Contact me for help or for suggestions for improvement. 

Wednesday 19 November 2014

BlueFlyVario_TTL_GPS_v10 released

I am pleased to release the first of the version 10 Bluefly's. Today I have begun shipping back orders for the BlueFlyVario_TTL_GPS_v10. The previous blog post indicated that these were on the way and described the other models under development.

The BlueFlyVario_TTL_GPS_v10 is primarily designed for integration onto the Kobo, although some people will use it with other e-Readers or just for experimenting. See this older blog post for a step by step guide which describes how to install it on the Kobo mini. The procedure is pretty much the same for this updated vario. The simple case described in this earlier post which you can 3d print will still fit, but you will need to drill a small hole for the new button. 

What is in the bag?

Everyone installs their vario in a slightly different way. In the little bag are the following components:
  • The main module. The PCB size is 50mm x 17 mm which is the same as the v9.
  • A small piece of neoprene. This is really important. It must be placed over the pressure sensor if the sensor is exposed to any light (even light through a translucent case). The neoprene allows the air pressure through, but stops the light. Light makes the pressure sensor go crazy.
  • Some clear PVC heat shrink cut to size. It is fine to install the module without a case if you use the heatshink.
    • Poke a small hole through one side of the heatshrink just big enough for the button.
    • Put the neoprene on the pressure sensor, and the heatshrink evenly over the module.
    • Use a heat gun, or a hairdryer on hot setting to carefully shrink the plastic around the module.
  • A 4x1P right angled header. Some people solder the wires directly to the module, others use the header so it is easy to remove for testing. If you use the header I suggest you trim the through-hole pins to the thickness of the PCB so they are flush with the bottom of the board.
  • A 4x1P DuPont connector with 20 cm wires. This will fit in the header, and the wires connect to the serial port of the Kobo. You should trim the wires to be as short as possible so you minimise stray voltages.


New Hardware Features
Since the BlueFlyVario_TTL_GPS_v9 there have been a few hardware changes. Refer to the circuit diagram and PCB layout below.
  • Button. This is the biggest change with the v10 BlueFly's. The button provides soft power on/off by controlling the shutdown pin of the TC1015 voltage regulator. When pressed the shutdown pin of the regulator is connected to the supply voltage via the diode, which turns on the regulator and powers the micro-controller. One of the first things the micro-controller does is keep the shutdown pin of the regulator turned on. The small diode in conjunction with the 10k pull down resistor then allows another pin on the micro-controller to sense button presses. The behaviour of the button is programmed like this:
    • When the module is off, a short press will provide soft power-on as described above. The module will do the start up beep thing.
    • When on, short presses will turn the audio on an off. A short beep provides confirmation.
    • When on, a long press (2 sec) will power the module off.
  • Solder Jumper. Some people will want the module to power on as soon as power is supplied to the module (that was the behaviour of the v9). By closing the solder jumper with a dab of solder the shutdown pin is permanently biased to the supply voltage. You can still use the short presses on the button to turn the audio on/off. A long press will turn the module off, then it restarts in six seconds.
  • Thinner PCB with gold contacts. I changed to a thinner 4-layer PCB to optimise component placement. ENIG contacts provide a cleaner finish.
  • Additional capacitance on power. I added an additional 1uF capacitor to the supply voltage line. This will reduce stray voltages in the supply if you have longer wires, which should improve GPS performance, but I still recommend trimming your wires as short as possible.
  • UART TLL resistors. The resistors in series with the Tx and Rx lines on prevent the module being powered on by stray voltage. I selected 2.2k based on trial and error. These values work with the Kobo and with FTDI based USB to serial converters.
  • Exposed U1 pins under the GPS. The second serial port on the microcontroller is connected directly to the PA6H GPS. If you are a super electronics hacker and want to update the firmware on the GPS then you can use this serial port for a temporary connection.
  • Exposed speaker pins. Some people want to wire in a different speaker. The pins in parallel to the speaker make this a little easier.



New Firmware Features

There have been a bunch of changes to the firmware to accommodate the new hardware and incorporate some new features. Some key changes:
  • The firmware now includes a modified version of the ds30loader bootloader. This will allow future firmware updates if you connect the module to a PC using a USB to TTL serial converter. The bootloader mode is entered by powering on the module with programming pads 2 and 5 shorted together. I will produce a more fulsome description of the firmware upgrade procedure in later posts.
  • There is now an auto power off feature. Essentially, if the module has not moved more than a certain number of meters vertically for a set duration then it will power down. The default settings are 2 m (20 dm) vertical movement in 10 minutes. You can adjust these settings like other hardware settings. I will update the hardware settings manual and BFV Desktop app at some stage.
Next Steps

I am working on release of the Bluetooth_v10 and the USB_v10 over the coming weeks, in conjunction with catching up on back orders and trying to keep on top of the rest of my life. Please be a little patient if you are waiting on a back order.