[Bike] – Road trip to Beaumont, by bike

Final exams are done. Like final final exams. Didn’t want to think too much about it, so road trip! Taking my mind off of it and physically distancing myself away from my worries.

While the idea sounds very random, road trips don’t just happen spontaneously on demand. Some planning needs to be done if you want to go there and come back in one piece without giving yourself a heart attack. Guilty >>> (link: Sherwood Park) (link: St.Albert)

Oh well 😛

Good news! This one was planned awhile back and was ready for execution 😛

Bad news, this will be a short post because everything went nicely so there’s not much to write about.

Oh well 😛

The plan:

The execution:

Not bad eh? Just as planned. Getting good at this 😉

Performance data. I am surprised by how consistent the data is despite the incline. I am riding on the road so the dips are caused by red lights. Anyways, photo time!

Haha I really like these “Welcome to” signs. Even though this one looks kind of crappy and welcomes me into a huge chunk of farmland.

So farms really do look like that! I’ve never seen a farm in real life. Why are they red?

Did I mention that I really love “Welcome to” signs? I think I’ll start taking these shots with the method of transportation that I used to get there. In this case, my GT Avalanche 2014.

Fancy looking stuff

Can’t see an end to this road. Good view!

While I was in awe of the view, I decided to fuel up a little. According to my completely scientific calculations (read: gut feeling), my human fuel requirements are as follows:

One mouthful of water every 15km

One energy bar every 30km

Beaumont is 30km away from Edmonton, so that means it time to snack!

The return trip

LOL this wouldn’t be a Jacky’s trip without some curve balls.

Headwind – straight on. I was traveling north and the wind blowing south. * (remember the * means insert your favorite swear word) (link: trail biking) Jacked up my energy consumption enormously and I was feeling empty 10km in on the return trip. It doesn’t feel good, but according to experience, I know I’ve still got some mileage in me before my body gives me the “final warning”. Given the head wind situation, I dropped my gear ratio from 44:15 to 32:18. This allowed me to increase my RPM back to the efficient level of around 100rpm. Sure I was still going a little slower, but I wasn’t burning myself out.

Got home in one piece, but what followed was me making dinner the fastest I’ve ever made it.

Lesson: over pack food a little bit

Other than that, route wise, it worked out very well. The planned route was also very bike friendly too!

Exploring a Brita water filter

“For optimum performance, it is important to change your Brita filter on a regular basis. Replace filters every 151 liters or two months for the average family”

Seeing how they profit from making such a statement, I took it with a grain of salt. Besides, even if they are good intentioned, they are probably giving a safe estimate so they don’t get sued.

Therefore, I resorted to some real world advice from a friend. She said her family has been on the same filter for years. If her family can go off the same filter for years, then mine will probably last forever given that the filter only serves me. Fantastic!

Well, it mysteriously clogged up today. It didn’t slowly clog as one would imagine. It just went nope Jacky, no water for you today. Hmmm…

No idea how these things work, so without further thought, I went out and got a new one.

New one works great, but what do we do with the old one? Since I don’t know anything about these filters, curios Jacky decided to open it up.

This isn’t your causal pop the cap off deal, the top is held on by some strong adhesive. Clearly Brita doesn’t want anyone to do any maintenance here. What kind of “clean” secret is Brita hiding in there?

Since I have already sent this filter on a one way trip down by jamming a scissor into it, might as well take it a step further. For science!

Cap’s off! Well, I was expecting some fancy tech in there. Like layers of different material and stuff. This looks like the soil that was in my plant 😛 (link)

Same stuff all the way down to the bottom

Close up of the material

Hmmm doesn’t look like anything is “clogged” so not too sure why it wasn’t working. My guess would be the pathways in the activated carbon is clogged? But that’s microscopic and not something that me or my camera could see. Regardless, I got to see what is inside a Brita filter 😛

[Bike] – Trail biking

