Steve's blog

A blog about what's going on in Analysis UK...

Build Indicators revisited

Arduino controlled X-Mas tree.

Some time ago I posted about a USB Snowman build indicator, the problem with the first version was the USB IO board I used, its availability was limited and the output was designed as a current sink rather than source, so some modifications had to be made to the board, which isn’t really ideal.

Recently I came across the Arduino project, an open source hardware solution and one of the little Diecimila boards provides a perfect base for revisiting the build indicator. The SnowMan is still in use at home and I wanted one for work as well so I figured Id make another build indicator based on the Arduino.

Arduino Diecimila.

The 13 IO pins can sink or source up to 40mA which is ideal for driving the tri-color led used by the build indicator. The led requires 2 current sources and has a common cathode. The Arduino has a USB interface that provides normal serial port communications to the host PC so interfacing is easy as well.

This time instead of a snowman I decided to use a Xmas tree. They are very similar, basically a lump of plastic with a 5MM LED mounted inside. The Arduino provides multiple IO ports of which I’m using only two and the intention here is to provide some common functionality so that the device could be easily adapted to other forms of build indication (Switching relays, multiple project build indicators, other led’s, buzzers etc).

X-Mas tree as new.

Removing the base and replacing the led is a simple job, either use a flat screwdriver or use the cable exit to push off the base off.

X-Mas tree from underneath.

X-Mas tree base removed.

Pull out the led fitted into the tree using the cable. This is no longer needed.

X-Mas tree led removed.

Now glue the base onto the top of the box the tree is to be mounted on. Previously I used a black ABS box but this time I’m using a ice blue box and this has worked out much better for aligning the parts and seeing the led’s on the Arduino board (RX/TX when programming), and also appeals to the inner geek a little more now that the workings can be seen.

Plastic case with X-Mas tree base glued in place.

Drill a hole through the middle of the base so that it will line up with the middle of the x-mas tree. This is best done with the base stuck to the box as it holds it in place and ensures every thing lines up. The hole should be about 7-8mm so that the LED + resistors pass thought easily.

Hole through Xmas tree base and case.

Now we need to prepare the led. Using a standard Tri-Color led (I’ve used Red + Green) we need to fit a current limiting resistor to the supply legs. One for the red and one for the green component of the led.

Using the datasheet for the led the voltage drop across the red Led is about 2V, this leaves a drop of 3V across the current limiting resistor as it’s driven from a 5V source. I’m going to drive the Led’s at 30mA, so we will need a 100R resistor for the red Led.

The green led has a different voltage drop across it (3.4V) so we need to do the same calculation for that and again aim to drive it at 30mA which means we need a 53R resistor, as I only had a 56R resistor to hand I’ve used that which gives us about 29mA current flow.

The data sheet gives luminous intensity for both red and green at 20mA and the green is much brighter than the red so we may wish at a latter date to play around with the drive current to get a better balance when both red and green are on.

Trim the red and green legs of the led fairly short but leave enough to solder on the resistors and attach these. Next connect a cable to the other side of the resistors and to the common pin on the led. If you prefer you can attach the resistors to the Arduino connector and solder the cable directly to the led.

The Tri-color led.

I used 2 core screened cable as this happened to be what I had to hand and as it turns out by tinning the screen and soldering to the led common pin gives a good sturdy way to physically push the led into the socket in the tree (and pull it out again!). I also put a bit of heat shrinking around the connections to prevent them shorting out.

Led with resistors and wires connected.

Now we need the connection to the Arduino board, the led is connected to pins 12, 13 and GND. This is easy as they are all close together and as an added bonus the Arduino already uses an onboard led on pin 13 for status when starting up which means that the tree flashes when the Arduino is starting up, it’s easy to use other pins if you prefer.

I’ve used a standard 0.1" Molex connector (The type used for 3 pin PC fans), the PCB version is ideal, but soldering the led connecting wire to the PCB side and plugging it into the header in the Arduino rather than mounting it on a PCB.

Connector for the led to Arduino controller.

