Blog

Folding kitchen steps

We needed some steps for the kitchen since our cupboards are really high. However, we’re a bit short on floor space, so I wanted something that could fold away and not take up too much room when we weren’t using it. Not finding anything like that on the internet, I made my own plan in SketchUp and set about building it.

Here’s the first cuts of the sweet Chestnut ready for cutting into the parts which make up the stool.

After having run the pieces through the planer and thicknesser, I glued some of the more complicated pieces. Here, you can see the pair of sloped edges. Clamping them as a pair meant I could set the clamps against parallel edges.

This is the glue-up of the two pieces which make up the sides of the part which swings down. Their shape is a bit complicated because they have to fold into the upper steps. Again, gluing them as a pair meant I got nice parallel surfaces for the clamps.

I used my router to create the rebates in the sides (here are the two base edges held in place together to minimise the likelihood of tear-out).

Having milled all the pieces, I did a quick dry-run to see whether things fitted as I expected. In general, everything looked good.

Here’s the dry-fit with the steps in the “stool” configuration. The footprint of the steps when they’re folded like this is only 41cm wide by 27cm deep. They height of the final stool is also just right for resting on whilst waiting for something to cook.

Gluing up the bottom section…

and the top section.

Checking things fit together as expected once glued together.

As it turns out, not everything was quite right, so I had to shim this step to make up the difference.

I felt the steps weren’t going to resist racking too well, so I added this diagonal brace to provide better rigidity.

Adding the hinges. I looked for sprung hinges that would have made the top come down gracefully, but they were all too big for this project.

Hinges in and the first of three coats of varnish going on. I lightly sanded between coats with 1500 grit to remove small blemishes.

Steps stored in their stool configuration, taking up a relatively small area.

Here’s the steps unfolded and in use.

New shed roof

Following on from replacing the workshop roof, I needed to replace the roof of the adjacent two sheds we have. At the time of the original work, the workshop’s roof was in significantly worse condition and so that’s what we worked on first. In the intervening years, however, the other roofs have deteriorated to the point that they need replacing too (some holes in the top, slipped slates and rotting woodwork).

First order of the day was to remove the old slates. This was pretty easy as although the slates look solid enough, in reality, they were extremely brittle and broke away easily.

Slates all removed and handy hole cut in the roof for easier access.

Front portion of the roof (purlin, rafters and battens) removed. Inside was a mess!

I had to work for a day so work continued in my absence. Here the wall plate, ridge beam, purlin, rafters plus the first few rows of battens have been installed. The trick here was integrating the new roof with the roof visible to the left and a roof down the hill (not visible). This involved lots of string and carefully measuring to make sure the roofs would interlace nicely.

We added a water resistant breathable membrane under the battens to help accommodate the fact we were unlikely to complete this without it raining at some point.

Front roof battens complete.

Adding the first row of slates. We used a double layer of slates on the bottom row to allow water to fall from the roof easily.

Meshing the slates between this roof and the next was tricky as the roof on the left is pitched down the hill slightly differently. Nevertheless, we managed to get them integrated without too much hassle.

Work starts on demolishing the back.

Rear section cleared and purlin installed. We opted for a more catastrophic approach to removing the old roof here: we just pivoted the roof off the wall and onto the floor. In all, removing the rear section of the roof took about 2 minutes!

We had to notch the wall plate to get the rafters in the right position so it would interweave with the existing roof visible on the right and the bottom roof just about visible on the left.

Not a bad view from the top!

First battens being installed along with the breathable membrane.

The view from inside. I like the fact it was nice and bright inside, so I decided I would roof part of the back of the roof with plastic tiles. In the end I had to have custom cut plastic since nothing was available for sale. The cost per plastic “slate” was about ten times more than an actual slate. Lesson learned!

Making progress on the front section. You can see where the pitches of the old roof and the new section don’t quite align (slight dip in the line of the bottom row).

However, the dip is less pronounced further up the roof.

Back section being slated.

Darker inside now the slates are going on.

Adding more slates to the back.

