Sunday 1 April 2018

In search of the Lywood Tunnel

I spent this Easter Sunday in Ardingly, and the previous night the discussion was focused around the proposed extension of the Bluebell Railway to utilise the disused link from Horsted Keynes to Haywards Heath. We were studying the local OS map, and didn't see how the route would go through a set of houses on the Lindfield Road. All the aerial views suggested they were right in the way of the railway, and the OS map wasn't clear as to whether they lay in or on the cutting created for the railway - they are 1-4 Railway Cottages, and we thought there was every chances there were built in the flat bed left by the railway after it was ripped up, or perhaps on a giant spoil pile that filled in the cutting when they wanted to create the road.

We hoped to clear up this mystery. :)

OS Map of the local area (From Bing maps)
The dismantled railway section runs from the old Ardingly station in the west (now an aggregates yard) to the end of a spur coming off from the Horsted Keynes junction.

It turned out that the Horsted Keynes spur ends as soon as the land drops away from the raised embankment next to the road, where once stood Sheriff Mill viaduct - now long since disappeared.

We then went to checkout the Lindfield Road crossing, where we went to seek a tunnel. The aerial maps of the area showed the treeline of the old railway, but it was impossible to determine relative heights of anything. We parked up near the railway cottages and headed down a small road to see if we could find the western portal.

We had a short wander through a wooded area and started seeing the middle of trees, rather than the bases, a sure sign of the ground steeply dropping away, and lo and behold!

First sight of the western portal of the Lywood tunnel.
We were very surprised to see the old track bed quite to clear - and with evidence of tree felling, there seems to have been work to clear up the area very recently.

Partly scrambling down the slippy bank I made it to the bottom.

Lywood Tunnel, Western Portal, complete with gates
The fencing and gates alas prevented my jaunt going into the tunnel, but it was very nice to see the entrance in such good condition - the brickwork looked excellent!

Peering east through the railing
It was here that I realised the tunnel had a name - Lywood Tunnel, taking its name from the local farm and common.

Lywood Farm and Common

The track bed was really clear, but very muddy, so I didn't venture far, but there was a bridge not too far away - perhaps on another visit I will find out if you can get to it from the road marked on the map.

Looking west
The tunnel was also leaking. There was quite a lot of water pouring in from the roof on to the floor below. It may have been less bad than it sounded, instead having been amplified by the shape of the cavernous nature of the tunnel, but either way it was no longer watertight (assuming that it once was!).

Heading back up the bank, I crossed the road and headed round the back of the houses, through a wooded area and along a clear strip shown on Google Maps which turned out to be the path of some small 3-cable electricity pylons. The trees here were incredibly regular, and judging from the diameter of the trunks could have been planted 20-30 years ago. They were pretty close together, so perhaps someone is farming them. Eventually I came upon a small hut:

First sight of the track bed to the east of Lindfield Road
It was very muddy around here. Getting down to the track bed and turning left, I saw the tunnel and headed towards it.

Lywood Tunnel, Eastern Portal
Once again the brickwork was in remarkably good condition, although there was noticeably more moss and vines on and around this structure.

Looking east towards Horsted Keynes
And there we go - mystery solved!

It seems a lot of work has been done to clear the way for track to be laid - perhaps the main challenge now is to rebuild the viaduct, and work out how to run trains to a station at Ardingly again, given that the building is now used for the offices of the aggregate works, and the station has apparently been all ripped up.

Perhaps next time I'm here, in the summer maybe, I'll try and walk the length of the proposed extension and see what kind of state the rest of it is in.


As as some special bonus content, here is a picture of one of the trains we saw at Horsted Keynes this afternoon:

Horsted Keynes to Sheffield Park passenger service

Monday 31 July 2017

Laura's Disco Hat


