BerWin: The Wrap-up

Map of BerJog-BerWin-LeWinWe’ve been back home a while and busy with other things, but now a quick wrap-up of the snappily named BerJog-BerWin-LeWin multi-tour, and specifically its BerWin leg. I’ve updated our map of all cycle tours and doodled a map just for BerJog-BerWin-LeWin because I’m incapable of leaving things to your imagination! Caroline The Stats has added some facts and figures for your amusement.

I said I’d comment on our experiences touring in the UK versus Europe.

Firstly, the weather! I’m hesitant to generalise from a small sample, but both our UK tours have had prolonged rainy spells. In Europe we’ve had severe weather but it tends to be one bad day and not prolonged. I guess the difference between a maritime and continental climate.

Most of our European tours have followed major rivers, and consequently our stops have been rich with cultural cities. Lots of things to see and do, lots of places to eat and drink. British tourism seems to emphasise landscape over culture; maybe because we have so many beautiful places, maybe because London sucks the life out of our regional centres, or we don’t cherish the culture in other cities (sad to see Liverpool ousted from UNESCO world heritage status).

I can’t ignore the state of cycle infrastructure. In one sense we are fortunate: there is a wealth of very low-traffic lanes in Britain. Other, more recently-developed countries might have just one way to go city-to-city, and it can be monstrous (Romania, ugh!) But we sorely lack the visionary, high quality cycleways of Germany, Netherlands and Denmark. Even France has invested heavily in tourist-attracting routes on the Eurovelo network.

Don’t want to end on a sad note though! We have happy memories of the wild and remote places, the exceedingly steep hills and extreme weather of the Pennine Cycleway 🙂

Meet us at Land’s End in September.

BerWin: Sheffield – Ashbourne

Descending to HathersageWhat a difference good weather makes! Today was a game of two halves (and no extra time). Tough climbing for 40km, but in lovely sunshine it was a pleasure to spin up from Sheffield, where we’d enjoyed lovely dinner bed and breakfast with Clara, to Stanage Edge. Fabulous descent from there to Hathersage. The long backroad climb from Ashford in the Water towards Monyash was a delight. After climbing again out of Monyash, we were treated to the Tissington Trail, 30km of steady descent into Ashbourne.

Yesterday’s ride got short shrift because a certain football match kept me busy in the evening, but it was another rainy one, beautiful in its way, plunging repeatedly into West Yorkshire mill towns, before spiralling back up to the Moors. For TV afficionados, apparently we started in Happy Valley and passed through Last of the Summer Wine.

BerWin: Dent to Heptonstall

Climbing out of ColneMentioning no names, one of us has a battery to help on the hills, of which there are plenty on this trip. The e-bike offers five rockets. 1/5 rockets compensates for the extra weight of hauling a heavy battery around; 2/5 roughly equalises with the (ahem) human-powered partner (who still fails on the 25% sections); 3/5 will get you up nearly everything; 4/5 will get you up the mad climbs around here, and 5/5 for all we know will launch you into orbit (never been tried). There was a little scare, range-anxiety I think they call it, when the remaining battery-life fell to 21km on a 90km ride with mostly 3/5 rockets engaged. So the battery-assisted partner has to ration her (oops, giveaway) rockets. Since yesterday’s deluge, an added complication is that the control unit has taken in water, and the ‘reduce rockets’ button won’t work!. No joke: you have to turn it off and turn it on again, to revert to no rockets. Well, on today’s quite challenging (understatement) 100km / 1800m climb ride, the battery-powered partner survived mostly on 1/5 with an occasional blast to mount the 25%ers. Kudos.

Though the bar is now quite low, the weather today was fine, often drizzly, occasionally rainy, sometimes sunny. We scaled the col out of Dent, and several more categorised climbs, before eventually plunging into Heptonstall, where we are staying tonight. At lunchtime we even met and ate outside in Settle with Cathy and Richard. All is good!

BerWin: Alston to Dent

