<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title> blog</title>
		<link>http://www.kickingtyres.com/words/</link>
		<atom:link href="http://www.kickingtyres.com/words/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>SnoKart Black Kart review</title>
			<link>http://www.kickingtyres.com/words/snow-and-mountain/snokart-black-kart-review/</link>
			<description>&lt;p&gt;My old Salomon Equipe 9e luggage (The pink/orange/silver kit) is falling apart, but it has survived almost 20 years and numerous trips.&lt;/p&gt;
&lt;p&gt;One of the things that I always liked about it was the boot compartments at each end, meaning I only had to carry that, a rucksack and a skibag without having to faff about with an additional boot bag.  Looking for a replacement, I could only really find the Salomon Tanker 130 as an equivalent replacement but being ~£140 was a little off-putting as well as finding most places I checked didn't have it in stock.&lt;/p&gt;
&lt;p&gt;I came across &lt;a href=&quot;http://www.snokart.com&quot;&gt;SnoKart&lt;/a&gt; and was quite taken by their Black Kart system.  This is a  modular system that gives 3 bags which can be connected together in varios ways to make life easier.  Two make up the hold-all, and a double ski-bag.  The two hold-all bags then strap onto the ski-bag, using the skis as the 'spine' to become a single, wheeled luggage item that makes life much easier getting to and from the airport/car/transfer coach.&lt;img src=&quot;http://www.kickingtyres.com/assets/skiing/the-black-kart-088.jpg &quot; align=&quot;right&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/p&gt;
&lt;p&gt;The hold-all is certainly large enough for all my needs, but lacked the boot compartments that I liked.  This was solved, however, with SnoKart's Boot Airliner which are a couple of individual boot bags wich can clip together.  There's enough space that I can put the boots inside the holdall, and the airliner bags will protect the other contents if the boots are damp.&lt;/p&gt;
&lt;p&gt;On paper, the SnoKart is let down by it's weight, at 9Kg in total for the holdall system and ski-bag.  If you're flying, you might have to check the airline's bagage allowances as this 9Kg is eating into a significant chunk of the allowance for some airlines.&lt;img src=&quot;http://www.kickingtyres.com/assets/skiing/the-black-kart-091.jpg &quot; align=&quot;left&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/p&gt;
&lt;p&gt;That being said, the weight is there for good reason.  The zips, straps, wheels and fabric are all very robust and tough.  There's also ample padding in the outer shell to protect your kit.&lt;/p&gt;
&lt;p&gt;At £200, it's certainly not cheap, but I can probably get rid of a few of my other bags and use this, either as a whole or individual components, for all sorts of trips.  When you add up the cost of a decent sized piece of hold-luggage and a wheeled ski-bag, it suddenly doesn't seem expensive at all, not least when it makes transporting your stuff around such a breeze.&lt;/p&gt;</description>
			<pubDate>Thu, 10 May 2012 14:17:05 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/snow-and-mountain/snokart-black-kart-review/</guid>
		</item>
		
		<item>
			<title>KTM 640 Adventure R</title>
			<link>http://www.kickingtyres.com/words/petrolhead/ktm-640-adventure-r/</link>
			<description>&lt;p&gt;I recently acquired one of the bikes that I've always wanted.  A KTM 640 Adventure.  This one is very well equipped, and is literally almost 'ready to race'.  It has Acerbis rally tanks as well as a larger than standard main tank giving almost 50 litres of fuel capacity and a range of over 500miles.  That being said, I don't fancy picking it up if I drop it with a full fuel load on board.  There's also a Kriega grab handle, a rally seat and rally bash guard which incorporates a 1 litre liquid container and tool-box. On the dash I have a speedo and trip computer which includes the features for use with a roadbook.&lt;/p&gt;
&lt;p&gt;Looking through the documentation that was supplied, and from information provided by the previous owner, it appears that it was owned by &lt;a href=&quot;javascript:mctmp(0);&quot;&gt;Jim Foster&lt;/a&gt;, who was involved heavily in the Long Way Down and Race to Dakar, although it appears he bought the bike after doing the TV shows.&lt;/p&gt;
&lt;p&gt;For a big single, the vibes aren't as bad as I expected, and she's got surprisingly long legs for an off-road orientated machine, but I still wouldn't want to spend too long in the saddle on a motorway.  I'll keep the FJR for roadwork.  I hope to do some more offroad this year, and maybe try my hand at a rally or two.  Either way, I need to get fitter.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.kickingtyres.com/assets/Uploads/KTM/beastie2.jpg&quot;&gt;&lt;img src=&quot;http://www.kickingtyres.com/assets/Uploads/KTM/beastie2.jpg&quot; width=&quot;600/&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/a&gt;&lt;/p&gt;</description>
			<pubDate>Mon, 26 Mar 2012 11:18:43 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/ktm-640-adventure-r/</guid>
		</item>
		
		<item>
			<title>klassicvwkampers.co.uk gone bust?</title>
			<link>http://www.kickingtyres.com/words/petrolhead/klassicvwkampers-co-uk-gone-bust/</link>
			<description>&lt;p&gt;I've been converting my Ford Transit, ex-police van into a camper.  I've installed a seat/bed unit and have faced up and insulated the bulkhead separating the cabin from what was the cells but is where I will keep all my paddock gubbins.&lt;/p&gt;