This past weekend Laura and I attended the wedding of Mike & Abi Bettle-Shaffer, and the guests were asked to attend in bright colours, bow-ties and hats/fascinators - there was even to be a competition for the best on in each category. Naturally bright colours + hats begged for some LEDs to be added to jazz things up! In order to save you the suspense, here is what we ended up with:

The finished product!

So, how did we create this?

Our first order of business was to work out what kind of fascinator to go for, and then how to add in the electronics. Laura happened upon some inexpensive Fascinator headwear on Amazon which had the dual benefit of looking good, and having a small cavity within the mini-hat in which we could hide all of the required wiring and batteries.


Next up we needed to look out for possible LED options - it looked like adding a ring of LEDs would be the way to go, but we found that the 60 LED ring circuit boards come in 4 pieces, so we massage the shape to fit, and use only as many as we needed to illuminate the visible brim of the hat. Somewhere in the region of 30 LEDs didn't seem excessive, and as long as we dimmed the individual LEDs a bit, would allow us to run the hat off a modest battery in order to reduce weight.
Two battery options presented themselves - either we could run of 3 AA/AAA batteries to get a nominal 4.5v, or we could run off a single Li-ion battery which has a nominal voltage of 3.7 volts, and have the advantage of having a known capacity (Annoyingly Duracell and the like don't list their mAh capacity with their batteries, only that it lasts longer than other batteries/Zinc Batteries/Competitor's Brand* [*delete as appropriate]) - not particularly useful. As it happened I had a number of the li-ion batteries, and just needed to acquire a suitable single-cell battery compartment and we could assess the feasibility of that solution.

On to the prototype.

Having decided to add LEDs, the next leap was obviously to control said LEDs via WiFi, so I looked to my stocks of recently-acquired ESP32 boards to provide that capability. I created a basic sketch in the Arduino IDE that used the Adafruit NeoPixel library and shone a single LED. I found that the ESP32 got rather hot - not excessively, but definitely hot to the touch, and was worried that this was both wasting more current than I would like for a battery based hat, but also would be in an enclosed space and hear someone's head - not great. So, I ended up grabbing a Wemos D1 mini board from one of my many boxes of bits instead, and used that as I knew it ran pretty cool. Here's the single LED prototype, running of a 3.7v Li-ion battery:

The prototype
What I haven't mentioned so far is that both the WS2812b RGB LED (Neopixel), and the Wemos board run quite happily off 3.7v. The in-built regulator powered the ESP chip itself at 3.3v, and the LED gets the full battery voltage on its Vcc input - somewhere between 4.2v-ish when fully charged and 3.5v-ish when the battery cut-off circuitry is about to kick in. This happens to work well without the need for a data level-shifting circuit as the 3.3v data out of the ESP board is above the logic high level of the LED even when powered with a fresh battery. Excellent - one less moving part we need to add!

Next up was to add a few more LEDs. We ended up using 2 quarters of the full 60 LED circle, which nicely spanned the visible brim (the rest being taken up by the front bow and other bits of ribbon). Unfortunately the radii didn't quite exactly match, but the two quarters were easily soldered together to keep the LEDs on the brim all the way round in a sort of 'gothic arch' shape:
The LEDs, adapted to fit the size of the mini-hat
Next we could sew these LEDs onto the fascinator, and fortunately they had a number of holes in the circuit board that made it easy to thread some cotton through and make a nice secure attachment. Whilst Laura expertly mastered this step, I looked at options to keep the battery securely in the hat, whilst still allowing a battery change if required.

Parallel processing
After a few ideas we found some velcro in the sewing box, and decided that would provide the small amount of grip needed to keep the battery in (it was already reasonably well wedged in there), with the added advantage that it could also keep the Wemos board securely underneath too:

Battery securing technology
By this point things were looking very snazzy. Three black wires were added to take the power and data signal from the Wemos board to the input of the LED strip, and these turned out to be almost entirely hidden from sight by the main bow - excellent!