I ordered some plastic online to be cut to the dimensions of the slates. I needed to add a bevel to the edges so that water would run off each plastic slate just like it does for a real slate. I quickly set up this set of blocks so I could put multiple sheets down at once and bevel all their edges in one pass with my router. I needed to use the edge of my workbench as a guide as the plastic wasn’t thick enough to receive the router bit’s bearing.

Installing the plastic “slates” was straightforward. I’d drilled holes to match those in the real slates, so they were just like the others. I did three rows of plastic which with hindsight wasn’t the best idea. It would have let in more light if I had done a narrower but taller section. However, I had already slates the rows up to that point and didn’t fancy undoing my work!

Plastic slates installed.

The plastic slates look pretty good from ground level. I’ve also added the ridge tiles here to complete the roof.

Whilst I was at it, I replaced the doors of the two lower sheds to match the top one I did a couple of years ago (nearest to me).

The new doorway no longer has an impromptu cat flap in it!

I added a roof to the firewood shed with some of the less consistent slates. The wood for this little roof is the door frames from the shed doors I replaced.

I  happened to have a roughly 1 metre long piece of lead flashing which I fashioned over the firewood shed roof ridge.

Live edge TV stand

Finished product first. Pretty pleased with how it’s turned out. I finished it with three coats of Danish Oil and one coat of beeswax for the shine.I made a quick SketchUp model to get an idea of the proportions and style. I wanted mitred joints with angled edges.Bought some ~3m long sweet chestnut boards from a local boat builder. The tree was felled nearby (about 20 miles away). He ran the boards through his planer/thicknesser for me for free, which was a pretty huge bonus for me as I only have a 15cm planer/thicknesser in my workshop.Here you can see my tiny workshop. It’s a 1.8 x 2.4 m stone walled outbuilding which until a couple of years ago was in a pretty bad state of affairs. I made a separate album for the bench build and the roof repair.Dry fit of the mitres. It turns out that leaving the boards in my slightly damp shed made them cup a bit. As such, the cuts I made with my circular saw followed that cup, meaning the mitres didn’t line up properly. I had to do some planing to get them to sit flush.I added some dowels in the mitres to make aligning the joints easier. This was partially successful in the actual glue up.Testing the dowels for alignment. This was after I’d manually adjusted the mitre joints to be more flush.I decided to add a bowtie to strengthen this leg as it had a split in it. The bowtie is a piece of oak firewood which happened to have a nice grain pattern by virtue of being next to a group of small knots.Bowtie in place and looking pretty. It only required a little sawdust and glue to make it seamless. Fortunately, I had quite a lot from sanding!Preparing the shelf for the cut. I had planned on adding another bowtie in here, but decided against it in the end.Since the board had cupped in storage and that had caused me some issues with the mitred joints, I decided to cut the shelf along its length so I could run each piece through my planer/thicknesser. Each of the boards was just narrow enough to fit though. I went with dowels as before to help with the alignment during glue up.What is it people say? You never have enough clamps. I can vouch for that!I added dados to the legs for the shelf. I didn’t want to have to make an oddly shaped dado to accommodate the live edge, so I opted for square dados. This meant I had to cut a little notch out of the ends of the shelf, which was easy enough, though a little nerve wracking.Dry fit to check the shelf fitted well. Everything was reasonably square and tight.Actual glue up. This was not a fun experience. The end result is poorer than I had hoped for as the mitres didn’t sit as flush as I’d have like them to.Post-glue up. I had to sand the top and sides a little to get the mitres to look good.First coast of Danish Oil thinned by about 5% (I just eyeballed it). The oil really makes the live edge come, well, alive.Back where we started, in the garden. The wax was freshly applied and buffed with a cotton cloth.

Tiny workshop workbench

More or less the final setup, minus the leg clamp on the nearest leg.

The bench is just 2×4’s for the legs with two 2×6’s for the front and back. The top is a bamboo work surface scrap donated to me by my neighbour which was leftover from their kitchen renovation.

I have a very small workshop (2.4m x 1.8m). I recently redid the slate roof as the previous one collapsed. As you can see, it’s pretty cramped. After struggling with my workmate for a couple of years, I decided it was time to make a proper bench. I loosely followed Matthias Wandel’s workbench build.

