Goblin Teasmade Upcycle: Part 2

After the first stages were completed, that is, designing the new wiring situation and wiring the internals. The contraption now looks something like this

The wiring pattern was explained in the last post. So the things you see beyond the mentioned pin patterns are the wires for the i2c devices (ghetto pixel, and DS1307 RTC). The RTC is used to keep the time internally, there are some interesting points to consider about the clock face itself and how it will maintain time. More on this later…

Stage 5 – Building a Web UI.

The code for the Web UI can be found here on github. Obviously when you’re serving files from an Arduino via the SD card you want to keep the files as small as possible. After running ImageOptim and minifying the javascript and css It probably all comes in under 150kb. Which isn’t much but is still enough to make the poor Arduino struggle… The HTML code should be runnable in any browser and there’s a neat little clock UI that should make you feel good to watch.

Obviously, you don’t have a teasmade on your network, so unfortunately you won’t be getting a nice cup of tea out of it. Sorry.

Things to note on the Web UI are

  • Moving the cursor over the clock shows the kettle and teapot and their states behind it.
  • Pressing the right hand button makes tea… Well, I’ll mark that as WORKSFORME heh.
  • Pressing the left hand button turns on the light.
  • The freakin’ clock hands animate!!

Stage 6 – An iOS app

So because the Web UI basically fails to load 9/10 times due to the amount of code in it, I have two solutions for this. Firstly I host the website on my home server because it’s actually fast enough, secondly I wrote an iPhone and iPad app for it.

The iPhone/iPad app do much the same thing as the HTML app, but instead using Objective-c API’s instead of javascript, which is far more responsive than wrapping the HTML in a WebView.

I’m not going to break down any of the code here because it’s all available on github to browse, it’s also pretty well commented so you should be able to just follow it.

Stage 7 – Working out around the clock

The main problem with the clock is that it’s an awful hack. What I’ve done is just wire directly onto the coils which drive the mechanism. Then I spent some time experimenting with the passage of time. It seems that 40ms more or less is equivalent to 1 second per second. Now the problem then ends up being how to make it tell the right time…

So we have an interface over the web, simply just tell it what time the face says and the system will calculate for how long it needs to run fast or for how long it needs to pause to achieve an accurate time. Then it’ll adjust the speed so that whatever amount out the time is it’ll adjust the frequency of the coils to compensate.

Once per day the RTC will collect the time from the web.

Teasmade Roundup

Finished Product

Finished Product

So the confession of it is that this project took over a year to complete. There are a number of reasons for that…. The original teasmade wasn’t up to scratch as it came, the process of preparing the shell the way I wanted took a while. The bakelite plastic surround for instance is quite translucent with the original lamps (20W filament bulbs, ouch) turned on, and loses something of it’s style because of it. 40 – 50 coats of silver and white spray paint later it was opaque enough that it retained that classy look with the LEDs on and the room lights out.

The balance was also heavily damaged by age, I spent a little time getting a colour of enamel just right and spraying the base after preparing the surface with some wet and dry pads. Then I moved house… It took about 10 months to get re-started on the project and then I had the kettle accident… Knocked the damn thing over while I was working on it and broke the pressure hose. It’s likely a good thing that I did because it was ready to pop and if it popped when it was making tea someone could have lost and eye.

I had to try and find another model of the same type on ebay. This might sound easy, but really it’s not. There are about 6 different models which look almost identical, some have wooden handles some have black bakelite, some have instructions on the back, others are a mystery how they work… I wouldn’t say I’m a teasmade enthusiast exactly, but this project has made me more of an expert than I thought possible. The replacement came with a slightly broken teapot, I can’t grumble too much because this project has already had it’s curses.

The thing which doesn’t work so well is basically the wifi. It’s completely useless compared to something with a decent TCP/IP stack and wifi antenna. The built-in antenna isn’t powerful enough to get through the walls and, inside of a device becomes even less useful.

I guess in the future I’ll probably take out the arduino wifi shield, they aren’t really worth the £70 you pay for them, instead I’d use a £1 NRF24L01+ and my mesh net, which is also progressing nicely and I’ll follow up with a new post about that shortly.