For the code, we used the captive portal sample from the ESP8266 library to provide an easy way to bring up a webpage - and combined this with the rainbow code from the NeoPixel strand-test example to start up the LEDs in a pleasing fading pattern:





The options we ended up giving users of the web interface was to turn the LEDs on/off, and set the brightness from dim, bright, full, or max (if you really wanted to be blinded).

And here is Laura modelling the hat at the wedding:


If anyone wants to see it, the code is in github.

Sunday 31 January 2016

Creating a parkrun Banner

The Inspiration:

When I was over in New Zealand I was pleasantly surprised to find that most of the parkrun courses I ran there were signed in some capacity even when the event was not that day - something that I've never seen in the UK. This meant that local people, or tourists such as myself, could run the course at any time of the week, not just a Saturday morning - this also meant that for a number of these courses there was less set-up time needed.

Barry Curtis parkrun, Auckland

The other side effect was advertising - people knew that there was an event that happened there every week, and they knew where to get more information, like this sign in Porirua:

parkrun advertising at Porirua, North Island, New Zealand

But at my local event here in Winchester, there is nothing that suggests an event of any kind takes place, until it gets to around 8:15 on parkrunday, where cones, signs and runners take over - until it has all gone by 10.

parkrun?
We've even had a few people running around the fields on a Saturday morning (against the flow of parkrunners!) not even aware that this event was on until they were advised by the marshalls that they might shortly encounter 200+ people running towards them...

The Idea:

I've been volunteering a lot at Winchester parkrun recently, and chatting my about my New Zealand exploits we came to the conclusion that the signage was a good idea.
As I walked home afterwards I wondered how much a sign (similar to the one in Porirua) might cost to produce, so naturally I tried eBay as my first point of call - they sell everything on there, so maybe there are a couple of signwriters amongst all the other tat being offered I thought...

You will not be surprised to learn that you can indeed buy signs on eBay, and in particular printing banners seems to be big business - in particular those vinyl ones with eyelets that you often see cable-tied to fences advertising Beer Festivals or Village FĂȘtes. Even better, it turns out they aren't very expensive, and a 6 feet x 3 feet banner can be had for under £20 - surely worth a go I thought!

The Prototype:

I started out by trying to design something like the Porirua sign, but then I found the parkrun Brand Guidelines, which set out what you can and can't do with the trademark, and includes how they want the brand to be presented. Also on the parkrun website is a poster generator, which will take care of all the formatting - such as using the correct fonts, but unfortunately created something that was much more at home on a noticeboard rather than an advertising banner - not to mention the fact that the resolution was no where near what I would need to print something 6 feet across...

I quite liked the rolling hills as a possible background, and found that the parkrun.com site has a scrolling image on the background, and even better it was in SVG format - this meant I could scale it to any size I wanted with no loss of quality.
I was then able to combine this together with the brand assets that are linked from the guidelines page which gave me the logo in vector format to create something that looked reasonable as a first attempt:


version 1

It was OK, but felt a bit washed out - the colours didn't jump out at you, and the text was a little hard to read.
I went back to the Brand Guidelines and found that the colour palette had changed at some point to be more vivid, and this combined with the fact the background to the parkrun.com page was probably more muted for a reason meant that I didn't have the right colours.

On a normal image changing all the colours could be a right pain, but because it was an SVG, where the whole image is described in a language of "draw this type of shape from here to here in this colour", I could search and replace all the old colours with their new counterparts in one fell swoop! (I used a link command line utility called sed)

Also, I took note of the poster generator and re-worded the text to closer match, and changed the font to again match the guidelines' recommendations, and this was what came out

The final version

It might not look massively different, but the colours certainly 'pop' more, and the title now clearly describes the event. I solicited some feedback (mostly from Laura), and we iterated a few times on the wording and placement of the text to come up with the version above.

The technical details:

