Sunday 20 January 2019

Ultegra Di2 Upgrade (or not)

See Update Here:  Di2 Monitoring - Update

I am lucky enough to have a bike with Ultegra Di2 - my Giant Propel:


I have had it since about April 2016 and have done nothing to the gears except charge the battery a few times

A rash moment during the 2018 Black Friday sales saw me buy a Garmin 1030. No real reason for this other than the mapping is much better as is the range of sensors that can be connected. For 2018 Christmas I got some Amazon vouchers, and coincidently I needed to use my IHG loyalty points - I did not have enough for a free night so redeemed them for more Amazon vouchers. As a result I had enough to buy some toys - namely the Di2 D-Fly unit that would allow me to read selected gear and battery level on my Garmin. 

I carried out some research as there appeared to be several types of unit - the "old" type and the "newer" type:

This is the older type - part/model number: EW-WU101



And this is the newer type - part number EW-WU111.



The main difference is clearly the physical size and shape. The older model is normally fitted to the seat stay 



Whilst the new model is small enough to fit inside the frame or discretely under the handle bars by the A Box for example

The other difference is that the EW-W111 supports Bluetooth and using a Shimano App can be used to update and configure Di2. This is an alternative to using the wired connection and Shimano's PC based E-Tube software (apparently E-Tube is Windows only so this is a huge advantage for Mac users). I was not bothered by the Bluetooth feature and capability as I was happy to use E-Tube and bits of wire

There was various documentation and discussion on the internet and it seemed that whilst there was some mention of needing battery upgrades (newer batteries have more processing power apparently) in order to support synchro shifting this did not appear to be a prerequisite. My Giant has an internal battery which I believed was a newer type. Given the different sizes between the 2 units (and availability - the WU101 unit seems harder to get hold of) I ordered the WU111 with the intention of fitting it in the seat tube with the battery.

I also needed to order a cable as well. Whilst its not unreasonable to assume that different bikes will drive different installations, the fact that a cable is required, but not supplied, is rather annoying

I did also have an internal dilemma about the price and output. Basically (Jan 2019 prices) its £70 for the D-Fly unit and £15 for a 250mm cable. I am sure weight for weight this is more expensive that gold. So about £90 to get a few numbers on the a Garmin. I rationalised it as its was mostly "free" as I was using Amazon vouchers which I had no paid for. So a few clicks later and Amazon's massive logistic operation was working to deliver the items. (I used free delivery and like most times they came in less than 2 days - I never pay for deliver and am always pleased with the delivery time)

The following weekend I was all geared up to fit the unit. The first action was however to update the Di2 firmware on my bike

The E-Tube software is not the greatest. A few comments are that the window is a fixed size and does not show all the components fitted, and there are quite a few conflicting and unclear prompts and messages. Here's a typical sequence of what is required to update:



First start the software and then make the physical connection.



Once it has connected it will display the components it found. Note that I was asked if I had sprint shifters fitted to the primary shifters as part of the process. Above it shows both front and rear dérailleurs and the Left and Right shifters. I then needed to scroll the window (poor software so I said above) to see the rest of the components:


Here the battery and A Junction box are shown. Note that at this point I have no wireless unit installed.

The E-Tube software also identified automatically that there were later firmware versions available:



Selecting OK allows you to select which components to update (all are selected by default):
This shows that battery was the latest version and the dérailleurs were quite outdated.

Select and the update process starts:
This took about 3-4 minutes at most.

Having  completed the update I then removed the cable and checked all was still functioning which it was. I then removed the seat post to insert the WU111. 

A good thing about my Giant is that the seat post is marked:


With the seat post removed the battery connection can be seen:



There is a special Shimano tool to remove the cables:




However its not possible to use this on the battery cable - and was in fact not needed as it was easy to get a firm grasp of the moulding rather than the cable itself. I fitted the spare cable to the battery and connected the WU111 between the two cables.

And the shifting stopped. I removed the WU11 and refitted as standard - and it worked again. Repeat the connection of the WU111 and it didn't work. So I replaced the original cable to the battery and added the WU111 between a shifter and Junction Box A - and it didn't work still.

