Blog


Stripping the Bike Back

The Kittens - Helping

The Kittens – Helping

I started stripping back the bike to remove the now-defunct internal combustion components. The engine, gearbox, air filter, oil tank and battery all had to go, along with their associated hoses and connections, including the clutch cable.

Two stroke Power!

Two stroke Power!

So began the various stages…

Decoupling the Engine

Decoupling the Engine

…casing, wires, etc…

Disconnecting Bowden Tubes/Rods

Disconnecting Bowden Tubes/Rods

…clutch cable…

Clutch Disconnected

… and onwards to the bigger components, next time.




Phones with Radio Issues

I’m afraid this is going to be somewhat of a rant.

Can someone explain to me why so many phones seem to suffer from radio communication issues of one sort or another? I’m not talking about a lack of signal, or poor cell coverage or interference; just plain ordinary bad software on the device to control the radio, or poorly designed or built hardware.

Lookit Ma! WiFi signals!

Lookit Ma! WiFi signals!

Previously, I have written about the trouble I had with my HTC One X – a phone, which while incredibly good in every other respect was completely destroyed by it’s last update which caused a complete failure of the radio module(s) to work in any predictable or useful way.

In the One X, HTC had decided for some crazy reason that having a pair of snap-connectors to connect one antenna to the motherboard was a good idea. This caused huge problems for people who simply by using their phone would press slightly too hard and disconnect the antenna.

I’m sorry – did someone at HTC forget that people hold phones? Not everyone has uniform grip strength, and putting something under tension inside a device that can flex is probably going to result in it becoming damaged or disconnected some how over time?

Thankfully, as I explain in my previous post, my connectivity issues turned out not to be this particular issue, but an entirely different, but no less insane problem.

HTC (again, in their infinite wisdom, I guess…) decided to attach another part of the antenna together by surface-spring connections… without using a spring.

I ended up connecting both contacts to fix the problem, after some experimentation.

I ended up connecting both contacts to fix the problem, after some experimentation.

Instead of making the connection with any kind of force, the connections lightly touched the contacts with small bent pieces of copper, which – as copper is want to do – deformed flat over time. Even the slightest of pressure would do this given enough time, resulting, once again, in a useless radio.

After a while, it turned out that in addition to these issues with the hardware, the software was also conspiring to mess up my day.

After the last software update the hardware issues become much more pronounced. I could sit the phone on top of our WiFi access point, at a range where even without the antenna, some connectivity should have been possible, and it would still disconnect randomly.

Thankfully, the software issue was limited to the WiFi components, and with my unlimited data plan, I could at least still keep connected and get on with what I wanted to do, albeit at a slower pace.

Our hero, the Nexus 5

Our hero, the Nexus 5

Eventually, I gave up and bought a Nexus 5, thinking that surely a Google main-line phone would have better support than the average. I was right, or so it would seem. The added visibility of a phone in the Google spotlight seemed to keep it fast, stable and most importantly – connected.

However, as an Android app developer, I thought it would be advisable to keep within the main-line range, and follow Google through the phones they place on the Nexus line, so that I would be kept up-to-date with the software and be able to keep my apps up-to-date.

Thus, filled with a confidence borne on the success of the Nexus 5, I decided, having left the Nexus 6 alone for it’s launch, to ‘invest’ in one. Apparently, this was a bad idea.

The phone is too big for my hands, but that’s an entirely different rant that I might cover at some point, but beyond that all initially seemed well. The phone performed to it’s spec, and having found a half-decent case, I began to get used to the size.

Then came the update. Since it’s install, the spectre of flaky wireless connectivity has been rearing it’s ugly, indecipherable head.

Now when I turn on the phone, it’s easily a 50/50 chance that WiFi will be ‘connected’ but inoperable, irrespective of which network I happen to be in range for (I work at a university, there’s WiFi everywhere). So, falling back on old habits, I flick the WiFi off, and watch with predictable irritation as the mobile data connection also ‘connects’, but remains inoperable.

Useful.

What I can’t understand about all this is how it manages to get through any kind of testing. The symptoms appear immediately, and while they can be difficult to reproduce on command they do happen often enough that it would be possible to see what was going on.