&lt;p&gt;I had ordered a Smev two-burner hob/sink combo from klassicvwkampers.co.uk which included a fitting kit, pump, pipes and pretty much everything you'd need short of the gas bottle.&lt;/p&gt;
&lt;p&gt;A week passed and apart from the initial PayPal receipt email, I'd had no contact. I emailed them and after a few days, still nothing.  So I called the number on the website : This number is no longer in service.  I found a different number on the PayPal receipt, again : This number is no longer in service.&lt;/p&gt;
&lt;p&gt;I've opened a paypal dispute, and I'm confident it'll go through no problem, but it's a frustrating situation to be in as I am waiting for that kit to progress the build.  &lt;/p&gt;
&lt;p&gt;Doing some more digging turns up some forum posts on some VW related boards suggesting others are having trouble too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.volkszone.com/VZi/showthread.php?t=717199&quot;&gt;http://www.volkszone.com/VZi/showthread.php?t=717199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.vwt4forum.co.uk/showthread.php?t=118295&quot;&gt;http://www.vwt4forum.co.uk/showthread.php?t=118295&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If you have any info on this company, please let me know.&lt;/p&gt;</description>
			<pubDate>Thu, 09 Feb 2012 13:26:45 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/klassicvwkampers-co-uk-gone-bust/</guid>
		</item>
		
		<item>
			<title>Supercharger Update</title>
			<link>http://www.kickingtyres.com/words/petrolhead/supercharger-update/</link>
			<description>&lt;p&gt;I've made some fair progress on the ECU wiring harness.  I have one last wire to solder onto the socket, but as it was a bit of an afterthought I'm having to try and solder it in amongst a forest of pins already with wires attached.  Rather than letting my frustration get the better of me and end up ripping the whole thing apart, I've revamped the progress reports and moved them from a blog-post to a dedicated &lt;a href=&quot;http://www.kickingtyres.com/projects/mx-5-supercharger-project/&quot;&gt;Supercharger Project&lt;/a&gt; page in the '&lt;a href=&quot;http://www.kickingtyres.com/projects/&quot;&gt;projects&lt;/a&gt;' section.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I'll post notifications and summaries of updates in my blog, but the bulk of the progress will be documented there.&lt;/p&gt;</description>
			<pubDate>Tue, 31 Jan 2012 21:31:50 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/supercharger-update/</guid>
		</item>
		
		<item>
			<title>DIY Camcorder mount</title>
			<link>http://www.kickingtyres.com/words/petrolhead/diy-camcorder-mount/</link>
			<description>&lt;p&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;This evening, I decided to take a break from wiring the Emerald ECU harness for my supercharger project. I've got one wire left to attach, but it's right in amongst a forest of wires, and I can't be bothered right now.&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;So, tonight's fun was making a camcorder mount.&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;A couple of weeks ago, I picked up an HD camcorder from Lidl (1920x1980p) for £99. Not a bad deal, and pretty compact. Since it's going to be fitted to cars, bikes and boats I wasn't too fussed about spending a fortune on uber high quality kit.&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;I had one of those little mini tripods lying about (similar to this: &lt;a href=&quot;http://www.amazon.co.uk/Mini-Tripod-Ball-Tilt-silver/dp/B0002W6E3S&quot;&gt;http://www.amazon.co.uk/Mini-Tripod-Ball-Tilt-silver/dp/B0002W6E3S&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt; )&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;I found that the legs of the tripod unscrewed leaving an M10 threaded shaft protruding about 1cm from the bottom of the head.&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;I also happen to have some 1&quot; aluminium alloy bar lying about, so I stuck it in the lathe, turned it down, bored and threaded a hole in the end and made this.&lt;img class=&quot;right&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage600450-mount.jpg&quot; width=&quot;600&quot; height=&quot;450&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;It's mounted straight onto the wind-blocker. I drilled two 7mm holes and attached it using allen bolts and large 'fender' washers (My memory fails me.. what are they called in the UK?)&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;I mounted it high enough that it can still be used with the wind-blocker up, and it can also be rotated to face the camera backwards.&lt;/span&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;br style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;/&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;Went for a drive around the town (I needed fuel anyway) and tested the image quality. There's a bit of vibration, but nothing major. Can certainly still see what's happening.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: verdana, helvetica, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;&lt;img class=&quot;right&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage600450-camcorder.jpg&quot; width=&quot;600&quot; height=&quot;450&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;</description>
			<pubDate>Wed, 25 Jan 2012 20:02:50 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/diy-camcorder-mount/</guid>
		</item>
		
		<item>
			<title>DVLA Changes</title>
			<link>http://www.kickingtyres.com/words/petrolhead/dvla-changes/</link>
			<description>&lt;p&gt;The DVLA is bringing in some long-awaited changes to their processes and requirements. Most notably...&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Scrapping the regulation requiring motorists to hold a paper counterpart to their driving licence by 2015&lt;/li&gt;
&lt;li&gt;SORN becoming a one-off process. Once drivers have notified the DVLA that their vehicle is SORN, they will no longer have the burden of annual SORN renewal.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For further information and more chages, read the DVLA Press release in full :&lt;a href=&quot;http://www.dft.gov.uk/news/press-releases/dft-press-20111215&quot;&gt;http://www.dft.gov.uk/news/press-releases/dft-press-20111215&lt;/a&gt;&lt;/p&gt;</description>
			<pubDate>Fri, 16 Dec 2011 10:27:08 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/dvla-changes/</guid>
		</item>
		
		<item>
			<title>MX5 Supercharger project</title>
			<link>http://www.kickingtyres.com/words/petrolhead/mx5-supercharger-project/</link>
			<description>&lt;h3&gt;This post will not be updated, it's more completely documented in my &lt;a href=&quot;http://www.kickingtyres.com/projects/mx-5-supercharger-project/&quot;&gt;Supercharger Project&lt;/a&gt; pages.&lt;/h3&gt;
&lt;p&gt;I'm documenting the process of installing an Eaton M45 supercharger in my 2002 Mazda MX5. I've read several build diaries on various forums and websites, but still find myself asking seemingly obvious questions about things that have been omitted from these diaries. I hope this this will provide a comprehensive, step-by-step account of what is needed and done to do this modification.&lt;/p&gt;
&lt;p&gt;This page is a work-in-progress and will be updated as the project goes.&lt;/p&gt;
&lt;p&gt;First..&lt;/p&gt;
&lt;h2&gt;The car&lt;/h2&gt;
&lt;h2&gt;&lt;img class=&quot;right&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage250166-silverstone.jpg&quot; width=&quot;250&quot; height=&quot;166&quot; align=&quot;right&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/h2&gt;
&lt;p&gt;It's a 2002 MX5 1.8 Sport. That means it is a face-lift mk2, or mk2.5 and has VVT (Variable valve timing) and a LSD (Limited slip diff). It does have power steering and ABS, but doesn't have air-con. The lack of air-con is relevant as it is driven off the same belt as the PAS pump and so will dictate what size of belt is required.&lt;/p&gt;
&lt;h2&gt;The components:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Eaton M45 supercharger&lt;/strong&gt; : This was acquired off Ebay, and is the same model fitted to the Mini Cooper S.  For the M series superchargers from Eaton, the number denotes the volume of air, in cubic inches, that's shifted per revolution, so the M45 moves 45 cui/rev. These are &lt;a href=&quot;http://en.wikipedia.org/wiki/Roots-type_supercharger&quot;&gt;'roots' type&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Roots-type_supercharger&quot;&gt;superchargers &lt;/a&gt;and have 3 lobe rotors with 60 degrees of end-to-end twist.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;right&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage200150-eaton.JPG&quot; width=&quot;200&quot; height=&quot;150&quot; align=&quot;left&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Some kits, DIY or otherwise, have used the MP45 unit.  The MP45 unit is, as far as I can tell, identical to the M45, but that the MP denotes that it was supplied by &lt;a href=&quot;http://www.magnusonproducts.com/&quot;&gt;Magnuson Products&lt;/a&gt;. As I understand it Magnuson Products handles service and the aftermarket for Eaton and provides superchargers to a number of companies that design and manufacture the installation system for specific applications. Magnuson provides more superchargers for aftermarket applications than any other supercharger manufacturer in the world [&lt;a href=&quot;http://www.myhps.com/index.php?category=Frequently%20Asked%20Questions&amp;amp;src=faq&amp;amp;submenu=FAQ#19&quot;&gt;source&lt;/a&gt;].&lt;/p&gt;
&lt;p&gt;As this modification for the MX5 has gained popularity, the prices of these superchargers have gone up accordingly, so at the time of writing you can expect to pay between £250 and £300 for one in good condition. You may notice that the pulley on the supercharger has 6 grooves, whereas the pulleys on the end of the crank, and on the PAS pump are all 4-groove. Don't fret, the 4-groove belt simply runs on the 6-groove supercharger pulley. It could be argued that a 6-groove belt would be a better option, but this means sourcing and modifying the pulleys on the end of the crank and the PAS pump, which is way outside the scope of this project. I might look at this some other time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tim Lane supercharger parts&lt;/strong&gt; : Visit &lt;a href=&quot;http://www.trlanefabs.co.uk/&quot;&gt;Tim Lane&lt;/a&gt; for the most important parts. Tim can also provide a wealth of advice and is generally a friendly and helpful chap. The parts I obtained from him as are follows:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Hose kit&lt;/strong&gt; : To allow the air-flow from the filter to the supercharger, and from the supercharger to the inlet manifold.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High flow filter&lt;/strong&gt; : you can probably find other filters that might fit, but I thought it easier to just get this one as you know it'lll work with the kit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supercharger bypass valve&lt;/strong&gt; : At partial/low and closed throttle positions, you don't wasnt to be pumping huge volumes of air into the engine. If nothing else, it's unneccesarily noisy. The bypass valve allows the engine to effectivley become naturally aspirated when not under load&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cast outlet&lt;/strong&gt; : Bolts to the supercharger and provides the high-pressure outlet to the engine's inlet manifold.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fabricated inlet&lt;/strong&gt; : As it sounds, is what bolts to the supercharger feeding air into it from the filter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;belt tensioner plate&lt;/strong&gt; : Allows the drive belt to be correctly tensioned.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1800 supercharger mount&lt;/strong&gt; : The 1.6 and 1.8 engines are different enough that a specific mount is required. Where the 1.6 has two handy holes that the bracket can be attached to, the 1.8 needs to use an exhaust stud as there's only one useful mounting point on the engine itself. I suspect I may require a longer stud/bolt to allow it to mount on the exhaust.  Watch this space.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;&lt;img class=&quot;left&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage600531-pSuperchargerParts2.JPG&quot; width=&quot;600&quot; height=&quot;531&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Emerald K6 ECU&lt;/strong&gt; : There are various options for engine management. Many have gone down the route of a piggy-back power-card which sits on top of the engine's existing ECU and sends the required additional signals to handle fuelling and ignition timing that need to be modified for the use of a supercharger. In looking at the various options, I felt that the piggy-back powercard didn't offer the optimal solution, meaning that fuelling would be incorrect at certain times. While not ciritical, indeed many have used this setup without any problems, I wanted to have more control over the fuelling and ignition.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;left&quot; src=&quot;http://www.kickingtyres.com/assets/Uploads/_resampled/resizedimage200266-emerald.jpg&quot; width=&quot;200&quot; height=&quot;266&quot; align=&quot;left&quot; alt=&quot;&quot; title=&quot;&quot;/&gt;Another option is to get a fully featured ECU and piggy-back that off the standard ECU so both are working together to control different aspects of the engine management. This allows you to keep things liike the ODB output from the stock ECU, and gain some of the advantages of a fully featured ECU. I considered this route, and looked at the Megasquirt ECU which can be installed in thsis manner.&lt;/p&gt;
&lt;p&gt;In the end, I decided to go for an Emeral K6 ECU as a complete, standalone ECU, replacing the stock ECU completely. This means I have to start from scratch with creating a map for the ECU, but also means I have far more control over all the parameters.  The Emerald ECU comes with a serial cable as standard, but can supply a USB adapter.  The supplied software runs on MS Windows only, but I'm using a windows XP virtual machine under Ubuntu Linux and will test it on my MacBook Air as well using Parallels.  The Macbook Air is nicely compact and I could take it with me for on-the-fly mapping tweaks more easily than my monstrous 17&quot; Dell laptop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MAP (Manifold Air Pressure) sensor&lt;/strong&gt; : Since we're changing the pressure inside the manifod using the supercharger and control valves, the ECU needs to know what the pressure is inside the manifold to allow it to control the correct amounts of fuel to inject, and the correct ignition timing. The MX5 doesn't have a MAP sensor as standard, so I obtained one from the guys at Emerald. As with the air-filter, I'm sure there are others that can fit and are compatible, but getting it from the ECU suppliers just saves on that research.  I went for the more expensive Marelli MAP sensor which is good for 250kpa (about 25psi of boost which is plenty) and made sure to include the plug &amp;amp; pins.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sacrifical stock ECU&lt;/strong&gt; : As you can't simply unplug the stock ECU and plug in the Emerald, there are two ways of making it fit. One is to wire it into the car's wiring harness with the supplied plug. This means, however, that you are cutting into the wiring, possibly removing the existing plug, and if you hit upon any issues (bearing in mind the wiring could be a few years old and not that easy to work with) you could end up with a non-functioning car. The other option is to make up a harness, similar to that you might buy for a car stereo, which will allow you to plug the existing ECU plug into the harness, and that harness into your new ECU. Of course, to do this, you need to obtain a socket. I know of one other who went down this route, and used the stock ECU, dismantling it for it's socket. I was fortunate enough to find someone selling the same stock, but duff, ECU on ebay for £notalot. I snapped that up, as it would mean I could strip it for it's socket retain the original ECU unharmed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Two cam idler pulleys&lt;/strong&gt; : The Tim Lane kit requires two of these, which are used to tension and route the drive belt.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Two mk1 1.6 throttle bodies&lt;/strong&gt; : I'm using two throttle bodies, one sitting each side of the supercharger (one high pressure side, one low pressure side). It can be done with just one, but it will be noisier. Despite my car being the 1.8, the kit does need the throttle bodies from the 1.6.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drive belt&lt;/strong&gt; : I'll know what size I'll need when I've finished the install.  Watch this space.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Spark plugs &lt;/strong&gt;: Some cooler plugs are often recommended.If the tip of the spark plug is too hot it can cause pre-ignition or sometimes detonation/knocking and damage may occur. If it is too cold, electrically conductive deposits may form on the insulator causing a loss of spark energy or the actual shorting-out of the spark current. The various laws of thermodynamics (Charles' law and Boyle's Law) show us that as a gas is compressed, it's temperature increases. As the supercharger is compressing the air, the temperature of the mass of air and fuel being pushed into the cylinder will be slightly higher than with a normally aspirated engine. As a result, when the piston compresses the fuel/air mixture further, the temperature of the combustion chamber at the point of ignition can be higher than normal. By using a slightly cooler spark-plug, you are ensuring the tip of the plug is remaining at the correct temperature and so helping to prevent pre-ignition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternator&lt;/strong&gt; : The ECU on the MK2 and 2.5 handles the function of alternator regulator.  As I'm doing away with the original ECU I need to address this as the Emerald ECU doesn't have that feature.  The solution is to get an alternator from a Mk1 1.8, as those alternators are self-regulating.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bypass pipe&lt;/strong&gt; : The silicone hose supplied with the Tim Lane kit is too short/small to reach both the valve and the inlet.  It's also too soft, meaning it'll collapse under a vacuum.  My solution is to get an &lt;a href=&quot;http://www.ekmpowershop9.com/ekmps/shops/gtstuning/aluminium-water-pipe---135-degree-bend-439-p.asp&quot;&gt;alloy pipe of the same shape and size&lt;/a&gt;, and cut the silicone one up to make connectors so it can reach the valve and inlet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wideband O2 sensor&lt;/strong&gt; : The O2 sensor is supplied as standard can't give an aftermarket ECU all the info it needs to make totally accurate Mapping decisions.  Without a wideband O2 sensor, the exact fuel/air ratio can't be calculated and so your engine could be running rich or lean. You can get an idea of this by removing the plugs and examining them, but that's far from practical.  Getting it onto a dyno or rolling road, an external O2 sensor can be used, but that only works for the time you're on the rolling road.  With a wideband O2 sensor, your ECU has much more information allowing it to inject the correct amount of fuel at all times.  As I understand it, the narrowband, which is fitted as standard, has a very narrow range of acceptable measurement. Outside that range, it just says 'bad', without any informatoin about just how bad.  The wideband quantifies that more accurately. The Emerald ECU can 'learn' and adapt it's map based on the input from all the sensors, so in this case, a wideband sensor just helps keep everything accurate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Miscellaneous plate/sheet&lt;/strong&gt; : After removing some of the bits you don't need from the throttle bodies you'll need to make up a blanking plate to cover the holes left.  It's also not a bad idea to make up a plate to cover the end of the supercharger, where there's an exposed, rotating power take off.  I'll also be using plate to make up small cable brackets to hold the ends of the throttle cable which will link the two throtle bodies together. I'm fortunate that I've got bits of aluminium and stainless steel kicking about, but you should be able to source this stuff from any good metal suppliers.  I'd expect, if you asked for off-cuts, that most would throw the small amounts you need into a bad for the price of a beer or a pack of biscuits.&lt;/p&gt;
&lt;h2&gt;The Mechanical Install&lt;/h2&gt;
&lt;p&gt;Cut a mounting bracket off the supercharger to allow the outlet to bolt on : I stuffed the outlet with blue-roll, and then taped a piece of cardboard over it to prevent aluminium filings from getting inside while I cut it off.  I also then attacked the whole thing with the compressed air line to blow off, and out, any swarf.&lt;/p&gt;
&lt;p&gt;Bolted the outlet to the supercharger to verify it fits : The face of the cast outlet isn't very smooth, and the powdercoating isn't helping.  Over Christmas I'm going to put this in the milling machine and skim it to give it a good face.&lt;/p&gt;
&lt;p&gt;Fitted the bypass valve to the outlet.  Fits fine.&lt;/p&gt;
&lt;p&gt;Tried to fit the inlet to the supercharger : no chance: While it's the right shape, it's just too tight to go on. I'll probably attack this with the milling machine as well to get a good fit.&lt;/p&gt;
&lt;p&gt;Offered up the silicone bypass hose which links the inlet to the bypass valve.  It's simply far too short.  Also, in talking to those who have done this install before, the silicone pipe is too soft and collapses under a vacuum.  To resolve this, I've ordered an &lt;a href=&quot;http://www.ekmpowershop9.com/ekmps/shops/gtstuning/aluminium-water-pipe---135-degree-bend-439-p.asp&quot;&gt;alloy water pipe from GTS Tuning&lt;/a&gt; which will do the job. I can cut the useless silicone tube up to make up connectors to fit it to the valve and inlet.&lt;/p&gt;
&lt;p&gt;I started to take some of the unused bits off one of the throttle bodies, but as the screws seem to be made of DairyLeasium, I've left them soaking in some WD40 and I'll attack them later.  I also need to source some plate to make up blanking panels for both the throttle body and the back of the supercharger.&lt;/p&gt;
&lt;p&gt;Pictures to follow.&lt;/p&gt;
&lt;h2&gt;Wiring the ECU&lt;/h2&gt;
&lt;p&gt;... to come&lt;/p&gt;
&lt;h2&gt;Costs&lt;/h2&gt;
&lt;table style=&quot;border: 1px solid #369e19;&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Item&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Unit cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;qty&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;total&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Supercharger&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;250.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td&gt;250.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ECU&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;595.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td&gt;595.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;MAP sensor&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;72.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;72.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Idler pulley&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;19.95&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;39.90&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Throttle cable&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;4.17&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;4.17&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Throttle body&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;33.33&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;66.66&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TRLane Kit&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;635.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;635.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Drive belt&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Spark plugs&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;4&lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sacrificial ECU&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;50.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;50.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;USB-Serial adpater&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;12.50&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;2&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;12.50&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Alloy bypass pipe&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;12.20&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;12.20&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Techedge J2J Wideband Sensor kit&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;160.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td&gt;160.00&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Alternator&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;30.00&lt;/td&gt;
&lt;td style=&quot;text-align: center;&quot;&gt;1&lt;/td&gt;
&lt;td style=&quot;text-align: right;&quot;&gt;30.00&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Setting up a Base Map&lt;/h2&gt;
&lt;p&gt;...To come&lt;/p&gt;
&lt;h2&gt;Useful links:&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;Emerald ECU : &lt;a href=&quot;http://www.emeraldm3d.com/&quot;&gt;http://www.emeraldm3d.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Tim Lane Fabrications : &lt;a href=&quot;http://www.trlanefabs.co.uk/&quot;&gt;http://www.trlanefabs.co.uk/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MX5 Heaven : &lt;a href=&quot;http://www.mx5heaven.co.uk/&quot;&gt;http://www.mx5heaven.co.uk/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Megasquirt : &lt;a href=&quot;http://www.megasquirt.info/&quot;&gt;http://www.megasquirt.info/&lt;/a&gt; and &lt;a href=&quot;http://www.extraefi.co.uk/&quot;&gt;http://www.extraefi.co.uk/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Skuzzle Motorsport : &lt;a href=&quot;http://www.skuzzle.com/motorsport/&quot;&gt;http://www.skuzzle.com/motorsport/&lt;/a&gt; Nick at Skuzzle can do the full install for you, using the Tim Lane parts.&lt;/li&gt;
&lt;li&gt;Eaton Supercharger FAQ : &lt;a href=&quot;http://www.eaton.com/Eaton/ProductsServices/ProductsbyCategory/Automotive/AutomotiveAftermarket/Superchargers/FAQ/index.htm&quot;&gt;http://www.eaton.com/Eaton/ProductsServices/ProductsbyCategory/Automotive/AutomotiveAftermarket/Superchargers/FAQ/index.htm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Wikipedia article on Roots Type Superchargers &lt;a href=&quot;http://en.wikipedia.org/wiki/Roots-type_supercharger&quot;&gt;http://en.wikipedia.org/wiki/Roots-type_supercharger&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;
&lt;h3&gt;This post will not be updated, it's more completely documented in my &lt;a href=&quot;http://www.kickingtyres.com/projects/mx-5-supercharger-project/&quot;&gt;Supercharger Project&lt;/a&gt; pages.&lt;/h3&gt;
&lt;/div&gt;</description>
			<pubDate>Sun, 11 Dec 2011 11:53:55 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/mx5-supercharger-project/</guid>
		</item>
		
		<item>
			<title>New proposals for motorcycle type approval</title>
			<link>http://www.kickingtyres.com/words/petrolhead/new-proposals-for-motorcycle-type-approval/</link>
			<description>&lt;p&gt;From the BMF via Motorcycle Trader:&lt;/p&gt;
&lt;p&gt;A key vote by a European Parliament committee has set the scene for a  battle royal over the toughest technical proposals yet to threaten  European motorcyclists say the BMF. &lt;br/&gt;&lt;br/&gt;On Monday the European  Parliament's Internal Market and Consumer Protection (IMCO) committee  voted through stringent proposals for the regulation, approval and  market surveillance of motorcycles, three wheelers and quadricycles. &lt;br/&gt;&lt;br/&gt;The  IMCO committee vote is an early stage of the legislative process and is  in effect a recommendation to the European Parliament. If the European  Parliament take the same view, it would mean that from 2014, measures to  prevent power-train modifications&lt;strong&gt;*&lt;/strong&gt; must be devised and  applied by manufacturers and also that owners must present their  motorcycles for inspection after carrying out 'substantial'  modifications. It would also mean that as from 2016, tighter emission  laws would apply and all machines would have to be fitted with ABS, not  just those over 125cc as previously tabled. &lt;br/&gt;&lt;br/&gt;The European  Parliament final vote will be held in the New Year but on the positive  side say the BMF, IMCO chairman Malcolm Harbour will conduct an impact  assessment dealing with timelines, emission limits, ABS and  anti-tampering measures, the outcome of which is expected to influence  the European Parliament's final vote. &lt;br/&gt;&lt;br/&gt;Speaking after the vote,  Chris Hodder, the BMF's Government Relations Executive said: &quot;Rather  than protecting the right to enjoy their property, IMCO MEPs are  recommending that it be curtailed. Some requirements such as those for  durability and improved access to repair and maintenance information are  good, but others that restrict the owners right to adapt and modify  their own machines strike at the very core of motorcycling and are  totally unnecessary.&quot; &lt;br/&gt;&lt;br/&gt;The BMF is now stepping up its lobbying of  UK Government and MEPs through its membership of FEMA, the Federation  of European Motorcyclists' Associations. &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;*Note:&lt;/strong&gt; Power-train modifications will mean manufacturers employing measures to  prevent subsequent modifications by the user that may have adverse  effects on safety or the environment. Additionally IMCO added a new  article 18a which requires that users seek inspection and approval 'by  the competent authorities' in case of substantial power-train  modifications. &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;A detailed report on the IMCO vote will soon be available on the FEMA website: &lt;a href=&quot;http://www.fema-online.eu&quot;&gt;www.fema-online.eu&lt;/a&gt;&lt;/p&gt;</description>
			<pubDate>Thu, 08 Dec 2011 12:26:54 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/new-proposals-for-motorcycle-type-approval/</guid>
		</item>
		
		<item>
			<title>Silverstone improvements</title>
			<link>http://www.kickingtyres.com/words/petrolhead/silverstone-improvements/</link>
			<description>&lt;p&gt;The next step in securing the future of Silverstone Circuit was taken  yesterday with the submission of a comprehensive outline planning  application to Aylesbury Vale District Council and South Northants  District Council. The application conforms with the Silverstone  Development Brief, issued February 2009, and comprises of:&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;- Business park (maximum122,519 sqm; use classes B1, B2 and B8) &lt;br/&gt;&lt;br/&gt;- Technology park (maximum 62,662 sqm, use classes B1, B2 and B8) &lt;br/&gt;&lt;br/&gt;- Education campus (maximum 34,658 sqm; use classes D1 and C2) &lt;br/&gt;&lt;br/&gt;- Three hotels (maximum 39,847 sqm; use class C1) &lt;br/&gt;&lt;br/&gt;-  Ancillary retail and spectator facilities, including 'Welcome Centre'  and 'Museum of Motor sport' (maximum 61,964 sqm; use class D2) with  promotional and experiential automotive display space (maximum 18,600  sqm; sui generis) &lt;br/&gt;&lt;br/&gt;- Improved leisure and event spaces, including a kart track and outdoor stage (maximum 65,075 sqm; use class D2) &lt;br/&gt;&lt;br/&gt;-  Other ancillary development, including landscape works, grandstands,  hardstanding and support paddock, bridge and tunnel to improve  pedestrian flows, a new point of access, supporting infrastructure and  demolition &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Development of the masterplan for Silverstone  Circuit will help demonstrate the potential of the facility. The  development will create around 8,400 permanent jobs in the firms and  activities attracted to the site, plus an average of around 550  construction jobs per annum throughout the development phase. At least  4,800 of these jobs are likely to be entirely new to the area. &lt;br/&gt;&lt;br/&gt;Stuart  Rolt, Chairman of the British Racing Drivers' Club commented, &quot;The  submission of this planning application is a big step forward in  releasing the commercial potential of Silverstone and its 760 acre  Estate. The timing of this planning application is closely linked into  the process we are currently undergoing to seek potential investment  from third parties that will enable us to move forward with our plans  more rapidly.&quot; &lt;br/&gt;&lt;br/&gt;Richard Phillips, Managing Director of  Silverstone Holdings Ltd, said: &quot;This is the most important initiative  that Silverstone has taken in its 60 year history. Things have changed  dramatically since the early days. Approval of this planning application  will help maintain Silverstone's position as a leading global centre  for sport, leisure, education and technology and support its vision of  becoming a World leading motor sport destination.&quot; &lt;br/&gt;&lt;br/&gt;Richard  Cutler, a Partner at Bloombridge, Silverstone's appointed Planning and  Development Manager, said: &quot;The Development Brief provides a very good  starting point. Our professional team has worked hard to produce a very  high quality masterplan, founded on a robust analysis of the constraints  and opportunities. The next step is to deliver the much sought after  inward investment.&quot; &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;A full copy of the planning application is available at: &lt;/strong&gt;&lt;a href=&quot;http://www.silverstone.co.uk/track/Latest-Developments/&quot;&gt;&lt;strong&gt;www.silverstone.co.uk/track/Latest-Developments/&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;  &lt;/strong&gt;&lt;/p&gt;</description>
			<pubDate>Fri, 12 Aug 2011 14:41:21 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/silverstone-improvements/</guid>
		</item>
		
		<item>
			<title>More on the Squeezebox widget</title>
			<link>http://www.kickingtyres.com/words/tech/more-on-the-squeezebox-widget/</link>
			<description>&lt;p&gt;A while back I blogged about a Squeezebox taskbar widget I created to control my Squeezebox from my desktop without needing the web interface open. I've noticed a reasonable proportion of traffic to my site which has hit that page, so I've put the code onto SourceForge to make it more widely available.&lt;/p&gt;
&lt;p&gt;The project is at:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://sourceforge.net/projects/squeezebar/&quot;&gt;http://sourceforge.net/projects/squeezebar/&lt;/a&gt;&lt;/p&gt;</description>
			<pubDate>Thu, 19 Aug 2010 01:11:05 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/tech/more-on-the-squeezebox-widget/</guid>
		</item>
		
		<item>
			<title>MySQL User Group</title>
			<link>http://www.kickingtyres.com/words/mysql/mysql-user-group/</link>
			<description>&lt;p&gt;From discussions both at and after the recent MySQL meeting, it seems  the way forward for this group, and the UK MySQL community as a whole is  to move away from Facebook, develop it's own presence and community,  and to fall under the wing of the UK OUG to take advantage of the  &quot;official&quot; status it gives us.  This also gives us the opportunity for funding  and organising events as well as providing venues.&lt;br/&gt;&lt;br/&gt;As part of  that I'm looking at setting up a dedicated web-presence for the UK MySQL  community, as I believe many of the members we lost when we moved off Meetup was due to them not using, or generally not liking Facebook. If you have any suggestions for a platform to use for a community like this, I'm keen to hear it.&lt;br/&gt;&lt;br/&gt;There's also likely to  be a MySQL stream at the UK OUG conference in Birmingham in November. If  anyone has any information, wants information, or would like to be  involved, please drop me a line.&lt;/p&gt;</description>
			<pubDate>Thu, 08 Jul 2010 01:09:52 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/mysql/mysql-user-group/</guid>
		</item>
		
		<item>
			<title>Squeezebox controller</title>
			<link>http://www.kickingtyres.com/words/tech/squeezebox-controller/</link>
			<description>&lt;p&gt;I can't find any simple apps for controlling my Squeezebox Boom.  There used to be a Firefox plugin, but it seems development of that has stalled and it won't work with the versin of firefox I'm running.  There is the web-interface to the squeezebox server, and while that does everything, it still needs you to find the relevant tab/window to be able to control the player.&lt;/p&gt;
&lt;p&gt;Ideally, I was looking for a simple taskbar widget for Ubuntu which would allow me to start/stop/forward/back the tracks on my Squeezebox, but alas there was none.&lt;/p&gt;
&lt;p&gt;So I made one.&lt;/p&gt;
&lt;p&gt;This is far from ideal, it's poor coding, it's ugly....&lt;/p&gt;
&lt;p&gt;but it works&lt;/p&gt;
&lt;p&gt;It's written in Python, and using the egg.trayicon feature from python-gnome2-extras, and works by simply sending a 'GET' request to the web interface on my squeezecenter server.  I've removed references to the player ID frpom the URL to make it easier, but that means it only controls the current player.&lt;/p&gt;
&lt;p&gt;Set your own serverurl and it should be good to go.&lt;/p&gt;
&lt;p&gt;It works fine for your own tracks, but for some reason, it won't advance when using some streaming content, and yet back,play and stop works fine.&lt;/p&gt;
&lt;address style=&quot;padding-left: 30px;&quot;&gt;#! /usr/bin/python&lt;br/&gt;serverurl = 'http://10.67.2.8:9000'&lt;br/&gt;import gtk&lt;br/&gt;import egg.trayicon     # egg == python-gnome2-extras&lt;br/&gt;import urllib2&lt;br/&gt;fwurl = serverurl+'/status.html?p0=playlist&amp;amp;p1=jump&amp;amp;p2=+1'&lt;br/&gt;bkurl = serverurl+'/status.html?p0=playlist&amp;amp;p1=jump&amp;amp;p2=-1'&lt;br/&gt;stopurl = serverurl+'/status.html?p0=stop'&lt;br/&gt;playurl = serverurl+'/status.html?p0=play'&lt;br/&gt;&lt;br/&gt;def callforward(widget, ev):&lt;br/&gt; urllib2.urlopen(fwurl)&lt;br/&gt;&lt;br/&gt;def callstop(widget, ev):&lt;br/&gt; urllib2.urlopen(stopurl)&lt;br/&gt;&lt;br/&gt;def callplay(widget, ev):&lt;br/&gt; urllib2.urlopen(playurl)&lt;br/&gt;&lt;br/&gt;def callback(widget, ev):&lt;br/&gt; urllib2.urlopen(bkurl)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;fwtray = egg.trayicon.TrayIcon(&quot;TrayIcon&quot;)&lt;br/&gt;fwbox = gtk.EventBox()&lt;br/&gt;fwlabel = gtk.Label(&quot;&amp;gt;&amp;gt;&quot;)&lt;br/&gt;fwbox.add(fwlabel)&lt;br/&gt;fwtray.add(fwbox)&lt;br/&gt;&lt;br/&gt;stptray = egg.trayicon.TrayIcon(&quot;TrayIcon&quot;)&lt;br/&gt;stpbox = gtk.EventBox()&lt;br/&gt;stplabel = gtk.Label(&quot;[]&quot;)&lt;br/&gt;stpbox.add(stplabel)&lt;br/&gt;stptray.add(stpbox)&lt;br/&gt;&lt;br/&gt;plytray = egg.trayicon.TrayIcon(&quot;TrayIcon&quot;)&lt;br/&gt;plybox = gtk.EventBox()&lt;br/&gt;plylabel = gtk.Label(&quot;&amp;gt;&quot;)&lt;br/&gt;plybox.add(plylabel)&lt;br/&gt;plytray.add(plybox)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;bktray = egg.trayicon.TrayIcon(&quot;TrayIcon&quot;)&lt;br/&gt;bkbox = gtk.EventBox()&lt;br/&gt;bklabel = gtk.Label(&quot;&amp;lt;&amp;lt;&quot;)&lt;br/&gt;bkbox.add(bklabel)&lt;br/&gt;bktray.add(bkbox)&lt;br/&gt;&lt;br/&gt;fwtray.show_all()&lt;br/&gt;stptray.show_all()&lt;br/&gt;plytray.show_all()&lt;br/&gt;bktray.show_all()&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;fwbox.connect(&quot;button-press-event&quot;, callback)&lt;br/&gt;stpbox.connect(&quot;button-press-event&quot;, callstop)&lt;br/&gt;bkbox.connect(&quot;button-press-event&quot;, callforward)&lt;br/&gt;plybox.connect(&quot;button-press-event&quot;, callplay)&lt;br/&gt;&lt;br/&gt;gtk.main()&lt;/address&gt;&lt;address style=&quot;padding-left: 30px;&quot;&gt;&lt;br/&gt;&lt;/address&gt;
&lt;p&gt;Maybe someone else can make it prettier, or just generally improve on it, but this will do me for now.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
			<pubDate>Fri, 11 Jun 2010 01:07:59 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/tech/squeezebox-controller/</guid>
		</item>
		
		<item>
			<title>No More Red Lights?</title>
			<link>http://www.kickingtyres.com/words/random/no-more-red-lights/</link>
			<description>&lt;div style=&quot;font-size: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; min-height: 200px; margin: 8px;&quot;&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.telegraph.co.uk/motoring/3228931/Car-gadget-may-spell-end-of-red-lights-for-motorists.html&quot;&gt;Car gadget may spell end of red lights for motorists – Telegraph&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Audi has invented a device which will allow motorists to avoid red lights, telling drivers what speed to go in order to arrive at traffic lights when they are green.&lt;/p&gt;
&lt;p&gt;To use a technical term… bollocks.&lt;/p&gt;
&lt;p&gt;A friend of mine is a traffic signals engineer and still can’t predict when the signals will change, on signals that he has programmed.&lt;/p&gt;
&lt;p&gt;“&lt;em&gt;Some lights run fixed times, SCOOT, Vehicle Activated, MOVA, CLF plans when the UTC comms are down, and often arterial reversion or even All Red at night. They switch timings according to time of day, traffic density, whether there is a bus coming, whether the bus is late, if there’s an emergency vehicle detection system fitted, and vehicle speed over the stopline.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Some have loop detection, some MVDs, some both, some occupancy loops, some hurry call loops, some speed differentiation loops, they have different extend and gap out values, and several sets are deliberately timed so if you run an amber at one light you’ll be running a very dark amber at the next one and get T-boned or GATSOd at the third.&lt;/em&gt;”&lt;/p&gt;
&lt;/div&gt;</description>
			<pubDate>Tue, 01 Jun 2010 11:54:56 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/random/no-more-red-lights/</guid>
		</item>
		
		<item>
			<title>Vat changes insignificant</title>
			<link>http://www.kickingtyres.com/words/random/vat-changes-insignificant/</link>
			<description>&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;The government’s latest budgetary tax cuts are insignificant.  They are claiming the VAT cut will save the UK consumers £3.8billion per year.  Considering the &lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://www.statistics.gov.uk/cci/nugget.asp?ID=6&quot; target=&quot;_blank&quot;&gt;UK population is 60,975,000&lt;/a&gt; (2007 figures), that means we’re saving, on average, £62 per year.  Hardly a great amount.  Granted, the overall population includes children and the like who have no spending power, but still, even if you double the savings, it’s still insignificant in the grand scheme of things.&lt;/p&gt;
&lt;p&gt;Add the increase in VED into the equation, and most families will be worse off. I admit my choice of car (alfa romeo 147 2.0) isn’t perhaps the most economical, but it’s hardly a sports-car and certainly isn’t a 4×4, and yet I’m looking at an increase in VED over the next few years from £210 to £550. That’s certainly going to wipe out any concession from VAT. The change in VED isn’t going to have any impact on the use of my car either, nor can I imagine it changing usage patterns for anyone else. Compared to the overall running costs of a car, it pales in comparison. If I was comuting every day by car, the £500 would be insignificant compared to the money spent on fuel, tyres and servicing. As it is, I use the car for weekends, and want something enjoyable, and so I’m always willing to spend a little more in that case. Either way, I don’t see car usage dropping.&lt;/p&gt;
&lt;p&gt;In addition, there is a &lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://www.petrolprices.com/blog/fuel-prices-to-rise-as-motorist-hit-with-p-duty-increase-106.html&quot; target=&quot;_blank&quot;&gt;hidden increase in fuel tax&lt;/a&gt;. In increasing the VAT on fuel by 2p, to offset the VAT cut, it might seem there is no change.  However, the VAT cut is temporary, and the 2p increase is permanent.&lt;/p&gt;
&lt;p&gt;Other changes, resulting in doubling the national debt have been branded “&lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://news.bbc.co.uk/1/hi/uk_politics/7747197.stm&quot; target=&quot;_blank&quot;&gt;reckless&lt;/a&gt;” by the tories.&lt;/p&gt;</description>
			<pubDate>Tue, 01 Jun 2010 01:05:53 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/random/vat-changes-insignificant/</guid>
		</item>
		
		<item>
			<title>KillaCycle electric-motorcycle sets new drag record </title>
			<link>http://www.kickingtyres.com/words/petrolhead/killacycle-electric-motorcycle-sets-new-drag-record/</link>
			<description>&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;&lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://www.killacycle.com/2008/10/24/new-world-record-at-bandimere-7890-second-also-174-mph/&quot; target=&quot;_blank&quot;&gt;KillaCycle electric-motorcycle sets new drag record&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The KillaCyle has again caused record-keepers to reach for their erasers with a world beating run of 7.890 seconds for the quarter mile at the Bandimere Speedway in Colorado&lt;/p&gt;
&lt;p&gt;It’s an amazing piece of engineering, and certainly makes the conceptof electric bikes somewhat more palatable to those who perceive electric power as somehow less fun, powerful or whatever.  However, while this machine is pushing back the boundaries of performance, I suspect it’s far removed from bringing effective electric power to two wheels in the practical world, where weight, chargetimes, handling and range are all important.&lt;/p&gt;</description>
			<pubDate>Tue, 01 Jun 2010 01:01:27 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/killacycle-electric-motorcycle-sets-new-drag-record/</guid>
		</item>
		
		<item>
			<title>Safe Riding in NSW</title>
			<link>http://www.kickingtyres.com/words/petrolhead/safe-riding-in-nsw/</link>
			<description>&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;This is a fun &lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://uk.youtube.com/watch?v=rHLXxf4cqlo&quot; target=&quot;_blank&quot;&gt;viral video&lt;/a&gt; campaign from the  &lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://uk.youtube.com/watch?v=rHLXxf4cqlo&quot;&gt;Motorcycle Council of New South Wales&lt;/a&gt; to attempt to heighten awareness and visibility of Motorcycles on the road. It certainly would do the job.  Would it get your attention?&lt;/p&gt;
&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;
&lt;object width=&quot;480&quot; height=&quot;295&quot; type=&quot;application/x-shockwave-flash&quot;&gt;
 
&lt;/object&gt;
&lt;/p&gt;
&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;And here’s the link to the original &lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://www.pleaselooktwice.com/&quot;&gt;motorcycle safety video&lt;/a&gt;&lt;a style=&quot;color: #5692ba; text-decoration: none;&quot; href=&quot;http://www.pleaselooktwice.com/&quot;&gt;s&lt;/a&gt;&lt;/p&gt;</description>
			<pubDate>Tue, 01 Jun 2010 00:59:30 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/petrolhead/safe-riding-in-nsw/</guid>
		</item>
		
		<item>
			<title>Wrong Licence</title>
			<link>http://www.kickingtyres.com/words/random/wrong-licence/</link>
			<description>&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;&lt;a style=&quot;color: #5692ba; text-decoration: underline;&quot; href=&quot;http://www.telegraph.co.uk/news/newstopics/howaboutthat/3285622/Poetry-group-banned-from-pub-by-council-on-health-and-safety-grounds.html&quot; target=&quot;_blank&quot;&gt;Poetry group banned from pub by council on health and safety grounds&lt;/a&gt; from the Telegraph&lt;/p&gt;
&lt;p&gt;The wrong sort of licence?&lt;/p&gt;
&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt;&lt;span&gt;Banning it is a bit extreme. Recommending they get the right licence, and giving a time limit within to get it would be a more acceptable and practical solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You’d think that common sense would  apply, and if they comply with the regulations for a singing/music licence, then it’s not as if the place is a complete firehazard or health and safety nightmare, and some lee-way would be allowed.&lt;/p&gt;</description>
			<pubDate>Sun, 30 May 2010 00:53:03 +0100</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/random/wrong-licence/</guid>
		</item>
		
		<item>
			<title>Start Your (merge) Engines</title>
			<link>http://www.kickingtyres.com/words/mysql/start-your-merge-engines/</link>
			<description>&lt;p&gt;A while ago, I'd written a bash script to handle the automated control of a table using the MERGE engine.&lt;/p&gt;
&lt;p&gt;The table originally held the log data from a mobile messaging service, and very quickly became far  too big to be easily manageable.  Since the application was provided by a third party, and I had no way of changing how it logged it's data, I devised this bash script to automatically reorganise a merge table to ensure the data was in manageable chunks.  This predates partitioning within MySQL, which would have been an ideal solution at the time.  However, there are still practical uses for the merge engine, so I've dug out the script for your enjoyment.  I'm sure it worked, as is, back in 2005, but I can't recall if this was the totally polished and final version, and I've also sanitised it to remove references to the company and the third party app. So, if it doesn't work perfectly, don't be surprised, but it is certainly a good starting point if you want to do something similar.  This script also handles the creation of the new tables, so you don't need to predefine the tables X years in advance.&lt;/p&gt;
&lt;blockquote&gt;&lt;address&gt;#/bin/bash&lt;/address&gt;
&lt;p style=&quot;padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin: 0px;&quot;&gt; &lt;/p&gt;
&lt;address&gt;####################################################&lt;/address&gt;&lt;address&gt;# &lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;Merge engine&lt;/span&gt;&lt;/span&gt; rotate and clean script. &lt;/address&gt;&lt;address&gt;# What do I do? &lt;/address&gt;&lt;address&gt;# Take latest week live  entries entries (till time on day script was run) &lt;/address&gt;&lt;address&gt;# and copy them into a new table.&lt;/address&gt;&lt;address&gt;# Modifies MASTER table (using “merge” storage engine) so it &lt;/address&gt;&lt;address&gt;# displays data for only last x weeks. All other weekly tables remain &lt;/address&gt;&lt;address&gt;# individually available. &lt;/address&gt;&lt;address&gt;# &lt;/address&gt;&lt;address&gt;# Executes as user: [whatever] &lt;/address&gt;&lt;address&gt;# Execution frequency: [stick it in your crontab. Weekly would be good]. &lt;/address&gt;&lt;address&gt;# &lt;/address&gt;&lt;address&gt;# Changelog: &lt;/address&gt;&lt;address&gt;# Initial state &lt;/address&gt;&lt;address&gt;# Version 1.0 &lt;/address&gt;&lt;address&gt;#####################################################&lt;/address&gt;&lt;br/&gt;&lt;address&gt;#####################################################&lt;/address&gt;&lt;address&gt;#Okay, before I begin, I need to know some stuff….&lt;/address&gt;&lt;address&gt;# How do I get into the database, and where do I go when I get there?&lt;/address&gt;&lt;address&gt;user=”xxxx”&lt;/address&gt;&lt;address&gt;passwd=”xxxx”&lt;/address&gt; &lt;address&gt;echo “setup login”&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;database=”dbname”  #the database i’m working with&lt;/address&gt;&lt;address&gt;tableprefix=”tablename” #the table that the live data is in&lt;/address&gt;&lt;address&gt;mergetable=”toptable” #the “merge” engine table&lt;/address&gt;&lt;address&gt;keycolumn=”id”  #the unique identifier in the live log table&lt;/address&gt;&lt;address&gt;logrotateday=”Monday” #the day I should rotate the logs&lt;/address&gt;&lt;address&gt;logretain=2 #how many weeks do we want under the merge table?&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;#Who do I send the “oh dear I’m not working” email to?&lt;/address&gt;&lt;address&gt;alert_email=”email@null.com”&lt;/address&gt;&lt;address&gt;echo “setup vars”&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;# Where do you want me to put the file with the table listing?&lt;/address&gt;&lt;address&gt;listpath=”/path/to/writeable/tempfile/” #path to mergetable listing file&lt;/address&gt;&lt;address&gt;listfile=”merge_tables.txt” #filename of mergetable listing&lt;/address&gt; &lt;address&gt;listfqp=”${listpath}/${listfile}” #file storing the merge tables&lt;/address&gt;&lt;address&gt;&lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #777777;&quot;&gt;mysql&lt;/span&gt;&lt;/span&gt;=”/path/to/&lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #777777;&quot;&gt;mysql&lt;/span&gt;&lt;/span&gt;/bin/mysql -u$user -p$passwd $database” # execute MySQL&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;# Where do you want me tell you about all the bad shit?&lt;/address&gt;&lt;address&gt;qrylogdate=`date +%Y-%m-%d` #date for use in queries.&lt;/address&gt;&lt;address&gt;errlog=”/path/tp/error_log_”$qrylogdate”.err”&lt;/address&gt;&lt;address&gt;echo “setup paths and files”&lt;/address&gt;&lt;address&gt;# If bad stuff happens, I’m going to do this…&lt;/address&gt;&lt;address&gt;function report_error(){&lt;/address&gt;&lt;address&gt;echo “Log rotation script exited” &amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;tail -n 10 $errlog | mail -s “log rotation script has failed” “$alert_email”&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;}&lt;/address&gt;&lt;address&gt;echo “running….”&lt;/address&gt;&lt;address&gt;####################################################&lt;/address&gt;&lt;address&gt;# Now I start doing stuff…&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;daytoday=`date +%A` #what day of the week is it?&lt;/address&gt;&lt;address&gt;#before any new tables are added, get the latest one.&lt;/address&gt;&lt;address&gt;lasttable=`grep “^$tableprefix” $listfqp | tail -n 1 | sed ’s/’${tableprefix}’_//g’`&lt;/address&gt;&lt;address&gt;newtable=$lasttable&lt;/address&gt;&lt;address&gt;oldtable=$lasttable&lt;/address&gt;&lt;address&gt;echo “${lasttable} , ${newtable},${oldtable}”&lt;/address&gt;&lt;address&gt;if [[ $logrotateday == $daytoday ]]&lt;/address&gt;&lt;address&gt;then&lt;/address&gt;&lt;address&gt;echo “It’s ${daytoday}! Lets create a new table.”&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;#Create new table. with _&amp;lt;var&amp;gt; suffix.&lt;/address&gt;&lt;address&gt;newtable=`expr $lasttable + 1`&lt;/address&gt;&lt;address&gt;echo “$newtable”&lt;/address&gt;&lt;address&gt;$mysql -e”CREATE TABLE ${tableprefix}_${newtable} like ${tableprefix}_${oldtable}” 2&amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;if [ &quot;$?&quot; != 0 ]&lt;/address&gt;&lt;address&gt;then&lt;/address&gt;&lt;address&gt;echo “failed at table creation” &amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;report_error&lt;/address&gt;&lt;address&gt;exit&lt;/address&gt;&lt;address&gt;fi&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;# get a list of all the archive log tables, and insert into the&lt;/address&gt;&lt;address&gt;# merge_log_tables.txt file&lt;/address&gt;&lt;address&gt;echo “Writing merge table listing to file”&lt;/address&gt;&lt;address&gt;$mysql -e”show tables like ‘${tableprefix}_%’” &amp;gt; $listfqp 2&amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;# parse file to take 6 most recent tables and create CSV list.&lt;/address&gt;&lt;address&gt;mergelist=`grep “^${tableprefix}_” $listfqp | tail -n 6 | awk ‘{ ORS=”,” ; print $0 }’|sed -e ’s#,$#n#g’`&lt;/address&gt;&lt;address&gt;echo $mergelist&lt;/address&gt;&lt;address&gt;# modify the master log archive table to use only the latest 6 log tables.&lt;/address&gt;&lt;address&gt;echo “altering $mergetable with new union list”&lt;/address&gt;&lt;address&gt;$mysql -e”alter table $mergetable union($mergelist)” 2&amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;if [ &quot;$?&quot; != 0 ]&lt;/address&gt;&lt;address&gt;then&lt;/address&gt;&lt;address&gt;echo “failed at master archive update” &amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;report_error&lt;/address&gt;&lt;address&gt;exit&lt;/address&gt;&lt;address&gt;fi&lt;/address&gt;&lt;address&gt;fi&lt;/address&gt;&lt;address&gt;# use a “select into” to copy all records inserted between the last entry in the&lt;/address&gt;&lt;address&gt;# archive, and midnight last night.&lt;/address&gt;&lt;address&gt;echo “copying data into ${tableprefix}_${newtable}”&lt;/address&gt;&lt;address&gt;$mysql -e”insert into ${tableprefix}_${newtable} select * from $tableprefix where id &amp;lt; (select max(${keycolumn}) from ${tableprefix})”  2&amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;if [ &quot;$?&quot; != 0 ]&lt;/address&gt;&lt;address&gt;then&lt;/address&gt;&lt;address&gt;echo “failed at ’select * into…..’” &amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;report_error&lt;/address&gt;&lt;address&gt;exit&lt;/address&gt;&lt;address&gt;fi&lt;/address&gt;&lt;address&gt;&lt;br/&gt;&lt;/address&gt;&lt;address&gt;# and delete this, and all preceding records from the live log.&lt;/address&gt;&lt;address&gt;echo “deleting copied data from $tableprefix”&lt;/address&gt;&lt;address&gt;$mysql -e”delete from $tableprefix where $keycolumn&amp;lt;=(select max($keycolumn) from ${tableprefix}_${newtable})” 2&amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;if [ &quot;$?&quot; != 0 ]&lt;/address&gt;&lt;address&gt;then&lt;/address&gt;&lt;address&gt;echo “failed at ‘deletion from live logs…..’” &amp;gt;&amp;gt; $errlog&lt;/address&gt;&lt;address&gt;report_error&lt;/address&gt;&lt;address&gt;exit&lt;/address&gt;&lt;address&gt;fi&lt;/address&gt;&lt;address&gt;echo “All done”&lt;/address&gt;&lt;address&gt;# All Done…  Bye bye&lt;/address&gt;&lt;address&gt;############################################&lt;/address&gt;&lt;/blockquote&gt;</description>
			<pubDate>Tue, 16 Feb 2010 01:14:57 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/mysql/start-your-merge-engines/</guid>
		</item>
		
		<item>
			<title>MySQL Replication Checker</title>
			<link>http://www.kickingtyres.com/words/mysql/mysql-replication-checker/</link>
			<description>&lt;p&gt;Rather than relying on the expire_log_days feature to ensure your replicating master doesn't fill up with obsolete binary logfiles, you can deploy this little SQL script.  It's a bit cheeky and dirty, but it works.&lt;/p&gt;
&lt;p&gt;You could use this to just keep your logs in check, or also for a system where multiple slaves are connecting to a master for periodic updates, and you can't be sure which databases are up to date or not.  Pre-requisites are that the databases, the slave at least, supports federated tables, and that both support scheduled events and stored procedures.  other requirements are that replication is statement based, and when the events are created, they have the status “slave side disabled” on the slave servers.&lt;/p&gt;
&lt;p&gt;A summary of the functionality is as follows:&lt;/p&gt;
&lt;p&gt;On running the SQL on the master, a “replication check” database, two tables, a stored procedure and 2 events are created.&lt;/p&gt;
&lt;p&gt;The tables hold the “heartbeat” information comprising the slave hostname and the timestamp of when the table was last updated.&lt;/p&gt;
&lt;p&gt;The hostcheck table is federated from the slave database onto the slavecheck table on the master, so the master's slavecheck table provides a reliable view of the last time the slave was updated.&lt;/p&gt;
&lt;p&gt;One 'heartbeat' event runs every 10 minutes, where any slave running the replicated query would update it's local hostcheck table with it's hostname and the current timestamp.  This, via the federated table, updates the master with the same data.&lt;/p&gt;
&lt;p&gt;The “replpurge” procedure runs daily, and purges all master logs before the lowest timestamp value (i.e. oldest) entry in the slavecheck table.&lt;/p&gt;
&lt;div&gt;It should be noted that the “slavecheck” table requires to be populated with the hostnames of all slave servers that are required to operate within this system, and a corresponding date value which is early enough to ensure the master logs do not get prematurely purged.&lt;br/&gt;The following SQL can be executed on any Master database, and when all slaves are “synced” it will automatically start working.&lt;/div&gt;
&lt;div&gt;          -- Start SQL&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;
&lt;div&gt;
&lt;blockquote&gt;DROP DATABASE IF EXISTS repl_check;&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE DATABASE repl_check;&lt;/blockquote&gt;
&lt;blockquote&gt;USE repl_check;&lt;/blockquote&gt;
&lt;blockquote&gt;GRANT INSERT,UPDATE,DELETE on repl_check.* to feduser@'%' identified by 'fedpass';&lt;/blockquote&gt;
&lt;blockquote&gt;DROP TABLE IF EXISTS `repl_check`.`hostcheck`;&lt;/blockquote&gt;
&lt;blockquote&gt;DROP TABLE IF EXISTS `repl_check`.`slavecheck`;&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE TABLE  `repl_check`.`hostcheck` (&lt;/blockquote&gt;
&lt;blockquote&gt;'hostname` varchar(255) NOT NULL,&lt;/blockquote&gt;
&lt;blockquote&gt;`time_stamp` datetime NOT NULL,&lt;/blockquote&gt;
&lt;blockquote&gt;PRIMARY KEY (`hostname`)  )&lt;/blockquote&gt;
&lt;blockquote&gt;ENGINE=FEDERATED CONNECTION='mysql://feduser:fedpass@master.server.host:3306/repl_check/slavecheck';&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE TABLE  `repl_check`.`slavecheck` (&lt;/blockquote&gt;
&lt;blockquote&gt;`hostname` varchar(255) NOT NULL,&lt;/blockquote&gt;
&lt;blockquote&gt;`time_stamp` datetime NOT NULL,&lt;/blockquote&gt;
&lt;blockquote&gt;PRIMARY KEY (`hostname`)  ) ENGINE=MyISAM ;&lt;/blockquote&gt;
&lt;blockquote&gt;SET GLOBAL EVENT_SCHEDULER='on';&lt;/blockquote&gt;
&lt;blockquote&gt;DROP EVENT IF EXISTS repl_check.replupdate;&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE EVENT repl_check.replupdate&lt;/blockquote&gt;
&lt;blockquote&gt;ON SCHEDULE EVERY 10 MINUTE DO&lt;/blockquote&gt;
&lt;blockquote&gt;REPLACE INTO repl_check.hostcheck (SELECT variable_value,NOW() FROM information_schema.global_variables WHERE variable_name='hostname');&lt;/blockquote&gt;
&lt;blockquote&gt;DROP PROCEDURE IF EXISTS repl_check.binlog_cleanup;&lt;/blockquote&gt;
&lt;blockquote&gt;DELIMITER $$&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE PROCEDURE  repl_check.binlog_cleanup()&lt;/blockquote&gt;
&lt;blockquote&gt;BEGIN&lt;/blockquote&gt;
&lt;blockquote&gt;DECLARE tstamp timestamp;&lt;/blockquote&gt;
&lt;blockquote&gt;SELECT min(time_stamp) into tstamp from repl_check.slavecheck;&lt;/blockquote&gt;
&lt;blockquote&gt;PURGE MASTER LOGS BEFORE tstamp;&lt;/blockquote&gt;
&lt;blockquote&gt;END $$&lt;/blockquote&gt;
&lt;blockquote&gt;DELIMITER ;&lt;/blockquote&gt;
&lt;blockquote&gt;DROP EVENT IF EXISTS repl_check.replpurge;&lt;/blockquote&gt;
&lt;blockquote&gt;CREATE EVENT repl_check.replpurge ON SCHEDULE EVERY 1 DAY DO&lt;/blockquote&gt;
&lt;blockquote&gt;CALL repl_check.binlog_cleanup();&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;</description>
			<pubDate>Mon, 01 Feb 2010 01:12:35 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/mysql/mysql-replication-checker/</guid>
		</item>
		
		<item>
			<title>MySQL Partition Management</title>
			<link>http://www.kickingtyres.com/words/mysql/mysql-partition-management/</link>
			<description>&lt;p&gt;&lt;span style=&quot;color: #41a317; font-family: 'MS Reference Sans Serif', Arial, Tahoma; line-height: normal;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;MySQL&lt;/span&gt; introduced partitioning with version 5.1, with alpha releases of 5.1.3 offering it available from December 2005. Since then, it’s  been developed further and with the relatively recent 5.2.41 release, many of the bugs and issues surrounding partitioning have been ironed out.&lt;/p&gt;
&lt;p&gt;One issue I’ve had some users come across relates to the &lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;partition management&lt;/span&gt; on a live database. How big do partitions need to be? how often do we need to repartition? What do we do with the “old” data? How can we make the management of partitions easier in general?&lt;/p&gt;
&lt;p&gt;I’ve addressed these questions with a &lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;stored procedure&lt;/span&gt; and by taking advantage of &lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;MySQL&lt;/span&gt;’s recent Event Scheduler.&lt;/p&gt;
&lt;p&gt;My example uses a MyISAM table, partitioned on a bigint column which contains a unix timestamp and an ‘archive’ table that contains the same structure but using a different storage engine, for long-term storage and archiving.  My Sample also automates the creation of the log table, and can be run as a “deployment script” to set up a logging database ready for use.&lt;/p&gt;
&lt;p&gt;First: create the log table:&lt;/p&gt;
&lt;blockquote&gt;&lt;address&gt;DROP TABLE IF EXISTS table_log;&lt;/address&gt;&lt;address&gt;set @qry := concat(‘CREATE TABLE table_log (&lt;/address&gt;&lt;address&gt;id int(10) unsigned NOT NULL AUTO_INCREMENT,&lt;/address&gt;&lt;address&gt;unix_time bigint(20) unsigned NOT NULL,&lt;/address&gt;&lt;address&gt;logging_stuff varchar(512) DEFAULT NULL,&lt;/address&gt;&lt;address&gt;PRIMARY KEY (id,unix_time)&lt;/address&gt;&lt;address&gt;) ENGINE=MyISAM&lt;/address&gt;&lt;address&gt;PARTITION BY RANGE ( unix_time) (&lt;/address&gt;&lt;address&gt;PARTITION  p0 VALUES LESS THAN (‘,unix_timestamp(now())*1000,’) ENGINE = MyISAM)’);&lt;/address&gt;&lt;address&gt;prepare stmnt from @qry;&lt;/address&gt;&lt;address&gt;execute stmnt;&lt;/address&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then, create the archive table&lt;/p&gt;
&lt;blockquote&gt;&lt;address&gt;DROP TABLE IF EXISTS table_log_archive;&lt;/address&gt;&lt;address&gt;CREATE TABLE table_log_archive (&lt;/address&gt;&lt;address&gt;id int(10) unsigned NOT NULL AUTO_INCREMENT,&lt;/address&gt;&lt;address&gt;unix_time bigint(20) unsigned NOT NULL,&lt;/address&gt;&lt;address&gt;logging_stuff varchar(512) DEFAULT NULL,&lt;/address&gt;&lt;address&gt;PRIMARY KEY (id,unix_time)&lt;/address&gt;&lt;address&gt;) ENGINE=MyISAM&lt;/address&gt;&lt;/blockquote&gt;
&lt;p&gt;And now the stored Proc:&lt;/p&gt;
&lt;blockquote&gt;&lt;address&gt;DROP PROCEDURE IF EXISTS partition_logs;&lt;/address&gt;&lt;address&gt;DELIMITER $$&lt;/address&gt;&lt;address&gt;CREATE  PROCEDURE  partition_logs(in tblname varchar(100),in partsize int,in lwater int,in hwater int)&lt;/address&gt;&lt;address&gt;BEGIN&lt;/address&gt;&lt;address&gt;DECLARE p_start_time bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_end_time bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_start_name bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_end_name bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_low_water bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_high_water bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_new_name bigint;&lt;/address&gt;&lt;address&gt;DECLARE p_new_time bigint;&lt;/address&gt;&lt;address&gt;DECLARE cnt int;&lt;/address&gt;&lt;address&gt;DECLARE deld int;&lt;/address&gt;&lt;address&gt;DECLARE partition_column varchar(100);&lt;/address&gt;&lt;address&gt;set partsize = partsize * 3600; — turn the passed partition size in hours, into the unixtimestamp.&lt;/address&gt;&lt;address&gt;SELECT cast((substr(partition_name from 2)) as SIGNED ) into p_start_name FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position limit 1;&lt;/address&gt;&lt;address&gt;SELECT cast((substr(partition_name from 2)) as SIGNED ) into p_end_name  FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position desc limit 1;&lt;/address&gt;&lt;address&gt;SELECT partition_description  into p_start_time FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position limit 1;&lt;/address&gt;&lt;address&gt;SELECT partition_description  into p_end_time  FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position desc limit 1;&lt;/address&gt;&lt;address&gt;SELECT partition_expression into partition_column from information_schema.PARTITIONS where table_name = tblname limit 1;&lt;/address&gt;&lt;address&gt;select unix_timestamp(date_sub(date(now()), interval lwater day)) into p_low_water;&lt;/address&gt;&lt;address&gt;select unix_timestamp(date_add(date(now()), interval hwater day)) into p_high_water;&lt;/address&gt;&lt;address&gt;set @plw := p_low_water;&lt;/address&gt;&lt;address&gt;set @tbl := tblname;&lt;/address&gt;&lt;address&gt;set @col := partition_column;&lt;/address&gt;&lt;address&gt;set @ins := concat(‘replace into ‘,@tbl,’_archive select * from ‘,@tbl,’ where ‘,@col,’ &amp;lt; ‘,@plw);&lt;/address&gt;&lt;address&gt;prepare instmnt from @ins;&lt;/address&gt;&lt;address&gt;execute instmnt;&lt;/address&gt;&lt;address&gt;select p_start_time,p_low_water;&lt;/address&gt;&lt;address&gt;set deld = 0;&lt;/address&gt;&lt;address&gt;while (p_start_time &amp;lt; p_low_water)&lt;/address&gt;&lt;address&gt;do&lt;/address&gt;&lt;address&gt;select p_start_time,p_low_water;&lt;/address&gt;&lt;address&gt;set @pstart := p_start_name;&lt;/address&gt;&lt;address&gt;set @droppart := concat(‘ALTER TABLE ‘,@tbl,’ drop partition p’,@pstart);&lt;/address&gt;&lt;address&gt;prepare dropstate from @droppart;&lt;/address&gt;&lt;address&gt;execute dropstate;&lt;/address&gt;&lt;address&gt;SELECT partition_description  into p_start_time FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position limit 1;&lt;/address&gt;&lt;address&gt;SELECT cast((substr(partition_name from 2)) as SIGNED ) into p_start_name FROM information_schema.PARTITIONS where table_name = tblname order by partition_ordinal_position limit 1;&lt;/address&gt;&lt;address&gt;set deld = deld+1;&lt;/address&gt;&lt;address&gt;END WHILE;&lt;/address&gt;&lt;address&gt;set cnt=0;&lt;/address&gt;&lt;address&gt;while (p_end_time &amp;lt; p_high_water)&lt;/address&gt;&lt;address&gt;do&lt;/address&gt;&lt;address&gt;set p_end_name = p_end_name + 1;&lt;/address&gt;&lt;address&gt;IF (p_end_time &amp;lt; p_low_water)&lt;/address&gt;&lt;address&gt;THEN set p_end_time = p_low_water;&lt;/address&gt;&lt;address&gt;ELSE set p_end_time = p_end_time + partsize;&lt;/address&gt;&lt;address&gt;END IF;&lt;/address&gt;&lt;address&gt;set @pendname := p_end_name;&lt;/address&gt;&lt;address&gt;set @phighwater := p_end_time;&lt;/address&gt;&lt;address&gt;set @alter_log :=  concat(‘ALTER TABLE ‘,@tbl,’ ADD PARTITION (PARTITION p’,@pendname,’ VALUES LESS THAN(‘,@phighwater,’))’);&lt;/address&gt;&lt;address&gt;prepare stmnt from @alter_log;&lt;/address&gt;&lt;address&gt;execute stmnt;&lt;/address&gt;&lt;address&gt;set cnt = cnt+1;&lt;/address&gt;&lt;address&gt;END WHILE;&lt;/address&gt;&lt;address&gt;select partsize as ’seconds’,p_low_water as ’start at’,p_high_water as ’stop at’,cnt as ‘partitions created’,deld as ‘partitions dropped’;&lt;/address&gt;&lt;address&gt;END$$&lt;/address&gt;&lt;/blockquote&gt;
&lt;p&gt;This procedure takes advantage of the partition information being held in the information_schema, and uses it to calculate the current, obsolete and new partitions.  it takes any “obsolete” data dumps it into the _archive table before dropping the partitions. In addition, it’s flexible enough that it can be called against any table that’s partitioned in the same way thus:&lt;/p&gt;
&lt;blockquote&gt;&lt;address&gt;call partition_logs(‘table_name’,[hours per partition],[number of days to retain],[number of days in advance])&lt;/address&gt;
&lt;p&gt;e.g. call partition_logs(‘table_log’,2,7,7);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;…will repartition the table_log table, dumping any data older than 7 days old into the archive table and removing those partitions, and will create enough partitions for the next 7 days where each partition is 2hrs in size.&lt;/p&gt;
&lt;p&gt;When called, the proc will also output some basic information on the specified partition size as well as how many partitions were dropped and created.  The only caveat with this procedure as it is, is that the “top” partition doesn’t use “less than max value” and has a hard limit.  This means that, if the procedure isn’t called when it should be, you may hit a ‘hard’ limit on the partitioned table where it won’t allow inserts due to the time integer being higher than the maximum partition value.&lt;/p&gt;
&lt;p&gt;With a scheduled event calling this procedure on a regular basis, you have a completely automatic &lt;span style=&quot;color: #5692ba; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;partition management&lt;/span&gt;&lt;/span&gt;system.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
			<pubDate>Thu, 14 Jan 2010 01:18:20 +0000</pubDate>
			
			
			<guid>http://www.kickingtyres.com/words/mysql/mysql-partition-management/</guid>
		</item>
		

	</channel>
</rss>