So I reconnected the E-Tube software and let it search for the components. In this case it showed the WU111 but it was in red - with a note about checking the compatibility chart with a URL link. Following THIS link gets you to a Compatibility pdf file that I had not seen before. The key data was here:



This clearly shows that my battery needs a SM-EWW01 to broadcast the data. Any other unit is not compatible. 

I had not seen this data sheet before - if I had I would not have bought the parts.

So to summarise:
  • I have updated my Ultegra Di2 system to the latest Firmware
  • I cannot use an EX-WU101 or EX-WU111 with my battery
  • SM-EWW01 are impossible to find (obsolete and none second hand on EBay)
  • I need to spend ~£100 to upgrade my battery in order to use an EW-WU111 to get Di2 data onto my Garmin
  • I need to send my purchases back to Amazon
One change I noticed after the firmware update was a changed battery level check behaviour of the lights. Prior to the update a battery check would use the green light only. Post the upgrade I saw that the orange light flashed as well. Some double checking showed the following behaviour (my battery was fully charged):
  • Solid Green light
  • Solid green light and solid orange light
Here's a short video of the new behaviour (Planet Rock in the background!):





I was concerned I had somehow induced an error state but a quick Google showed:

The first light is the battery charge indicator.

  • Solid green = 76 to 100 percent charged
  • Flashing green = 51 to 75 percent charged
  • Solid red = 26 to 50 percent charged
  • Flashing red = 1 to 25 percent charged
The second set of lights indicates the which shift mode is selected.

  • Green and red flash once = manual shift mode
  • Green and red flash twice = semi synchro shift mode
  • Green and red flash thrice = full synchro shift mode
I didn't think (from my initial research) that my battery supported syncho shifting so I am not quite sure what is going on here. I have no intention (at present) of using synchro shift. 

Therefore despite this minor panic all was well

I hope there is some useful information for others in this post

Finally - my Giant supports "Ride Sense" - Giant's own wheel speed and cadence sensors. This involves a couple of holes in the frame that let water in. Some recent Google use found the spare parts that are blanks, Although these were £1.99 postage made it closer to £5 - however I bit the bullet in the hope that the Bottom Bracket might last a little longer. Its just possible to see the parts fitted here:



Tuesday 1 January 2019

TCX to CSV Converter

Update January 2021. As well as this TCX converter I have a .FIT file converter here: Fit File Converter. This will read .fit files and allow output as .csv or tab separated files

In the post here: Power Meter Comparison, I showed some data comparing power from my Tacx Smart Turbo Trainer and a 4iiii crank arm power meter.

To do this I obviously needed to log the power data into 2 acquisition systems as a Garmin will only record 1 power meter at a time. I used my Garmin for the 4iiii data and logged the Tacx data in a TCX format using a PC based trainer application -  VeloReality (Veloreality).

However I needed to read the TCX file that the Veloreality creates into Excel, so I wrote a small (Windows) program to do this (note that initially I manually uploaded the data into Strava and then used my other program (Strava Data Analysis) to get the data - however this means that I need to upload 2 identical rides and this obviously screws up the annual statistics).

Here's the program (which is available to download, see further in the post).

This is the main window, pretty simple really. Press the "Import TCX File" button (or use File/Import TCX File)



There are also 2 areas to display the data as the TCX file is processed. The top text box shows general information about the activity recorded and the lower text box shows the actual time based data (as will be seen later)


Also on the Menu bar is an "About" dialog box showing version and release date.




To import a TCX file either select the button or use File/Import TCX File as here:

 
In either case a standard File Open Browser appears. Select the file in the normal way:






The file will immediately start to be imported. A progress bar shows an estimate of progress.




Once imported and converted the Export button will become active allowing the data to be exported as a .csv file using a standard Windows Save dialog box






Here's an example of a converted file:




And for information this is the source TCX file:



This program has worked reliably for me, on a small sample size of TCX files. This of course means that it will not work for you - so please contact me via this Blog so I can investigate issues

The program has some small configuration possible . Basically it reads a line of the file at a time and compares contents of each line against some specified pre-defined strings, and then processes accordingly. The user may edit these strings if there are differences, perhaps due to language etc. This is done as follows.