Summer is here and it is time to go trail biking! Just kidding, I didn’t know where I was going 😛

Look at this mess, what caused it?

I was heading home, but then I saw this trail path that I’ve always ignored. Curious Jacky decided to go down this path and find out where it leads.

Had my camera with me that day (this one: link) so I also started a video recording. Most of the pictures here will be frame captures from that video.

Small inclines, not too bad.

What goes up, must come down.


My thoughts – Nah, look this beautiful day. Full speed ahead!

How is this ice still here? Oh well 😛


My thoughts – I am still in Edmonton, how steep can it get? Let’s go!

This steep. Holy smokes* where did the road go? Oh well 😛

* When you see a * in this post, I was most likely (definitely) swearing. I try my best to keep the blog PG13 so I kept the words out.

Holy fudge* got to the bottom, now up!

Where did the road go…*

Well, seeing too much of the road isn’t good either…*


What now? This place has horses?

Didn’t see any horses, but saw some trail walkers and their dogs playing around 🙂

Climbing back up after all those ups and downs.


My thoughts: After all that? Okay I believe you.

Look at those curves, that sign is not kidding

This road felt like a dream after all that, what’s behind the nets on the left?

Horses! The signs really don’t joke around here

The view is so nice!

Hmmm a large open area…

Wow, am I still in Edmonton? This looks more like Elk Island National Park…

Eventually I found my way home. Have a mess to clean up, but lots of fun making the mess 😛

Do GoPro stuff without a GoPro

This is a generic flashlight mount. However, I’ve decided to get one of those high lumen specialized bicycle flashlights. Therefore, by the time this mount arrived, I had no use for it.

So with a bit of creative thinking, I decided that it can be a “nature valley” holder.

Then one day… I thought “hey, it looks like I can strap the Pentax Q on there”

… and this is the result! With some ropes, I was able to get this fairly secured on to the handle.

IKEA trip

“Edmonton transit, not giving me any incentive to be lazy”

Needed to go to IKEA to grab some food. Yup food, not furniture. Believe it or not, IKEA food is great!

Given that it is faster to get there by bike than bus, I decided to bike there.

It is final exams time, and I am going to be staying home for a good majority of the time. So I decided to stock up on 10KG of IKEA meatballs. Combined with the two U-Locks that I use to lock my bike, this bag is around 15KG worth of stuff. I suddenly wished that I just took the bus.

Here’s what 10KG of IKEA meat/veggie balls look like in the freezer. Salt and pepper for reference.

Washing machine does the “Harlem Shake”

Title and picture says it all

I came home discovering this and I immediately called the laundry operators, here’s how it went:

Operator: Hi, my name is <name here>, can I have your address please?

Me: <Gives address>

Operator: So what is the issue here?

Me: Ummm, your washing machine disintegrated

Operator: I’m sorry? (Disbelief voice)

Me: Ummm, the washing machine is not in one piece


Me: As in your washing machine is completely not working

Operator: oh ok

Raspberry Pi x Lego – Home server

Why Lego?

In grade 1, my homeroom teacher happened to be the school’s primary computer teacher. The entire computer lab was Mac based, PowerPC’s everywhere. Then there was this special computer, a computer that had a Lego case (and ran Windows). He would passionately tell us how he built it and showed us how everything worked inside. Yeah, nobody had a single clue what he was talking about because you know, we were in grade 1. But hey it’s a computer with a Lego case, how cool! Ever since then I wanted one myself. As far as I remember, this marked the day I became a computer nerd 😛

Why a home server?

It is now common for one user to have multiple devices and we expect our data to be present on all of them. A common solution is to just make a copy for each device. For example, music. Want music on your tablet? Make a copy. Want music on your phone? Make a copy. Every single time I make a change to my song library, I have to manually copy it over to each device. Wouldn’t it be nice to have all your media just stored in one place and point all your devices to just “get it” from that location? This is where the home server comes in.

The computer

Raspberry Pi Model B

