Tuesday, February 04, 2014

Space Invaders Table

So... I realise that it's not so much that I'm lazy about doing any projects, I'm just lazy at writing up any thing.

And so it was that I was inspired by the light up coffee table on hackaday http://hackaday.com/2014/02/03/ikea-led-table-mod-doesnt-lack-awesome/ today.

Inspired to write up a project that I'd completed about three years ago.

I'll start by saying that this was not my idea, I was inspired to make the coffee table after seeing a similar table on the make blog, http://makezine.com/2008/11/11/space-invader-coffee-tabl/

This coffee table uses what look like regular 4 inch tiles (slightly smaller than the average bathroom tile [6 inches]) to create a mosaic table top, Of course old 8 bit pixel sprites lend themselves very well to being made into tables from normal square tiles. it (and every other table of this type I've seen) takes the option to tile the entire table top, all the way to the edges -I decided to inlay my design in the centre.


The tiles I used were tiny in comparison (to the 4" tiles), I used mosaic tile mats, these are 12" square mats that have lots of 1" square tiles stuck to them in a uniform pattern of random colours, Black, white and two shades of grey.

The first step is to remove the tiles from the flexible backing and sort by colour, -the tiles can be just pulled off the backing -or the backing can be peeled off the tiles which is probably the more accurate way to describe the process.

Next you need to get yourself a LACK coffee table from Ikea, one of the little 50cm square ones, I chose to get a back one.

You can choose to assemble the table, or just work on the top on whatever work bench you have.

Start by arranging your tiles in the pattern that you want, you could either look at a reference picture (as I did) or make up your own design. include all the spacing in your tiles that you intend to put between them (grout lines).

Now mark out (using pencil) a square in the middle of the table, -your tile size, and your intended tile spacing will determine tile size -measure your layout! (I used a pack of tile spacers, but with a 3d printer you don't have to use the off the shelf ones -you could print your own, or you could use matchsticks etc...)

When you have your work area marked out start with a large "Stanley knife" (box cutter) and a metal straight edge and score the lines in the table top.
A good tip (unless you're very good with the knife) is to start in the corners working towards the middle, this means that you won't drag the knife on the table top that will be left.

It is unlikely that you will be able to cut through the top in a single pass of the knife.

Once you have cut out your pattern shape you need to pull it out. this will leave a hole in the table, and leave you with your first challenges.

The challenges are:
That the table is not solid, inside the table is a hexagonal arrangement of cardboard. you cannot set the tiles on that cardboard. not the thin air in the hexagonal gaps.
Secondly
That the tiles are going to be around 5mm (1/4") thick, but the table top (hardboard/melamine type material) is much thinner.

To get around this you need to firstly trim down the cardboard (either using the knife of a pair of scissors) -don't worry about being too careful of the height that is left.

Once you're done trimming down the card you need a can of expanding foam insulation.
carefully squeeze a portion of foam (don't fill because it expands) into each of the hexagonal pockets.
the foam will expand to fill the pockets and slightly dome out of the top of them.

Now using a large flat serrated knife (bread knife) cut the foam so that it's about twice the width of a tile under the surface of the table top.

Spread tile adhesive in a layer on top of the foam. and using the plastic tile spacers, ensure that the gaps remain consistent. push the tiles into the adhesive such that the tops of the tiles are level with the table top.

Now leave the table another day or two for the adhesive to properly dry.
finally fill in the gaps (grout lines) between the tiles with tile grout.

The table I used was a black Lack table. cost £5
The tiles I used were two packs of kitchen/bathroom mosaic tiles (cost £2 each) -and I have plenty left.
Expanding foam I used cost £2 per can, only a small can is needed (whilst there is some left, foam sets in the nozzle making the can useless unless you clean it directly after use)
the tile grout I used was a grey glitter grout.

The final results are here:



Monday, October 14, 2013

summer holiday

So, (and not for the first time)

I reached a lull in posting, not that I was doing nothing, but I had nothing to write about.
I've been doing a few projects, but have yet to write them up.

I'm going to start writing again, but perhaps at a slower frequency.
I've tried posting once every few days, (years ago) and found that far too hard to keep up with.

I wish I'd done once a week, then I'd still have a ton of posts cued for release.

I tried once a week, but without some hardcore time spent writing and having a stack ready and scheduled for release I couldn't keep on top of writing here, making else where and a job and a family!

So now I think I'll just post as and when I need to. when I'm inspired to write a lesson, rather than looking for stuff to pad a blog, and posting when I have completed a project rather than trying to do smaller projects so that I can update more frequently.


Thursday, October 10, 2013

First accidental explosion

http://makezine.com/magazine/what-was-your-first-accidental-explosion/

So Make asks what was your first accidental explosion...

For me it's something that I won't forget. not because it was especially dangerous. but because I was so young and so paniced.

To start with it might be a good idea to set the scene.

1, I have always been interested in hacking electronics, this started from the day I took an old record player out of a skip and salvaged the components out of it using a soldering iron borrowed from my grandad.
I'd borrow books from the library to learn how to put circuits together and how to build different things.

2, As a young boy I was always interested in pirates, as in the swashbuckling kind, I used to have a book about pirates, and frequently would play "make believe pirates" I suspect (thinking about the house I was living in at the time) that I was about 7.

Hence we come to my first accidental explosion...

So one day I'm playing pirates, and I'm make believing that I'm exploring some kind of cave searching for buried treasure, in order to explore said cave I need a candle.

So I go to my "parts box" and select a light bulb, some wire and a 9v box battery. I wrap some wire around the bulb and around the "turret" terminal of the box battery, then press the other terminal of the light bulb directly onto the battery, "et voila" I have a candle, and go back to exploring my imaginary cave.

My candle however is not very reliable, I try securing parts with tape etc, but for some reason the bulb keeps going out.

Then bang, the battery explodes.

(the battery has shorted on my cello taped bits of wire (that bridge the battery connections), the current flowing has heated the insides of the battery, caused the electrolyte to expand and eventually the seal has blown.)

This is where the panic set in, the battery has exploded in my hands, (exploded is not the right term, all that's really happened is the bottom of the battery has blown out) my left hand is now covered in electrolyte, except I'm seven and have no idea what electrolyte is, I've no idea how battery's work -just that they make my toys go, in fact the only thing that I know about battery is the words battery acid. So as far as seven year old me is concerned the electrolyte from the alkaline box battery is acid, and my hand will melt any time soon.

After I realised that my hand wasn't melting I did find that the acid was just a weird murky jelly, and the inside of batteries apparently contained black sticks (carbon rods)...

So that's my first accidental explosion.


Monday, June 24, 2013

MySQL Data types and sizes

If you remember all the way back to how the coding lessons in C started, they started by looking at different datatypes, like ints long int etc, each requiring different memory spaces or being able to store different sized numbers.

The same thing is true in MySQL.
MySQL is a database server, often whenever you're making a website you have a few diffeerent things to think about.

Lets imagine you;re making an on line magazine, or a piece of forum software, you;re going to have authors, (that's a relatively short bit of text, -who's name is over 20 letters?)
but then you also have article text, or posts etc that's going to be a fairly hefty chunk of text.

So lets look at the kind of thing you'll use to have article titles, or by lines, that's likely to be a varchar type.
Varchar is like a string, you specify how much text you want to be able to store in the field. so for a name you may decide that 20 characters is enough, and you;d specify varchar(20).

for storing text there are a few different types of data field.

Notably these don't hold a number of characters, they actually hold an amount of data which is measured in bytes.
(this is important as you might be using a double byte character set -then you can only store half as much text by character count.

So, the data types are
Tinytext which can store 256 bytes,
Text which can store 65,535 bytes (64Kb)
Mediumtext -which can store 16,777,215 bytes (16MB)
Longtext 4,294,967,295 bytes that's a huge 4GB!!!

so how does this work? a 4GB chunk of text is huge to just be a row on a table.

well, the MyISAM tables actually have a maximum size of 65,535 bytes (that means a row can only be that size.) -but surely if a text field can be that by itself.

What happens is that a pointer is stored with the row data that points to the large text chunk, that file pointer is anywhere between 1 - 4 bytes. That way large data is store outside of the normal row.