Hartside Summit
Weather report for July 5th. Today will be drizzly, followed by rain, heavy over Hartside Summit, lashing and freezing on the descent, brightening later, followed by rain, sun, rain, sun, rain and finally hot sun. You will wear light rain gear, heavy rain gear, every layer you’ve got, long trousers (not before time), raingear, no raingear, raingear, no raingear, raingear, shorts, suncream (not before time). Sheep spilling messily across the road, electricals misbehaving, crackling fresh tarmac, diverting to train later.

BerWin: Horsley to Alston


Lambley Viaduct lies on the South Tyne Trail, a splendid converted railway line, with gentle gradient and mostly good surfaces. It provides an excellent facility for walkers and cyclists, except in the region of the viaduct, where a property owner, whom Caroline dubbed The Selfish Gardener, prohibits cyclists from using a short section of the trail. Hence a big climb to the fell above. The compensation is a great view of the viaduct which walkers will not see, and for us, a sighting of a pair of curlews.

A very soggy day at times. Just after Once Brewed, we were caught by a thunderous downpour with lip-smacking rain pellets, and flash floods. As we emerged, sodden, we followed a sign to Hardriding.

The offroad trails around Wark and Kielder forests were leg-sapping and deserted. Northumberland’s epic emptiness has been its striking feature. I’m reminded of my Brummie grandmother who, on being taken for a holiday in the Highlands of Scotland, was unimpressed. “Just a whole lot of nothing” was her verdict. I think that’s rather the point.

BerWin: Norham to Horsley

Otterburn ranges

I have a phobia about bridges, so when we crossed a narrow one, open railings at each side and just wide enough to walk side-by-side with the bike, my heart was in my mouth. We dropped down the other side and looked back up at the crossing, just as 15 road bikers in team kit of the Early Morning Crew thundered across at full tilt. What a good job I wasn’t still teetering across when they arrived.

In other news, I can report that a sweaty man, grinding slowly up a hill in Northumbria in July attracts a gazillion flies. Luckily they don’t seem to bite. The longest climb of the day was up to the Otterburn ranges, and it was something of a classic. 4km of climbing including 2.5km over 5%, on a smooth military road across wild moorland I recalled my cycling mentor, Mike Spencer telling me once, 180km into a 200km Audax, that the next hill was ‘best attacked’. This one – at least at current fitness levels – was best defended; lowest gear, lowest cadence that will keep the pedals turning, don’t speed up when the slope abates and use the time to recover.

BerWin: On The Road Again

On The Road Again 🎶 No matter how I try to be sophisticated, the shuffle algorithm in my head picks the cheesiest music. Willie Nelson has been playing as Caroline, Rob, Eunice and Evgeny hit the road again. You’ve heard of LeJog; JogLe too if you’re fancy. We’re embarking on leg two of BerJog-BerWin-LeWin. Caught the train from Kings Cross to Berwick. Last time we were here we headed north to Orkney by way of John O’Groats, this time south and homeward bound. It’s been two years since we’ve toured and there has been a lot of idleness in between. So wish us luck taking on the Pennine Cycleway on weak legs. A short warm-up ride this evening, crossing the Tweed a couple of times to reach our B&B in Norham.

A GPS tracker for ultra-endurance cyclists

[Preserving this write-up I submitted as an entry in an electronic design competition].

Cycle Tourist

Ultra-endurance cycling events are becoming more and more popular. Events such as the Transcontinental Race (4,000km, unsupported, from Belgium to Turkey or Greece) require cyclists to ride for upwards of 16 hours a day, often catching just a few hours sleep, bivvying at the roadside to avoid wasting time on hotel checkins. Some events, such as the Audax UK “Lumpy End-to-End”, 1,800km in 8 days, require validation by GPS track. Opportunities for charging battery-powered devices are few and far between. While most participants use a dedicated consumer GPS device, or mobile phone, for navigation and capture of their track, there is a serious risk that batteries fail en route. It would be devastating to complete such an event, but not to capture the relevant GPS validation track. The purpose of my device is to provide a very low-power, simple GPS tracker, that can run unattended for days at a time on a single battery charge. It could be used as either the primary, or a backup, GPS tracker for ultra-endurance races.