I used Gimp on my Linux laptop to create the design, first creating a blank 72dpi canvas at 6'x2.5' to work off. On top of that I added the hills SVG as a new layer, along with the parkrun logo. When you add an SVG (vector) image to a raster bitmap image you need to say how large you want the image to be rendered at, and at that point the image becomes a set of fixed pixels (i.e. you can't scale it without losing quality) - there was some trial and error in working out sensible sizes to use so that it looked right.
I then added the text, in arial (as requested by the brand guidelines as I didn't have the Gotham font).

Ordering:

At the same time I found a supplier on eBay who could print a 6'x2.5' banner for £14.99 including postage, and this sounded like too good an offer to miss. I sent them an uncompressed full-size .TIF image to print off, and I had the poster in my hands before the next parkrun!

The Result:

Here are the Winchester parkrun volunteers on the 23rd Jan 2016 with our new addition:

parkrun!

It went down very well, and we have now gained permission from the council to affix it permanently to the fence by the field, so now anyone visiting the area will see that there is an event every week - and we look forward to welcoming even more running to the parkrun community

#loveparkrun


Fixing a Samsung TV

Last year my cousin and his family were due to head down the New Forest for a holiday, but unfortunately had to abandon that plan after numerous electrical items in their house packed in within a few weeks of each other. This sounded highly suspect, and could have been due to dodgy wiring or the generally poor filtering of the mains supply in their area at the time. One of the things to go was their TV, which apparently "made a pop, then wouldn't turn back on".

As the TV was replaced with a newer, larger, thinner, and altogether more shiny one, the old was was for the bin - naturally I offered to attempt a repair, or if I couldn't do anything for it, at least save them a trip to the tip with it.

Fast forward to the Christmas holidays when I finally was in the right end of the country to pick up the offending item, and I found myself in possession of a deceased Samsung LE32B450 LCD TV.

First I checked that it was indeed totally dead (and not just a fused plug), and used a different mains cable - no luck. Time to open her up then.

As you can see below, there is a lot of empty space behind the main panel.
On the left we have the input and output sockets, including HDMI, audio, etc... whilst on the right we have the power supply. The input is via the black female socket at the bottom, with power to the main electronics going via the black ribbon cable at the top. Also of note is the power to the backlight, which goes straight from the power supply PCB via small tabs (just above visible along the edge in the photo below)


The insides of the TV

Of note I saw that there was a fuse next to the power lead socket, and I confirmed this had indeed blown. Replacing it with a common 5 amp plug fuse (not the right type, but good enough to see if it made any difference) it was clear something else had gone too - out with the multimeter!

There are not a lot of accessible test points on this side of the PCB, but I saw a bridge rectifier at the bottom of the heatsink that runs top-to-bottom along the board as it offered an easy way to get my probes connected, and sadly there seemed to be no electricity present there.

Scouting the internet I saw that a number of Samsung TVs had issues with bad capacitors, so I gave them - along with every other component on the top side of the board, a good looking over for visible signs of distress, but everything seemed to be in order. No sign yet of whatever made the smell, and potentially let the magic smoke out. Time to unscrew the power supply PCB and see what it looks like underneath...


The underside... Showing some suspicious burn marks
Ahar! Not quite a smoking gun. but clearly this part of the circuit had done some smoking at some point, with the underside of the bridge rectifier component showing serious signs of having blown up.
The multimeter confirmed that serious damage had been done, and 3 of the 4 joints were no-longer making electrical contact.

The offending part
 The rectifier is a GBU406, a fairly standard part capable of tolerating 600V on the input - which means there must have been some serious power spike to blow it, or melt the solder.
[N.B. It is possible that this component still works, I haven't tested it, but I wasn't keen to resolder it in place given what it had been through.]
I ordered a new one off eBay - £1.35.

The replacement

The good news was the new one looked identical to the old one, so I went about unsoldering the dud so I could pop in the fresh one.

Old one unsoldered

New one in place

It's not immediately visible from these pictures, but the old part ripped off some of the PCB traces when it popped, so there wasn't a lot to solder back onto. Therefore I made extra makeshift pads by scraping away the green protective coating and lacquer to reveal some the the PCB trace below, and soldered to that too.
I confirmed that everything was not electrically connected to adjacent components, and then set about testing the power supply board again

Testing

Now, it's very important that you know what you are doing when there is mains voltage about. I have a healthy fear about touching things, so I kept my distance and was careful where I poked my multimeter probes. Please don't do this unless you know what you are doing and have taken appropriate precautions.

Upon inspection I was now getting voltage out of the rectifier and off towards the rest of the board. As I didn't really know where to test for correct voltages (or what those voltages might be), I decided here goes nothing, lets just put it back in the TV. Also, as nothing else seemed obviously in need of replacement, I'm not sure what my next plan of attack would have been, so decided just to go with it

This looks promising!

She Lives!
Well, would you look at that!

The only thing left to do is replace the fuse with one of the correct rating, and it'll be good to go once more - and my cousin will have a second TV that he will need to find a home for...


Saturday 9 January 2016

Parkrun around New Zealand


Me on the Moeraki Boulders, Otago Coast, New Zealand


I started parkrun in November 2014 after having been enticed along to the Fellfoot parkrun by my friend Anna whilst visiting up in Kendal. It was in inauspicious start as I had no suitable shoes, nor shorts, so I borrowed some kit to run my first ever 5k. Surprisingly I managed the course in 26:19, and after that I was hooked.

A year later and I had run 36 parkruns all over the country - but mostly at Winchester, and got my PB down to 20:06 :)



After the celebrations had died down it was time for me to head off to New Zealand for a 3 week holiday. I had the full 3 weeks to take in as much of the country as I wanted, and naturally I was keen to see where the local parkrun courses were. There are 10 courses in New Zealand, with 8 in the North Island, and 2 on the South Island:


Coincidentally I was flying into Auckland and meeting up with a friend in Christchurch 2 weeks later, so the first 9 would guide me nicely through the country - the only outlier would be Dunedin, which I could run sometime during my final week whilst heading around the South Island.

Fun Fact: Dunedin parkrun is the further parkrun away from my home course of Winchester, some 19185km away.
Bonus Fun Fact: The two further apart parkruns, for some extreme tourist-ing, are Penrose (UK) and Dunedin (NZ), clocking in a distance of 19456km apart!

Before I headed out to NZ I did a bit of preparation, taking with me printouts of each of the courses, along with the course notes and information about how to find the starts. Finding the courses would be the easy part, but as at least 8 of these runs would be freedom runs with no marshalls I knew keeping to the official course would be the hardest part.

NZ parkrun #1 30/11/2015: Cornwall Park

 Cornwall park is located in Auckland, to the south of the Central Business District, and lies next to the volcanic peak of One Tree Hill. The course was a little non-obvious to start with, but is probably easy to follow when the cones and marshals are out - especially under the trees near the start, and navigating around the bandstand. The majority of the course to the south is fairly east to guess, the only query is where to turn around - I think in the end I went a little further than I needed, just to make sure I wasn't short.

Scoping out the route in the park
A nice place to start my tour :)