I made one of the sets of legs too deep and rather than make my life easy, I thought I’d fix the mistake by practising my lap joints. I hadn’t got particularly sharp chisels at this point, so it was a bit painful.

Gluing up the lap joints on the wrong leg. I realised my mistake by the time I made the second leg, so it didn’t need any fixes. Each leg is dowelled and glued from the ends. The legs are pretty sturdy!

Cutting the dados with my circular saw. Glad I did this with the electric saw as there’s a nasty knot right on the edge of the dado.

Here I am testing the rail to see how much space my new workbench would take up.

Here’s the finished base. The rails are screwed onto each leg so that I can dismantle the bench if I need to.

The laminated bamboo piece of work surface I was given was an odd shape: 900mm deep and ~1.4m wide. I had another scrap which was ~600mm deep and 1.2m long, so I cut the big piece to the depth of the bench (650mm) and cut the long piece to fit the remaining hole. This means that the end piece runs perpendicular to the main part, but it’s not posed any problems so far.

Here’s the main part of the worktop cut and laid on the base. I still needed to cut the end section at this point.

The bamboo top had been in a damp shed for a few years, so it needed a bit of sanding to bring the surface back to life. Besides that, it was in surprisingly good condition! And you can’t beat the price.

The top is attached to the base with blocks of wood screwed to the rails and then a screw running through the block into the base of the top. The vice at the end needed some restoration, so I took that back to bare metal and repainted it red later on.

My dad gave me a leg vice screw which he’d used when he was younger. It is one of two, the other is my granddad’s and is still used, but this didn’t come with any instructions! I made simple vice from a piece of leftover rail. I bevelled the edge with my router (this being the first time I’d ever used one). The finish is OK except where I made the edges a little rough around the curve.

When cutting the hole for the bottom bar, the wood split from the hole to the bottom. I drilled a 15mm hole and ran a dowel through it to hold the piece together. So far, it seems to have held up OK.

Dry fit of the vice. I held the vice in with some clamps to properly line up the holes I needed to make in the leg.

I had to make a block to hold the back of the screw onto the back of the leg. I also bevelled the top of the vice but in doing so chipped the top (see next photo).

Here’s the top of the leg vice with the bevel and the chip. The bar in the screw is also too long for me to be able to rotate it without hitting the wall. I just stuck a little wedge in to hold it halfway up.

Here’s the restored bench vice attached at the opposite end from the leg vice.

Made a little toy with my first ever dovetails!

Reroofing the workshop

Ripping out the old roof since it had collapsed.All clean! But not very watertight!

Had some leftover beams from some building work so recycled them for the new roof.

Second beam in.

Starting with the rafters and patching up the walls since they were a little damaged when the roof collapsed.

Ridge board in.

More rafters.

Front rafters finished.

Rear section rafters in too.

Quick look inside showing the support for the ridge board.

Our neighbour had some leftover roofing felt which we used as an additional waterproof layer.

Batons attached and starting to place the slates.

View inside with roofing felt attached.

The row of outbuildings with the partially finished roof.

More slates on the front portion of the roof.

Getting there!

The clips are pretty much all in line, which is satisfying!

Front finished! The back is still only felted at this point, but the building was at least watertight.

I finished the back over the following few weekends. It’s been done for a year or two now and seems to be holding well. Certainly better than the neighbouring roofs!

Utilite Pro as a server

I got a  Utilite Pro to replace my aging Fit-PC2. It’s significantly more powerful than the Fit-PC2 and contains an ARM processor. The standard package contains a slightly customised version of Ubuntu (mainly the kernel includes a few extra drivers for the onboard hardware). It turns out, however, that a number of useful features in the kernel have been disabled. These include lots of useful filesystems, including btrfs and xfs. It also has the kernel cryptographic routines disabled, which means you’re out of luck if you want to use some encryption software to protect your data. In the end, recompiling the kernel was pretty straightforward and Utilite provide pretty comprehensive instructions on how to do so.

In case it’s useful (and as a reminder to myself), here’s the link to the instructions, but here’s my little script to automate the process:

#!/usr/bin/env bash