Requirements

Key requirements for such a device include:

  • Low-power. Rechargeable battery powered with ability to run for several days without a charge.
  • Weather-proof. There is a high probability of heavy rain at some point on such a long event. The device must exclude water.
  • High data storage capacity. Each GPS track point requires 32 bytes, in a suitable binary format. The device must record a point at least every 5 seconds for validation. Hence the device must be capable of storing more than 0.5MB per day in non-volatile storage.

Selection of components

  • ESP32. This microcontroller has many advantages which contribute to delivering the requirements outlined above. Low-power: The device can operate in deep sleep mode, consuming 10 µA, for much of the time e.g. for 4.5 seconds in every 5 second sample period. While collecting track points from the GPS device, the device is powered-up, but WiFi and Bluetooth are not required, so the radios can be disabled. Miniature. Even in a development board format (in this case the ESP32-PICO-KIT board), the device is small enough to be housed in a compact, lightweight enclosure that can be carried unobtrusively by the cyclist. WiFi. The device operates standalone while collecting GPS tracks, but at the end of event, we need to retrieve the saved track. This can easily be achieved by activating WiFi and a simple web server, allowing the GPS file to be downloaded. Touch-sensors. By using touch sensors as switches, e.g. to switch between tracking and track-retrieval mode, we avoid the need to open up physical ports on the enclosure, thus minimising opportunities for water ingress.
  • U-blox MAX-8C GPS. U-blox GPS devices are cheap and easy to obtain. They provide support for text-based NMEA protocol, as well as proprietary UBX binary format. However, many of the development boards are not designed with low-power in mind. MAX-8C is inherently low-power, and can be built into a low-power board such as this one from Uputronics. Typical current during GPS acquisition is 18mA, but low-power modes provide potential for this to drop to around 4mA post-acquisition and during tracking.
  • Winbond W25Q256FVFG External SPI Flash. The ESP32-PICO-KIT provides 4MB of flash memory, but much of this is consumed with firmware and program storage, leaving no more than 2MB available for storing GPS trackpoints. Given our aspiration to record a track for many days at a consumption rate of 0.5MB per day, I identified the need to interface to a further external SPI flash chip. The Winbond W25Q256FVFG provides 32MB of additional flash, which will support 60 days of GPS track recording.
  • LiFePO4 battery. All the above components run at a standard Vcc of 3.3V, therefore – with a suitable voltage regulator – many options of battery format are possible, including LiPo (3.7V – 4.2V), Alkaline, NiMH. LiFePO4 batteries are an attractive option, because the nominal voltage is 3.2V, and the discharge curve is very flat, dropping below 3.0V only after releasing around 95% of its total capacity. This means that 3.3V devices can be reliably powered without a voltage regulator, avoiding the associated inefficiencies. A drawback is that these batteries are heavier and more bulky than LiPo batteries of comparable capacity.
  • TP5000 LiFePO4 charging module. The LiFePO4 battery, which is sealed inside the enclosure, can be charged with 5V from a typical USB charger, via an internal TP5000 charging module. To prevent water ingress, a 5V DC jack with rubber seal is used in preference to a mini- or micro-USB connector.
  • Touch-pad hardware. Touch-pads are implemented with a metallic disc attached on the inside of the enclosure. A steel washer has been used successfully. Further work is required to evaluate alternatives e.g. a copper rivet, for sensitivity and precision.

Design approach