NZ parkrun #2 1/12/2015: Western Springs

  The Western Springs park lies next to Auckland Zoo, so naturally after I had a wander around looking at some of the rarer native animals I did 3 laps of the adjacent lake. The start was a bit of a guess and although running around the lake was fine, there were a number of junctions later in the lap which meant that I did go wrong on the second time around.

My best guess as to where I should start
Oops, looks like I took a shortcut!

NZ parkrun #3 2/12/2015: Millwater

  Millwater, just north of Auckland, was the first of the out-and-back parkruns I would run, and this one runs along a cycle/walkway along the banks of a river estuary. The concrete path was unforgiving underfoot, but it was impossible to take a wrong turn. I did some preparation before the run to work out where the turnaround point was, conveniently in a small park, so I managed to run the requisite 5k with no issues.
The probable start line
Easy to follow, no chance of getting lost

NZ parkrun #4 2/12/2015: Barry Curtis Park

  I didn't know what to expect of Barry Curtis, from Google maps it appeared to be a desolate field on the South-East extent of Auckland, but once I was there I was pleasantly surprised - The whole parkrun course was permanently signed, indication each km point, along with the start and finish lines, meaning that although I had the whole park to myself I knew exactly where I was going :) Nice one Barry Curtis (whoever you are)!

Full marks for ease of freedom-touristing!
A thoroughly nice run :)