Led connector plugged into the Arduino.

Note that in the photo’s the red cable is actually for the green led and the blue one is for the red led. It doesn’t really matter a great deal which way round they go as long as you get the correct resistor matched up with the appropriate led. However the default in the firmware is that the red led is on pin 13 and green on pin 12.

Next drill some holes in the base of the box and mount the Arduino. Note that one hole is smaller than the others so I ended up using only 2 mounting points due to my lack of any 2mm bolts.

Arduino mounting points.

The advantage of using a translucent box is finding the place to drill a hole of the USB connector. I elected to use a cone drill and just have a circular cut out for the USB cable to go through, it doesn’t look all that professional but it was quick and it worked a treat!

Hole for the USB connector

Next it’s just a matter of screwing everything together.

X-Mas tree build indicator assembled.

A Green X-Mas tree.


I put 6 small feet on the base of the box as well. Why 6? With sticky feet one always falls off (especially with commercial products!) and then it rocks, with 6 you still have some stability to the device if one falls off.

Now all that’s needed is a little firmware to run the Arduino and some software for the PC to put it to use but that’s going to have to be the subject of the next posting(s).

Recent Site Outages

Apologies for the recent outages on a number of the Analysis UK websites, these included BookSwap.ws, Dollars2Pounds, Pounds2Euro and all the other exchange rate sites as well as this blog.

On Saturday the hosting provider had an explosion and fire at one of it's data centers hosting one of servers. Initial estimates that were given made it look like it would be quicker to leave the sites (it was a Sunday and their usually quiet on Sundays) and wait for the host to get the power back on.

Unfortunately it didn’t resolve that well, after many hours of delays some power was restored but floor 1 had even more damage than was anticipated and power was much slower at being restored, this unfortunately eat into most of Monday (UK time), however Monday evening all was back and well.

I got home Tuesday tonight to find yet another apology from the company saying that this time the generator powering floor 1 had failed and they were sourcing a new one, this took a significant amount of time, especially given how much they like to state N+1 redundancy (i.e. a spare generator should have been to hand anyway). Updates were slow, uninformative, vague and at the point of being misleading – I’ve have yet to see any photo's of anything as well. Eventually power returned at about midnight UK time on Tuesday/Wednesday, so fingers crossed nothing else can go wrong in this world class N+1 redundancy data center!

Sincere apologies to all those affected, this one is going firmly into the experience category and I’m extremely unhappy this has taken so long to resolve, I will look to do more to improve this and hopefully The Planet will learn and improve (if they have any customers left after this!).

I read on GoDaddy some time ago about a problem they had and that they didn’t have geographical redundancy, if your running a serious e-commerce operation and have enough cash for some spare servers get them now and with a different host in a different [part of the] country.

BTW - If you have .co.uk domain names with GoDaddy be sure to renew them extra early as they claim they have to renew them at least a month early, then before the 20th of that month (unless I was getting some BS from the customer support as to why they canceled 4 of my domains over 1 month before the renewal date!).

Mid May Madness

Now the summers on its way I’m sure you want to be spending less time watching your computer start and more time enjoying the better weather.

So for a limited time I’ve reduced the price of LazyLoad from $29.99 to $9.99. Why not take the opportunity to purchase LazyLoad at the special price of $9.99 and reduce the amount of time your staring at a computer waiting for it to be usable.

I’ve also introduced some extra purchasing options, for home users a family pack provides a great way to get LazyLoad on every machine in the house, for commercial users I’ve added some site license options.

About 7 months ago I launched LazyLoad and at the time I intended to write a short blog post to talk about it. Well 7 Months latter I’m finally getting their, me and blogging just are not getting along.

LazyLoad is designed to take the strain from you computer whilst it starts. Simple really! When you buy a new computer it’s always nice and quick, then years latter you’re reduced to sitting waiting for it to start up and become usable.

One of the main culprits of the slow start is all the programs that start when Windows starts. Have a look at your notification area (bottom right of the screen), just how many programs have you got running in the background – lots? Chances are that each one of these starts when Windows starts.