From the main File menu select File/Show Application Folder.



This will open the folder used to hold an old fashioned INI file (and also some small application log files). The INI file is created on first run from hard coded variables.



Open tcxconverter.ini and you will see the following:
[TCX_Converter]
TCX_Header=<?xml version="1.0" encoding="UTF-8"?>
TCX_Track=<Track>
TCX_Trackpoint=<Trackpoint>
TCX_Activity=<Activity Sport="
TCX_Activity_end=">
TCX_Id=<Id>
TCX_Id_end=</Id>
TCX_Lap=<Lap StartTime="
TCX_Lap_end=">
TCX_Time=<TotalTimeSeconds>
TCX_Time_end=</TotalTimeSeconds>
TCX_Distance=TCX_Distance
TCX_Distance_end=</TriggerMethod>
TCX_Trigger=<TriggerMethod>
Value_Trackpoint=<Trackpoint>
Value_Trackpoint_end=</Trackpoint>
Value_Time=<Time>
Value_Time_end=</Time>
Value_Position=<Position>
Value_Position_end=</Position>
Value_LatitudeDegrees=<LatitudeDegrees>
Value_LatitudeDegrees_end=</LatitudeDegrees>
Value_LongitudeDegrees=<LongitudeDegrees>
Value_LongitudeDegrees_end=</LongitudeDegrees>
Value_AltitudeMeters=<AltitudeMeters>
Value_AltitudeMeters_end=</AltitudeMeters>
Value_DistanceMeters=<DistanceMeters>
Value_DistanceMeters_end=</DistanceMeters>
Value_Cadence=<Cadence>
Value_Cadence_end=</Cadence>
Value_HeartRateBpm=<HeartRateBpm>
Value_HeartRateBpm_end=</HeartRateBpm>
BPMValue_Value=<Value>
BPMValue_Value_end=</Value>
Value_Speed=<Speed>
Value_Speed_end=</Speed>
Value_Watts=<Watts>
Value_Watts_end=</Watts>
Value_Extensions=<Extensions>
Value_Extensions_end=</Extensions>
Here it is clear the each entry in the TCX file (either as an activity header or data value) has a matching INI file category. Here are some examples:


The type of activity in the TCX file is "Biking" and is recorded in the file as follows:
<Activity Sport="Biking">
I want to extract Biking and so this is preceded by <Activity Sport=" and followed by ">
So that the program can detect this it has a variable called TCX_Activity which equals <Activity Sport=" and another variable called TCX_Activity_end which equals ">
The program searches each line between these two variables and extracts Biking
So if your file has a different text either side of the data required these INI file settings can be edited
This process is used throughout the program


There are some assumptions and limitations
  • Correct TCX format. I assume that every 1st line will be: <?xml version="1.0" encoding="UTF-8"?>. If this is not the case then the conversion will abort. No other format check are performed
  • The way I have written it is not at all good and assumes all files look and are formatted exactly like this file. I suspect it will fail when TCX files alternatively formatted are passed to it. This will be an interesting programming challenge to better handle XML type files. I think some form of recursion will be required and I have always struggled with that
  • Some data (like cadence in this example) is duplicated as it also appears in the <Extensions> block. There is no processing to remove this duplicate
  • It will only process the variables in the INI file. If your file has additional variables these will be ignored. I will address this to an extent by allowing user defined variables to be defined in a later version
  • Error trapping is crude and simple
  • I extended my C# programming learning by using Databinding for the text boxes in this application. I think this affects performance and is not strictly necessary




Getting and installing the program.

I have had trouble in the past trying to provide a robust means for people to install the program. I have been adding a zip file containg the Installer that Visual Studio builds and this has had I believe mixed success for people to get it to load.

However with further work, and actually building it as a Release rather than a Debug version, reveals that a standalone exe file is also created. This will just run and work although these is no installer. This is much easier


I have put both these solution in individual Zip files on my Google drive. Here is the link for these files: Link

TCX_Converter_1_0_0_7_exe.zip is the standalone exe file and TCX_Converter1_0_0_7_installer.zip is the installable version


Please give feedback in the comments section of this post and I'll contact you for further information if there are issues