Also, these are phones… their only, real purpose is to phone people. How can these companies mess up the only key function these devices need to perform? I realise that the modern smartphone’s software landscape is a vast and complex thing – but if you perform changes, and the phone stops acting as a phone and you decide to push the updates anyway, there is a special place in whatever hall or theological equivalent you believe in for you.

Anyway. </rant>

 




The Electric Motorbike

So… I now own a motorbike.

My Honda H100S-J

Specifically, a “Honda H100-S2”, which I intend to convert to be purely electric for my commute to and from work.




To Build a SmartWatch… (Part 1)

Having seen the fuss around smart watche, I wondered exactly how difficult would it be to build one from scratch? All the technology usually packed in to one of the current generation of watches is widely available in breakout board form or equivalent, which brought me to another thought:

“How far can I get without building my own board?”

Thus, the Smart Watch project was born; an attempt to build a functional watch connected to a handset (in my case, a Nexus 5) and used to notify the user of incoming messages, etc. using only readily available hobby breakout boards and parts, so that as many people as possible could have a go at beating my designs!

If you, the reader, want to have a go, the rules are thus; The watch must:

  1. Only use readily available breakout boards to build it’s circuitry.
  2. Have the basic functionality of a smart watch, namely, to tell time, and show notifications from a host device.

Oh, and do let me know if you do have a go. I’d love to see the results!

The Parts

Because of the breakout board rule, I decided to base all my buying decisions around the single largest part required. As the display is likely to take up the lions’ share of the front surface of any watch, I attempted to cram all my other components behind that breakout.

The one I settled on in the end was the Adafruit 1.8″ TFT + SD Card Breakout with it’s whopping 128×160 resolution, 5v or 3.3v operation, and integrated Micro-SD card holder, it was a pretty easy choice to make – it gave me the added feature of storage, as well as providing a nice sized base to build the rest of the watch behind.

Conveniently, the stock image on Adafruit is a cat. I approve greatly.

The stock image on Adafruit’s display products is a slightly bemused looking cat. I approve greatly.

Conveniently, the processor board I had been looking to use for this project happened to be exactly the same height as the short dimension on the screen.

The Teensy 3.1 sports an ARM Cortex-M4 processor ( an MK20DX256VLH7 ), has hardware driven SPI, and has integrated USB support and handily runs a port of Arduino code, letting me use the Adafruit display libraries directly, rather than having to write my own ( although this came back to bite me later, but more on that another time ).

A Teensy 3.1! Nifty!

A Teensy 3.1! Nifty!

As this is to be a watch, it’s going to need to be battery powered, ( semi-obviously, I wasn’t keen on running about with a USB cable up my sleeve all the time ), and as small size was the main requirement when I decided on these parts, I tried to pick a battery with the largest capacity for approximately the right height available.

The 400mah LiPo battery from Sparkfun is about the right size, and should provide plenty of power for a working day ( a personal requirement of mine was that this should run for at least 8 hours )

It's a LiPo, what did you expect it would look like?

It’s a LiPo, what did you expect it would look like?

As the battery is a LiPo, it required it’s own charging circuitry, and luckily, the guy over at Pesky Products produces an ‘appallingly small’ ( their words, not mine! ) add-on board for the Teensy, which includes all the required circuitry, as well as breaking out a charge status pin and using the Teensy’s own USB connector for input power. It was perfect.

It's really tiny! Really handy too!

It’s really tiny! Really handy too! JST for scale?

Now that the device has power, a processor and something to display data on, a radio was needed to bridge to the host device. Adafruit once again provide the solution with their Bluetooth Low Energy, nrf8001 breakout which turned out to be the second largest single component to cram behind the screen ( the battery was the largest ) and proved to be quite a pain to mount sensibly.

Eventually I opted to put the board back-to-back with the display breakout, as thankfully, the radio breakout has no components on the back side, so could be simply stuck down with double sided foam ( more on the fun with sticky foam later… ). But even so, the sheer size of the breakout was – and still somewhat is – a problem.

The hilariously large - for my purposes - Adafruit nrf8001 breakout board.

The hilariously large – for my purposes – Adafruit nrf8001 breakout board.

More to come, when I can find the time to type everything up!