What happens when Windows Starts? Once you’ve logged in then all of the programs in your Startup folder get started along with those listed in a special part of the Windows registry. They all get started at about the same time, this becomes a problem as they all need to be loaded from disk, they all need processor time to run, they all need to be put somewhere into the system memory.

One of the major problems with this becomes the hard disk, to load all the programs the head in the hard disk needs to move to the track the programs stored on and read the data. At the same time another application is asking for it’s data from a different area and so the head has to move again to the new location, possible not having completed the first request, so in the end the hard disk is shuffling the head back and forward over the disk to find what it needs.

To reduce the strain on the hard disk and provide a smoother startup LazyLoad allows you to schedule the loading of your applications a specific time after your computer has started. By stopping all the applications from loading at once the system is able to concentrate on a few specific tasks and get these done quicker – the net result is your machine becomes usable much earlier.

LazyLoad is free to try for 30 days so if you’ve not already tried it then download a copy. If you like it then purchase if license whilst it’s on special offer.



Earthquake – in the UK!

Minor tremors felt here in Cambridge, thought I was going crazy and fired up Twitter to see other reports, news starting to come through on sky news sometime after.

Turns out I wasn’t imagining things! Apparently 4.7 on the Richter scale.

Unusual to get this in the UK. Only minor here in Cambridge, like a helicopter flying over the house and the only thing to shake was me and the study lamp!

Just woken up and want to get your PC fired up quickly to check out Sky News, BBC News or Twitter? Waiting for lots of background applications starting that you don’t need and just want to fire up a browser quickly? Check out LazyLoad to delay the stuff you don’t need immediately so you can get started sooner.

Putting the SnowMan to work : Cruise Control .Net Build Status Monitor.

So X-Mas has long gone (well at least at the time of writing) and I’m left with two issues, first I want to monitor the status of my builds easily, secondly I have some left over USB SnowMen.

Their can be only one thing for it. Time to get the screw driver and glue out and turn the snow man into a build status indicator.

Now idea’s like this are far from new, I’ve read of teams using Lava Lamps to indicate the status of their builds and the latest sources of CCTray show signs of X10 control, Jeff Atwood covered the subject using a BetaBrite LED sign, Mike Swanson used an Ambient Orb and Scott Quibell has used the Dell XPS Leds as a build monitor.

So now for my addition to the world of varied build monitors, what else but a color changing snow man!

A Good build and the snow man is green:


Building the Application the snowman goes yellowish (Green+Red):


Failing the build the snowman goes red (Don’t mess with an angry snowman!):



This gives a nice feedback on the build status, doesn’t require the addition of mains electric (it’s USB powered), and doesn’t rely on X10 which I’ve found to be problematic in a work environment due to mains born noise and it’s a bit of a weird thing so always good as a conversation point.

The parts required:

A USB SnowMan about £6.

A USB Mini-Bee IO device or something similar that can source 2x 25mA outputs. (£25)

A small box,

A Red+Green 5mm TriColor LED (£0.25)

Some cable and some glue.

In the next blog posting I will describe construction (well modification really) of the hardware and the one after that the simple mods to CCTray to kick the snowman into life.

Pound breaks the 2 Dollar point.

Today the Pound has broken the 2 Dollar exchange rate, this is apparently a 15 year high for the Pound against the US Dollar.

Don’t forget if you want to check out the exchange rate on your mobile phone or other mobile devices you can browse to D2P.mobi, Dollars 2 Pounds for your mobile.

Screen shot from Dollars2Pounds showing todays rate above the 2 dollar point:

Pound touches 14 year high against US Dollar

The BBC is reporting that the Pound reached a 14 year high against the US Dollar during Monday.

I don’t have 14 years worth of data in the Dollars2Pounds exchange rate database, but here’s a chart of what the last 5 years looks like.

(Apologies for the Y axis label problem, Excel has decided not to allow me to show the full label – I have no idea why, I’ve tried allsorts).