Software is developed in C/C++ using ESP-IDF development framework. Tasks within the framework include:

  • GPS. Initialise the GPS device with the sample rate and protocol messages required. GPS location acquisition can be accelerated by using AssistNow Offline (u-blox), meaning that GPS information (ephemeris and almanac) can be downloaded from an Internet site over WiFi for 35 days into the future. Then, when the device is powered-on, the relevant day’s offline data is downloaded to the GPS device. This speeds up acquisition from 30 seconds to around 5 seconds. Once GPS location has been acquired, the GPS device sends a trackpoint via UART to the ESP32 host once every 5 seconds. A binary message, UBX-NAV-PVT, is used, because it encodes the location data in a relatively compact binary format. The received UART data wakes the ESP32, which, with minimal processing, writes the location data in the same binary format, via SPI, to external flash. The ESP32 can then return to deep sleep. This 5 second cycle will repeat indefinitely for as long as the device is in track-recording mode. A simple file system is implemented on the flash (esp32_fatflash by Illucius) to allow tracks to be associated as files, and so that they can be deleted by the user, and the storage occupied by that track can be made available for reuse.
  • Touch-pad. A second ESP-IDF task monitors for touch pad events. A long-press on a touch pad triggers a software event, which switches the device to “track-retrieval mode”. This activates WiFi and a simple web server. This will normally only occur when the ride is over; the device may be powered with external 5V supply at this time, and the additional power consumption will not be a problem.
  • WiFi / Web server. A third ESP-IDF task, triggered to be created in “track-retrieval mode”, WiFi will activate (could be either as a station on a pre-configured SSID, or as an AP providing a new, temporary SSID). A web server will be started, offering, via a browser page, a list of GPS tracks available for download. Each will be identified according to its start time, which is readily discoverable by decoding the first trackpoints of the binary trackpoint data stored in external flash. When the web client selects a track to download, the web server will decode trackpoints read from external flash, on-the-fly, converting them into the industry-standard GPX file format. The web server will also provide the ability to delete selected files, which will result in an entry being deleted from the list of tracks held in flash, and the flash pages used by that track being returned to a free page pool.

Development status

The hardware elements have been acquired and integrated on breadboard. Each of the main capabilities has been prototyped in software and demonstrated individually, i.e. ESP32-GPS integration, ESP32-external flash (both direct page read/write and via FAT), WiFi and web server, LiFePO4 battery operation and charging, touch sensor detection. The capabilities have not yet been integrated into a single working firmware build; this is work in progress. The current software implementation can be consulted here. Further work is also needed to design the enclosure to accommodate the hardware in a compact, weatherproof format. The build needs to be optimised for power consumption. Initial measurements suggest a current-draw of around 35mA in track-recording mode, but I believe this can be reduced below 20mA with optimised use of deep sleep, and with careful power management of the GPS module. This suggests the device could operate for 3 days on a single 1600mAh LiFePO4 battery, or 6 days on two. I look forward to completing this unfinished work, but wanted to submit an entry for the competition in time for the deadline.

Potential further enhancements

Because the ESP32 is also blessed with Bluetooth, the possibility exists to also track Bluetooth sensors such as heart-rate monitors and pedal-power meters. This would clearly increase power consumption compared to simple GPS tracking, but in certain circumstances it might be an attractive trade-off.

Transcontinental Race, Belgium-Turkey, 2,400 miles 59,000m ascent (that’s six and a half Everests)

IMG_20160726_202350917-50On Friday 29th July I will join around 250 other cyclists on the start line of the Transcontinental Race in Geraardsbergen, Belgium. The race is quite unusual in several ways:

  • The clock never stops, racers choose where, when and if at all to rest.
  • No outside support is permitted, we can use only what we take with us, or find en route at commercially available services.
  • There is no defined route, just four mandatory controls; naturally they are located at high altitude in the Massif Central, Alps, Dolomites and Balkans.

The finish is at Çanakkale near the Gallipoli peninsula in Turkey. Part of my motivation is to remember my grandfather who survived an extraordinary bloodbath when he landed at Gallipoli 101 years ago.

I hope to complete the course in 18 days or less, but it’s a very tough race and last year almost 50% did not finish. I’m not seeking sponsorship but I’d be thrilled to receive any words of encouragement en route. My race number is 61 and you can read brief updates from me on Twitter (@robjordan and #TCRNo4s061), view my daily rides by following me on Strava (Rob Jordan, Winchester) or email me: [email protected]. We will each carry a satellite tracker and you can view position updates every 5 minutes here: http://trackleaders.com/transconrace16 (beware, it can be addictive!)

You can read lots more about the race at www.transcontinental.cc.