Calendar Arc Watch Face

Over the weekend, I hit two ‘firsts’ for me at the same time.

One; I published my first Android Wear app! and Two; I published my first paid app!

Watch face showing an 'Example Meeting' event

Oh yes, I was supposed to go to that…

 

 

I’ve owned a Moto360 for a while, and was slightly disappointed that there were no watch faces that adequately displayed what my calendar looked like for the day, so, having written a couple of minor apps for Android in the past, set to writing a new watch face which would show all events, from all my calendars (I have 11!) and present them in a visually pleasing way.

Customizable stock imagery is awesome!

Customizable stock imagery is awesome!

Events are drawn in arcs around the ‘tics’ along the outer edge of the watch. Semi-obviously, as a Moto360 owner, I designed this to look best on a round watch face, but it looks ‘acceptable’ on a square one too (if you own a square watch, get in touch and I’ll give out a free copy of the watch app – for the first person to contact me, anyway)

device-2015-02-22-154912

Fairly sparse at the moment, but it works!

 

At the moment, the number of options for the user to customise the look of the watch are limited, but I wanted to get the app out there so people could get and review it – there’s not much point in implementing features if people don’t want what you’re selling anyway!

For now, only the calendars to show can be changed (the arc colours are from the events in the calendar), and you can force a manual sync, but planned thus far are:

  • Tics on/off, for watches like the G Watch R which have physical tics
  • ‘Full Screen Mode’, for watches like the G Watch R which have physical tics
  • Shadows on/off
  • Inverted Mode – for OLED displays where bright pixels are both battery-expensive and can lead to burn-in.
  • Date settings – none/day/month/year/weekday/etc. formatting options.
  • Battery levels – for both watch and phone, if I can figure out a nice way of fitting it in this style.
  • Calendar event arc styles – thickness, end-caps, active/pending, etc.

If any of this lot takes your fancy, or if you just want to have a go with the app as it stands now, see the Calendar Arc Watch Face page on the Google Play store.




“On accident”

For some reason, since September 2004 people have suddenly started using `on accident’ rather than `by accident’ – what the hell happened in September 2004?

According to Wikipedia in September’14 the only two noteworthy accidents were:

“UFC Heavyweight Champion Frank Mir seriously injured in motorcycle accident”

and

“A train crash in Sweden kills two and injures 30. The accident happened when a passenger train collided with a lorry on a railway crossing in Kristianstad. (BBC)