This is our “computer”. The famous “computer for 35 bucks”, the first generation Raspberry Pi. I bought it three years ago for experimenting around the GPIO pins in hopes of automating my room one day. That never happened as I lived in dorms so renovating my room is out of the question. I moved out since and rented a place. However, it clearly says in my contract no modifications of any kind shall be made to the room. Oh well 😛

Performance wise we are looking at something equivalent to an average computer in 1998-ish.

Haven’t touched this thing for three years, hopefully the humidity in Hong Kong hasn’t killed it.

It’s alive!

Testing if it is still working, excuse the poor presentation. Flashed the latest Raspbian OS “Jessie” on to the SD card and plugged it into a router. All the lights indicate its ok!

Setting it up server side

SSH enabled right out of the box!

Yeah, I am a Windows user… so we don’t have native SSH. PuTTY to the rescue!

Let’s configure our Raspberry Pi for server use with “sudo raspi-config”

We will be running the server “headless” (without a screen) so we can reduce the memory allocated to the GPU (Graphics Processing Unit) to the minimum.

The Raspberry Pi has 256MB of RAM, this will give us 16MB for the GPU and 240MB for the system itself.

We will be using the USB drive as our storage, let’s have it automatically mount on boot.

Install and configure UFW (Uncomplicated FireWall) for Samba file sharing.

Allow TCP 135,139,445 and UDP 138,139 from all the devices that you plan to share with.

Install, add Samba users and configure our Samba shares to point to our USB drive

Reboot the server! PuTTY calmly reminds us that the server has disconnected us

Accessing the shares in Windows is as easy as Pi

Click “Map network drive”

Enter you server details: \\<server_hostname>\<your _samba_folder>
Select a drive letter
Check reconnect at sign-in

All done! It’s just like an external drive!

Now that the functionality is there, let’s work on the case

Procuring the Legos

We will need a plan of course. Our official unit of measurement here is “Lego bumps”

Lego, you are truly evil, charging people by the bucket, a round bucket.

Talk about fitting a square peg in a round hole

The build

Remember to pad the bottom of the Raspberry Pi with some foam. Rubbing the bottom of a bare printed circuit board with Lego bumps isn’t exactly great.

Other than that, just build around the ports and build up from there!


Heat dissipation is inspired by Microsoft Surface Pro’s “Perimeter Venting”

I’ve decided to go with a similar design for the roof. This keeps most of the dust on the roof while allowing hot air to flow out from the top

Completed form. IKEA cup and Galaxy S4 for size reference.

Installing it with the rest of my network equipment


Completely scientific performance benchmark: You can stream six Girl’s Generation music videos in full high definition 1080P at the same time.

Alright, in all seriousness, here are the numbers:

Sequential reading from server: 33Mbps or ~4 megabytes per second

Sequential writing to the server: 25Mbps or ~3 megabytes per second

I’ve decided to only measure sequential performance because this is a media server, so most of the time, this is responsible for serving up big chunky files.

Performance analysis

The Surface Ethernet Adapter is rated at 100Mbps
The Raspberry Pi Ethernet Adapter is rated at 100Mbps
The Netgear router connecting the two is rated at 100Mbps

So why are we getting 33Mbps read, 25Mbps write? Clearly there is a bottleneck somewhere… let’s look at how the Raspberry Pi is doing

Woah 100% CPU usage, well at least we know our poor Raspberry Pi is trying its best. Clearly we are bounded by the processor, not surprising considering it has the processing power roughly equivalent to a computer in 1998. Let’s look at the breakdown.

Samba (our file share) is only using around 15% not too bad.

The NTFS-3G driver is the culprit here, using 65% of our puny processor. Accessing drives that are formatted as NTFS has always been a bit meh and inefficient on anything other than Windows. Technically I should already be glad that in Linux I can at least read and write to it. I am talking about you Mac OSX (older versions can only read from NTFS).