set -eu

# Build a new kernel for the Utilite Pro. See:
# http://www.utilite-computer.com/wiki/index.php/Utilite_Linux_Kernel

OLD="yes" # run 'make oldconfig' instead of 'make menuconfig'?

CWD=$(pwd)
TODAY=$(date +%Y-%m-%d)
ROOTFS=$CWD/../rootfs-$TODAY
TARBALL=$CWD/../linux-image-utilite-$TODAY.tar.gz
IMAGE=uImage-cm-fx6

mkdir -p $ROOTFS/boot

export ARCH=arm

make utilite_defconfig

# Are we using the existing .config?
if [ $OLD == "yes" ]; then
make oldconfig
else
make menuconfig # this is interactive but you need to save a .config manually
fi
make -j4 # parallelise the build
make uImage
INSTALL_MOD_PATH=$ROOTFS make modules_install

cp -v $CWD/arch/arm/boot/uImage $ROOTFS/boot/$IMAGE
tar -C $ROOTFS -czvf $TARBALL .

# Display the commands to actually install the new kernel.
boot_partition=$(awk '{for (i=1; i<=NF; i++) {if($i~/root=/) {print substr($i,6,length($i)-6)"1"}}}' /proc/cmdline) echo '# mount the /boot partition:' echo "mount $boot_partition /boot" if [ ! -f /boot/$IMAGE-$TODAY ]; then echo '# back up the existing image:' echo mv /boot/$IMAGE /boot/$IMAGE-$TODAY else echo "WARNING: EXISTING KERNEL IMAGE BACKUP IN /boot: $IMAGE-$TODAY" fi echo '# extract the new kernel to the installation:' echo tar -C / -xvf $TARBALL