I'm currently working on adding charting to Dollars2Pounds.com, however this is in a big queue with lots of other things I need to be working on so isn’t happening as quickly as I would like – it’s also reliant on me finding a charting package that I like, and I’ve not had much luck so far.

If you want to play with a chart in Excel your self you can use Dollars 2 Pounds exchange rate history page and Excel’s Web Query.

From Excel select :
Data -> Import External Data -> New Web Query

In the Window that opens enter the Rates History URL.
(http://www.dollars2pounds.com/RatesHistory.php?Base=USD&To=GBP&Days=60)



Select the arrow pointing to the date title of the rates table, it should turn to a tick



Click on Import, select where to import the data to in the Import Data window and wait whilst Excel gets the data.

Your spreadsheet should now look something like:




Now, if like me your in the UK, it’s a great time to buy software, components, domain names and the like from US sources as everything’s practically half price!.

Please remember the actual exchange rates you receive from your credit card, money transfer or other currency conversion will differ from the rates published, please check the rate offered by the company converting your currency first and remember that conversions are an approximate indication only and cannot be guaranteed by Analysis UK.





Implementing GTD SOP #2 with the help of Dinner Timer Lite.

Once again Bob has a fantastic suggestion to help us get things done on his ToDoOrElse.com blog, the basics of GTD SOP #2 are that you spend 48 minutes working with an allowance of 12 minutes slack time every hour (although I’m hoping this doesn’t apply to 24 hours a day – although it sure feels like it sometimes!).

Every now and then I find another use for Dinner Timer Lite. Today is no exception, with some very simple modifications to the settings Dinner Timer Lite makes a great timer for GTD SOP #2 (IMHO!) - not to mention that the timer Bob recommends is out of stock at Amazon.com as I type this and Dinner Timer Lite is available as a free download!

Dinner Timer Lite is a free PC based timer originally intended to help me reduce the number of meals I burnt because I returned to the PC to work and forgot to set the timer in the kitchen or when I did it went off and I kept working thinking I would just do another 30 seconds when it was really 5 minutes extra.

Configuring Dinner Timer Lite for GTD SOP #2



From the main menu choose Settings -> Options.

On the General Options tab set the following:

Default timer run time : 60 min.
End point close warning time : 12 min.
Over end point first warning time : 4 min. (or as you feel appropriate)
Secondary over end point warning : 8 min. (again as you feel appropriate)
Stop all notifiers after end point: 10 min.



That has set up the timer to run for 60 minutes by default, warning me 12 minutes before the hour is up (i.e. 48 minutes after the start), then again warning me at the end of the hour, combined with two possible over run warnings at 4 and 8 minutes in case I keep slacking! – as if that would happen! and a stop at 10 minutes in case I have wandered away from the PC.

Naturally when you are working you don’t want to be clock watching but you might just want to see how long till you get some slack and at the same time it’s good when your slacking to see how long you have left so lets setup the opacity of the timer.



The settings here are :
Timer stopped : high visibility.
Timer running : Low visibility.
48 Minutes up : good visibility.
Time up : high visibility.
Over run slacking : full visibility.

Getting notified:



The current release version of Dinner Timer Lite features 2 styles of notification (future versions have some more notifiers currently being written).

Here are how I have configured Dinner Timer Lite :

Select both bubble and sound notifiers on the notifiers tab.



Click Bubble Notifier then the Edit Settings button to open the options for the bubble notifier.




From the top drop down box work your way through the various options, setting the Action as Run Once or Don’t Run where you don’t want a bubble to appear.

The text will appear in a bubble pop up from the system tray area when the appropriate event occurs.

Started : "Timer started"
Stopped : "Timer stopped"
EndPointClose: "Slack Time, you now have 12 mins slack time to surf and make a cup of Tea!" (This event is the one set to occur 12 minutes before your hour is up).



EndPoint: "Time to get back to work – remember to restart Dinner Time Lite" (occurs when the 60 minutes is up).
EndPointMissed1: "Stop slacking and get back to work"
EndPointMissed2: "That’s enough slacking you won't get anything done"

Naturally you may wish to change the messages for ones that are a little more motivational (or polite)!

Next set up the sound notifiers in a similar way. I would suggest you use a sound on the start event so you know for sure that the volume is working when you start the timer!

When setting the sounds use the Run Once or Run Twice Action options otherwise the sound will keep going until you stop and that would likely ruin your 12 minutes of slack time!



You can choose your own sounds if you don’t like any of the built in ones, they were chosen to get attention. Sound Rangers is a great site to get a variety of sound effects from.

If you don’t want sound notification or bubble pop up then unselect that notifier.

NB: sound configuration and notifier selection changes only takes effect when the application is restarted for Version 1.0

That’s it for configuration of Dinner Timer Lite, next let’s put it to use.

Using Dinner Timer Lite:



Returning to the main window we see the 60 min default value in the drop down in the menu strip. If you want to work longer (or shorter) change the time here, but you will still only get 12 minutes slack time (sorry!)



When you are ready to start working hit the Start button.



The timer updates to show the time remaining, the start and completion times and how long the timer is running for, as well as a progress bar showing oddly enough the progress through the hour.

The timer also updates it’s transparency to the low visibility state (not shown in the screen shot), clicking on the minimize button sends Dinner Timer Lite to the tray, hover over it to get the time remaining for the hour. When it’s slack time we get prompted with a balloon from the system tray and some weird noise from the speakers, then when it’s time to get back to work more balloons and noises!

When you’ve finished your slack and are ready to start back remember to hit Stop and then Start again to start the next hour. And if you were slacking more than you should have been the timer keeps counting past the hour so you know how much work you skipped.

Cooking dinner whilst working.



Naturally if you are like me and stick some food in the oven and return to the computer to get a bit more work (ok, slack) done then just start up another Dinner Timer Lite and set the timer to run for how long your food needs cooking whilst the other GTD SOP #2 timer is running, however be warned that the settings will now be to warn you 12 minutes before dinner is ready as the settings are global.

Other uses of Dinner Timer Lite?


If you have found Dinner Timer Lite useful for timing something that you thing others would also benefit from then drop me a line, post a comment or something and I will look to add details about it and see if some simple improvements to Dinner Timer Lite can make it a better product.

Demon regrade fiasco : Day 34

Today I received a very nice and apologetic letter from Demon in response to my complaint I sent them on Day 16. The letter basically stated that my comments have been noted and my suggestions will be considered along with a lot of the usual reasoning for the FUP.

One thing that gets me is I still don’t see how the implementation that Demon have taken for the FUP will work. It’s measured over 30 days, so month 1 you download everything in site, get all your Amazon unboxed downloads, update your Napster tracks, catch up with the latest updates on C4’s broadband download and BBC 2’s downloads, Sky by broadband so on and so forth and you can easily go well over the download limit, I get the impression I could just leave the PC on downloading day and night on my 6Meg (should I say, up to 8Meg) connection, then next month you get capped so you spend the month doing little and picking up your email, follow that with the month after then you could hammer the connection again.

Now if I was to do that the FUP would work for every other month but be completely pointless for the high bandwidth months. Now granted the FUP worked for me and got me onto a more expensive account as I’m sure it will have done for a lot of others, but this package is three times the regular package so I’m sure lots of people will save their downloads for every other month and rack up high bandwidth usage then, how is that going to help Demons other customers who share the exchange? I don’t think it is. If it was capped after the FUP limit for the rest of the month that would have a much more helpful impact on the other customers. Anyway, I’m sure it will all sort it’s self out.

Now just to help matters, not only did It take a total of 17 days from the date I ordered the regrade but had I have been a new customer I would have got a free modem and free installation and it would probably have been done a lot quicker, however because I’m a loyal Demon customer I got no modem and a £40 bill for the pleasure – Demon you sure do know how to rub salt into a wound!

OK, now hopefully that’s all behind me and I can get on with business and surfing, lets just hope I have no reason to contact customer support!