Neither of which seem to be particularly language-defining… So, after a bit of digging, I found this paper which shows that seemingly unanimously, a whole age group divided on the matter, creating the `on accident’ generation, who, in turn show up in writing online in the latter months of 2004.

Very, very weird.

 




Trip to Gent – Belgium

I’ve been sent off to Gent by the university to a review meeting for one of the projects I’m associated with.
Luckily, before the meeting I have a spare day to grab some photographs and wander about the place.

Here are just a few, in no particular order. Unfortunately, I don’t know the names of the places I’m photographing, but if anyone wants to let me know I’ll update the descriptions!

Square

river

cathedral

Square 2

All taken with my quasi-good HTC One X’s camera (didn’t bring my S-5000).




Kitten’s Big Day (Part 1)

Last Saturday, having thought about it for a while, we finally decided to let the cats explore outside a little bit. We still don’t have a cat flap installed, though, so we’re keeping them inside except for when we can be outside with them, and thus keep the sliding door open.

At first, I think they were a little shocked to find that the massive TV they had been watching for the past few weeks was actually a door!

Peeking Outside

Peeking Outside

Naturally, Kashka took the lead, scouting out the flower bed/lawn immediately outside the sliding doors. She has such an intense face when she’s checking something out… 😐

Checking everything out!

Checking everything out!

Malcolm remained unconvinced.

Nope.

Nope.

He’s such a softie anyway – he pretty much always lets his sister go first. I’m not sure if that’s sensible, or that he’s just worried about everything!

But, after much encouragement from Liz, Kashka and I, both Malcolm and his sister began to peer outside, and started getting interested in what was going on. Especially when the wind rustled the grass!

Well, if Mum says it's ok...

Well, if Mum says it’s ok…

**Poke**

**Poke**

Whassat?

Whassat?

Well, if the girls are doing it...

Well, if the girls are doing it…

Onwards to adventure! Part two will be coming when I have a moment to edit the photos.




Fixing the HTC One X’s WiFi

A year or so back, I picked up an OEM HTC One X – which at the time was the nicest quad-core phone around that didn’t also happen to be a phablet.

Initially, I had no problems with the device, and the Android Jelly Bean update only brought better performance and a nicer UI.

Unfortunately, at some point, my device must have taken a knock causing the WiFi antenna to be less effective, dropping it’s effective range.

Luckily, this was still more than enough to be usable in most situations and I just left it as it was for best part of 6 months, after which a new update was pushed out from HTC.

Unfortunately (again…) the update changed the behaviour of the radio, causing the effective range for WiFi to drop to around a few feet, through walls, or a dozen or so if I had line of sight – thankfully by this stage I had invested in an ‘unlimited data’ plan, so I could at least leave the phone on HSDPA and still connect to the internet that way, and living in a town meant that most of the time I had more than enough signal that way.

Today,  finally my patience ran out, having struggled with this set up for a few months, and wanted to fix the actual issue – antenna replacement can’t be that hard, right?

 Step One – Getting Inside

One of the first problems with this repair is the nature of the device’s construction.

Phone manufacturers have moved away from the nice, hackable, screwed-together cases of the previous generation of phones, and started building ‘unibody’ cases, whereby the outside of the device is essentially a near-unbroken smooth finish.

Obviously this is a much nicer finish, but it does mean that DIY repairs or tinkering is made much harder.

Thankfully, the folks over at TechRepublic have put together a photo set showing exactly how to crack open the HTC One X’s case and get at it’s juicy innards.

Step Two – What Has Actually Broken?

Next, to find out what was the likely cause of my WiFi woes, I scoured the forums over at XDA Developers (who are consistently awesome!) for anyone with similar problems.

Fortunately (or unfortunately, for them and I) many other One X owners have had problems with the WiFi antenna, and the problem is fairly well documented.

Following the [HARDWARE FAULT] WiFi antenna fault post, over on the One X forums, and digging around in the links therein, I elected to have a go at repairing this myself, rather than trying to get HTC to do a fix for me (how hard can it be?!).

Another user in the thread usefully posted photographs of their own modification to the One X to fix the problem, and it was these that I used to fix mine.

Step Three – Crunch Time

Now that I had a much better idea of what had happened, and a good idea of what to fix, I set to work, cracking the case open and soldering a tiny wire between the defunct antenna connection and the antenna plate.

Soldering a tiny wire to a contact on the antenna plate. Note the additional small drops of solder on each connection point on the unibody... just in case.

Soldering a tiny wire to a contact on the antenna plate.
Note the additional small drops of solder on each connection point on the unibody… just in case.

While the user I had been following had only attached a single wire from the top contact to the antenna, in my case this did not fix the WiFi problem, and I ended up attaching both contacts.

Initially I attached only one contact to the antenna, as per the original post, which did not work in my instance.

Initially I attached only one contact to the antenna, as per the original post, which did not work in my instance.

I ended up connecting both contacts to fix the problem, after some experimentation.

I ended up connecting both contacts to fix the problem, after some experimentation.

With this done, I very carefully reassembled my phone, et voila! Working WiFi again!

Look at all those pretty signals!

Lookit Ma! WiFi signals!

Lookit Ma! WiFi signals!

Hopefully, with that, this is the last I’ll see of the signal issues I’ve been experiencing, and I can finally have my phone back to normal.




Pulling Colours From The CheerLights API on Linux

I’m trying to do a new project associated with the CheerLights project every year, and this time, I’m using a Raspberry Pi to pull the last set of colours from the ioBridge server.

I’ll be putting a full write-up about the project itself up on here soon, but I’m still waiting for a few parts for it to be complete, but the bash one-liner is handy in and of itself, so I’ll put it here for now, in case there are others who want to start a CheerLights-based thing this year.

curl http://api.thingspeak.com/channels/1417/feed.json | jshon -e feeds -a -e field1 -u

This handy one-liner returns a nice list of the last 25 colours set by the API.