To use the script, place it in the cloned git repository and execute (probably best as root). It creates a tarball and prints the instructions for installing the new kernel after the compilation has completed. It refuses to overwrite an existing tarball (if you've run this script multiple times in the same day, you'll need to remove the old tarball before running the script again.

I've attached an example of the kernel .config to this post which enables a lot more filesystems (including btrfs and xfs) as well as including the kernel cryptographic functions.

Vehicle Excise Duty and Cyclists

I admit, this is a bit off topic given the theme of my other posts, but I got to thinking about this and had to scratch the itch.

Cars and lorries in the UK have to pay a duty called the Vehicle Excise Duty (often erroneously called Road Tax). The cost of the duty is a function of the amount of carbon your vehicle emits up to a maximum of 225g/km. The graph below shows the cost for the thirteen bands:

The Vehicle Excise Duty as a function of the carbon emissions for petrol and diesel vehicles.

It’s interesting to note that there’s not a linear relationship between the carbon emissions and the cost, which is odd. Who decided these bands and the associated cost, and how did they choose them?

I cycle to work daily, and wondered where on that chart a cyclist might fall. Some brief searching gave me this Guardian article with some analysis of the carbon output from cycling. The article states the very existence of a bike means it’s encumbered with a 50g/mile carbon footprint (which in sensible units is 31.07g/km). Since all motion requires a force (and thus energy — see Newton’s Laws of Motion), then making a bike move increases the carbon footprint. The Guardian article uses five different energy sources for the person powering the bike (bananas, cereal with milk, bacon, cheeseburgers and air-freighted asparagus) giving a range of energy consumption rates of 65g/mile, 90g/mile, 200g/mile, 260g/mile and 2800g/mile, which is sensible units is 40.4g/km, 55.9g/km, 124.3g/km, 161.6g/km and 1739.9g/km.

This gives us a range of values for the cyclist which we can compare with the car emissions, however, the range of values used in the calculation of the Vehicle Excise Duty only goes as low as 100g/km, for the banana powered cyclist, we need a lower value. Since the Vehicle Excise Duty appears to be roughly linearly correlated with the carbon emission, let’s extrapolate backwards. The graph below shows the same values as in the first graph, but with a linear regression backwards to zero carbon emission.

vehicle_excise_duty_analysis_linear
Carbon emissions versus Vehicle Excise Duty cost for petrol and diesel vehicles in the UK (solid line). The dashed line shows a linear regression through the Vehicle Excise Duty data points.

Using the linear regression, we can now calculate the Vehicle Excise Duty for any carbon emission rate. So, for the five cycling carbon emission rates calculated by the Guardian, we get Vehicle Excise Duty rates for cyclists of:

  • Banana (40.4g/km)
    • -£229.45
  • Cereal with milk (55.9g/km)
    • -£177.31
  • Bacon (124.3g/km)
    • £52.77
  • Cheeseburger (161.6g/km)
    • £178.24
  • Air-freighted asparagus (1739.9g/km)
    • £5487.33

If the Vehicle Excise Duty tax weren’t set with a minimum (for all vehicles whose emissions are below 100g/km), then using this approach, a banana-fuelled cyclist should receive a £229.45 annual rebate. A more commonly cereal-with-milk-fuelled cyclist ought to receive a £177.31 rebate whilst those cyclists feasting on less healthy fare (bacon and cheeseburgers) would have to pay £52.77 and £178.24 respectively. Anyone who manages to sustain themselves on asparagus alone deserves everything they get, including a £5487.33 Vehicle Excise Duty bill.

Automatic upload speed throttling

As I’ve discussed before, the broadband service we receive from Virgin is subject to caps on the traffic on the line during certain times of day (see this post I wrote). Virgin have a relatively complex system for throttling your speed based on the amount you download and upload within certain times. I have a script which performs a backup of my data from my server at home to my work computer using rsync over SSH. This means that I sometimes have a large amount of data to upload during the day. Since Virgin’s upload restrictions apply between 1500 and 2000 during which time you are permitted to upload a maximum of 1.5GB. What this means is that for five hours, the average transfer rate must not exceed 300MB per hour, which equates to a transfer speed of 83.3 kB/s. I searched for a way to limit my server’s upload speed and came across tc (which is a kernel extension which must be enabled in your .config). Slackware’s kernel config includes the necessary parts as modules, so when you use the tc command, they are automatically loaded.

I found a good example which described what I wanted to achieve (limit my uploads to 83.3 kB/s) here. Using the examples on that page, I wrote a little script to allow me to start and stop the limited uploads easily:

#!/bin/bash

# Script to throttle uploads during the times when Virgin
# won’t allow unlimited uploads.
#
# Those times are between 1500 and 2000 no more than
# 1.5GB must be uploaded, so the upload speed needs to be
# capped at 83.3kB/s.

maxRate=83.3kbps
burstRate=100000kbps
interface=eth0

clearRule(){
        # First things first, clear the old rule
        tc qdisc del dev eth0 root
}

makeRule(){
        # Now add the throttling rule
        tc qdisc add dev $interface root handle 1:0 htb default 10
        tc class add dev $interface parent 1:0 classid 1:10 htb rate $maxRate ceil $burstRate prio 0
}

listRules(){
        tc -s qdisc ls dev $interface
}

case “$1” in
        ‘start’)
                clearRule
                makeRule
        ;;
        ‘stop’)
                clearRule
        ;;
        ‘status’)
                listRules
        ;;
        *)
                echo “Usage: $0 {start|stop|status}”
        ;;
esac

You’ll note I’ve set a $burstRate value of 100MB/s. This is probably not necessary, but with the same $burstRate value as used in $maxRate, I was seeing significant slowdown in the responsiveness of the remote session; I hope this high burst rate will alleviate that slowdown.

I saved this script somewhere where root only could get it and then added the following cronjobs to root’s crontab:

# Add networking throttling between 1500 and 2000
00 15 * * * /root/throttle_uploads.sh start
00 20 * * * /root/throttle_uploads.sh stop

So far, the process appears to be working, insofar as my daily uploads from home to work have slowed to approximately 80kB/s during the times when Virgin monitor uploads.

Hosting your own calendar server

I recently came across an interesting story by Cory Doctorow entitled ‘Scroogled‘ in which Google becomes a malevolent force with its comprehensive archive for each user. With that in mind, I began to consider the information I put into Google’s server (the irony of writing this post on Google-owned blogger.com is not lost on me). I use a lot of their services, and thought about which one I could most easily replace. Google’s calendar offering seemed a good place to start since I didn’t really interact with it through Gmail, but accessed it through my phone and through Thunderbird on my other computers.