NZ parkrun #5 5/12/2015: Hamilton Lake

  My first Saturday in New Zealand and I found myself in the city of Hamilton - what a coincidence! In the summer parkruns in NZ start at 8am, so although it was a bit of a shock to my system to be up even earlier than usual, I made my way down nice and early - I even helped stake out the finish funnel :)
  Blue skies made this an excellent start to the weekend, and I clocked my first official parkrun outside the UK :)
  With only one turn required after having completed a lap of the lake this would be very easy to do as a freedom run, and my early warmup lap of the lake proved that the course was very easy to navigate without prompts from the volunteers.

Turns out the signage is even back to front in the Southern Hemisphere...
A beautiful course on a beautiful morning

NZ parkrun #6 9/12/2015: Kapiti Coast

  The Kapiti Coast course runs alongside a river on a stony bridleway for its entire length. The course was nicely signed with km posts and a turnaround marker making this a very pleasant run.

Add caption


NZ parkrun #7 9/12/2015 : Porirua

  The Porirua course was another excellently signed course, even with a large advertising banner on the entrance to the carpark. With km posts set out along the route, along with a marker for the turnout point made this very easy to navigate - apart from having to wait for a moment to pass under where some trees were being pruned.

All Welcome!
Another warm day in NZ!
A nice shady course to hide from the sun :)




NZ parkrun #8 9/12/2015: Lower Hutt

  The Lower Hutt course was the last parkrun of the North Island, and my third before lunch, so it was quite tough. Although the course wasn't obviously signed, I did find some km marks stencilled on the path in places.
  Apparently the river has flooded really badly over the years here, so they have built large banks to protect the city - the route took me along the top of the embankments out to the mouth of the river and back. High up and open to the elements this course is very prone to the wind blowing off the sea, and being next to Windy Wellington it was certainly blowing when I ran the course.

Love parkrun :)
A potentially very windy course

NZ parkrun #9 12/12/2015: Hagley Park

  Hagley Park forms a large expanse of green right next to the heart of Christchurch. The course was marked by small signs put out by the Run Director just before so it was very easy to follow, and with a bit of preparation should be fine for the freedom runner. A very friendly bunch of people, and I was in good company alongside other tourist runners from the UK too :)
  It ended up being a very windy day, and at 8am it was already blowing a gale.

Incredibly windy down the straights
Fun Fact: As New Zealand is located at GMT+13 I was actually the 106th person to complete a parkrun that weekend :)




NZ parkrun #10 13/12/2015: Dunedin

  The final parkrun, Dunedin! For this run I had company, as my friend Lucy was running with me. Set in the botanical gardens this always looked like the most difficult course to navigate given the number of paths in the park, and alas that is how it turned out. The two laps of the Rose Garden were generally fine, although it wasn't clear exactly which paths we should have been taking, but the real problems were when we crossed the bridge to do two larger laps of some of the paths along the hills on the other side. Looking back afterwards we think we went wrong very badly on the first lap, and only slightly wrong on the second. We did 5k along roughly the right course, but the number of steps, steep hills and wrong turns will mark this course down for ease of freedom running!

It looks nice, but there are hills hidden in there!
Very confusing, very hilly!


All 10 parkrun courses done, including 2 official runs, I had a great time in New Zealand - I could think of no better way to see the country :)

#loveparkrun