Seeing how NTFS is the problem, I decided to reformat the drives into something a little more Linux friendly, like ext4.

Result? 8MB/sec read and write or ~64Mbps. We are still processor bound as Samba is now able to “share faster” so its processor usage went up as processor usage for accessing the USB drive filesystem drops.

I could consider overclocking; however, this is a server and it will be running 24/7 so I want to maximize stability and reliability. Therefore overclocking is disregarded.


Didn’t you just say you will disregard that as an option? Yeah, but in the name of science and curiosity let’s briefly this option a little bit 😛

Before someone yells at me for using presets. Yes, I’ve also tried manually tweaking the parameters individually by editing the /boot/config.txt. After all my overclocking experience comes from the PC world 😉 This screenshot is strictly here for your visual pleasure.

900Mhz is as high as I can go without significant issues…

… and by without significant issues I mean:

It boots

The processor is running at 75C (it is rated for 85C so 7x is a “little” uncomfortably high)

The USB/Ethernet chip is now not finger friendly (it is rated for 70C and not finger friendly means 50C+)

Yeah, let’s just put it back into normal mode at 700Mhz

For what it’s worth, this 30% overclock gives us a 20% performance boost all across the board. So if your application requires such performance, I recommend getting some RAM heatsinks for the processor and controller.


For anyone interested in doing the same thing, there’s good news. This is the first generation Raspberry Pi, bought three years ago. The Raspberry Pi has moved on since then and the current one is the Raspberry Pi 3. It is still priced the same, so it’s still “a computer for 35 bucks”. For the processor, mine has a single-core clocked at 700Mhz, the current one is a quad-core clocked at 1.2Ghz. Needless to say, massive performance gains to be had for the same price!

Humming along at 700Mhz, so far it has reliably operated for a month and still ticking (I’ve only shut it down once as I was building a Lego case for it)

Calculating cadence (RPM) with a speedometer

I don’t care about what anything was designed to do, I care about what it can do” – From the movie Apollo 13 (1995)

Last year I bought this speedometer for my bike, quite reliable given that you don’t quick release it all the time (the mount broke eventually). Which is why now I have a Cateye Velo 9, a much sturdier piece of equipment. However, it doesn’t calculate cadence (RPM), which is quite a useful metric. Getting a quality speedometer that does both speed and RPM is expensive so I decided, why not buy another one of these cheap speedometers and turn it into a RPM meter.

The conversion


We no longer mount the sensor to the wheels as we are not measuring speed

Instead we mount the sensor to the pedal so that we can get the RPM of the pedal


These speedometers calculate speed in km/h by: RPM x 60 x Circumference of wheel in mm / 1,000,000

In this equation we are interested in extracting the RPM value and the only variable we can manipulate here is the circumference of wheel.

Therefore, we must manipulate the value for the circumference of wheel to negate the effects of the hard-coded multiplications programmed into speedometer.

Displayed value = RPM x 60 x COW / 1,000,000 where COW = circumference of wheel in mm
Displayed value = RPM x COW x 60 /1,000,000 we re-ordered it a bit
Displayed value = RPM x COW x 0.00006
We want COW x 0.00006 to equal 1 so that we get Displayed value = RPM x 1 which means Displayed value = RPM!
So, for COW x 0.00006 = 1, COW must equal 16,666.667

If we set COW as 16,667 then we will get RPM!

The problem

The maximum wheel circumference I can set is 9,999, way less than the required 16,667

The solution

Divide our COW value by 10 so that it displays RPM /10! Here’s it mathematically

Displayed value = RPM x 60 x COW / 1,000,000 where COW = 16,667/10 = 1,667
Displayed value = RPM x 60 x 1,667 / 1,000,000
Displayed value = RPM x 1/10

The result

When we input 1,667 as the wheel size, if it shows 81 which is how it shows 8.1, we need to remember that number is RPM / 10. So when it displays 8.1, we just x10 to get our RPM value!