Some brief searches found a list of potential calendar servers, but the one which stood out to me was radicale. This CalDAV server is a nice simple Python server, with no dependencies besides Python itself. The default configuration is pretty well set up, with a few changes needed before you can start accessing your server.

The default port from which the CalDAV calendars are served is 5232, so I opened up that port on my router so that I could access the calendars from anywhere. I had to install a CalDAV app called CalDAV-sync-beta on my phone to be able to view my calendars on the native calendar widgets. The Lightning plugin for Thunderbird can load the radicale calendars by default. Adding them is a simple walk through the wizard, selecting the option to add a new calendar “On the network:”, then choosing CalDAV as the type of calendar. The syntax for the calendar location is

http://your-home-server.com:5232/username/calendarname

replacing your-home-server.com with either your server’s IP address or its URI. Likewise, username should be the user who’s launched the radicale daemon (I suggest this is not root). The calendarname value can be anything you like, but it’s probably best to make it something memorable, or at least descriptive.  For the CalDAV-sync-beta app on Android, the process is similar (Settings > Accounts & sync > Add account and select CalDAV. I found it easier to select “Manual mode” for configuring the calendar. The syntax for the calendar address is similar to the Lightning example above:

http://your-home-server.com:5232/username/

except you’ll notice I’ve omitted the calendarname value at the end. This is because CalDAV-sync-beta will search for all the calendars you have at that location and offer you the option of syncing them all or just certain ones. You can specify the full path as in the Lightning example if you know you will only want to connect to a single calendar on this server. The username value needs to contain a value, but you can omit the password (we have not set up a password protected calendar).

I have yet to manage to get radicale to accept a username and password, so the calendars are open to the public, which is probably something of which you should be aware.

Overall, it’s been working well, and disentangling myself from at least one Google service is a start.

Dynamic DNS services and ddclient

Since changing from O2 to Virgin broadband, I’ve had to hope my dynamic external IP address didn’t change too often. As it turns out, Virgin appear to have a very slow turnover of IPs for home customers, since I’ve had the same one since we changed. I wrote a little script to scrape my IP from http://checkip.dyndns.org every 10 minutes and save the output do Dropbox, but this seemed less than optimal.

I recently read about a nifty little client called ddclient. If your router doesn’t support updating a dynamic DNS service (such as www.dyndns.org) for you, then having a tool like ddclient do it for you is pretty handy.

It’s a little perl utility, which on Slackware requires some external dependencies (perl-IO-Socket-SSL, Net-SSLeay, libwww-perl, perl-html-parser and perl-html-tagset) available from SlackBuilds.org. Set up is pretty straightforward, and the default configuration file (/etc/ddclient/ddclient.conf) is pretty comprehensive. I found, however, it was a bit overwhelming, and the documentation on the website was more useful. In the end, my configuration looked like this:

# Stripped down version of the config file.
# Easier to manage, I think.

daemon=600                      # update every 10 minutes
syslog=yes                      # write to syslog
mail=root                       # all messages go to root
mail-failure=root               # failures sent to root too
pid=/var/run/ddclient.pid       # runtime pid file
# host setup
ssl=yes                         # use ssl when updating hostname
protocol=dyndns2                # using dyndns.org
use=web, web=checkip.dyndns.org/, web-skip=’IP Address’
#use=web                        # get ip from internet
login=myusername                # username
password=mypassword             # duh…
my.hostname.com                 # my hostname

I set the daemon to run every ten minutes and it uses www.dyndns.org to update the IP associated with my.hostname.com. I altered the line use=web to use=web, web=checkip.dyndns.org/, web-skip=’IP Address’ because I was getting errors with ddclient finding the checkip.dyndns.org address. In theory, this forces ddclient to parse the output from checkip.dyndns.org correctly.

In the end, ddclient does a very similar thing to my suboptimal approach, though it updates my dyndns account for me rather than me having to do so from the Dropbox text file to which my script saved my IP address.