Spindicator Mk 2–Now With Fade Effect.


I’ve had a couple of questions asking about using capacitors to fade out the  LEDs of the spindicator to give a sort of trail effect, and I thought I’d like to try it myself. So let’s get straight to the circuit.

Spindicator with Fade

The first thing to note is that in this version I have used the computers 12V supply, not the 5V supply as in the original spindicator. This is necessary to obtain a good fade effect from the capacitor.

The motherboard interface and low pass filter are the same as in the original circuit. The difference is that the counter’s outputs now switch  general purpose NPN transistors (a BC 547 in this case). When a transistor switches on, its associated LED is lit via the 1k Ohm resistor, and the 47uF electrolytic capacitor charges. When the transistor switches off, the capacitor discharges via the 1k Ohm resistor and LED, fading the LED as the charge dissipates. The fade time is a function of the values of the resistor and capacitor; the larger the values the slower the fade. The resistor is also the current limiting resistor for the LED, so that sets a limit to its value (between 470-1000 Ohms for most LEDs). What I found with breadboard testing is that if the fade time is too long, the whole spindicator ring lights when there is lots of disk activity, and you lose the spinning effect. I found that a 47uF capacitor gave a noticeable but suitably quick fade to each LED.

A challenge I faced with this circuit is that it has many more components than the original spindicator, with an extra 10 capacitors, 10 transistors and 20 resistors. The prototype board and patch wires approach would be too big and messy, so I decided to make my own PCB. With some trial and error I managed to get a reasonable result by laser printing (Brother HL-2170W) a design onto some Canon glossy photo paper (GP-401) and using an iron on its hottest setting to transfer the toner to a blank copper circuit board. It required some hard pressing to stick the print to the board, and then more working over the areas where the traces were with the tip of the iron. What I found though is that the paper then pulled away cleanly, leaving the traces stuck to the board. There was no mucking around soaking off the paper in water as others have reported when using this technique. If some of the traces pull off with the paper, you can just clean the board with some xylene based brush cleaner and try again with a fresh printout.


The above photo shows my copper board with its toner transfer sitting in the ammonium persulphate etching solution. You’ll notice some rough edges on the left hand ground trace, but there was enough cover left so I didn’t bother to print it again.

The end result, with components all soldered in is shown in the photo at the beginning of this post. I’ve connected all the LED cathodes together (not shown) so that there is only one common cathode wire and 10 anode wires running to the LEDs. I have not yet installed this spindicator – I’m waiting for the next time I’m doing some work inside the server (probably when I upgrade to WHS 2011).

Here’s a quick video of the spindicator mk.2 working at a constant clock frequency of about 25 Hz. The background sound in the video is rain on my workshop roof.

Make Your Own iPad Stand


Percy admires the stand

UPDATE: I have added a new post with more construction photos and a slightly modified stand design here.

Here’s a simple woodworking project that I thought might be of interest to iPad owners . When I recently purchased my iPad 2 I decided to forego a “smart cover” in favour of a  leather sleeve from Saddleback Leather. To complement the sleeve I decided to whip up a wooden stand.  The design I came up with is easy to make with only three glued-together parts, as I describe below.

I made mine from white oak. Start by milling a two lengths of board, one to about 22mm thick (could be a bit thinner depending on what you have), the other to 7mm thick. I milled 300mm lengths of each as that’s about the minimum I can put through the thicknesser. The base part is made from the thicker board, and the upright from the 7mm board. The thicker board should be at least 110mm wide, and the thinner board should be cut to exactly 100mm wide.

Ultimately you want to end up with the three pieces, which have the following profile when the stand is viewed from the side. Note that the base pieces are being viewed end-grain on, so really their length is 100mm, not their width, but you know what I mean.

ipad stand plan

N.B. These measurements are for an iPad 2, NOT a first generation iPad. The width of the slot (9.5mm above) should be increased to 14mm for the original iPad.

These parts will be glued together to make the stand as shown below.


For the base parts, straight cut a 100mm length of the thick board. It should be exactly the same length as the width of the thin board. What I did was finish the thin board to 100mm wide first, then used that as a template to set the cut distance for the thick board. Now you should have a base block which is 100mm long, at least 110mm wide and 18-22mm thick.

The next job is to rout the 5mm deep slot in the base. I suggest doing this before you make the angled cut which divides the base into two pieces. Using a table router is easiest. Cut the slot along the grain of the block, 10mm in from the front edge. Cut the slot about 14mm wide (18mm for iPad 1). This allows room to get the saw blade in for the angled cut. Mark a cutting line on the base of the slot 9.5mm (iPad 2) or 14mm (iPad 1) in from the front of the slot. Set the blade angle of your compound mitre saw to 14° and cut along the cutting line to make the front piece off the base. Make sure you’re cutting the angle the right way. The corresponding angled edge on the back part of the base will have some left-over slot cut in it, so trim it off using the angled saw. Now flick the back part around and cut the rear face at the same angle so that the long edge is about 70mm as shown in the drawing above. Keep the off-cut, as you’ll need it for the glue-up.

Lastly, with the saw still set at 14°, cut the thin upright board to length (165mm). Pre-sand the parts prior to gluing.

To glue the parts I sandwiched them between two lengths of wood as shown in the picture below. This is where you need to put the off-cut from the back of the base into the sandwich (don’t glue it of course) in order to make a vertical surface at the back.


Finish the stand as you please. I went for a dark warm-brown finish using a reddish dye followed by a mix of red-brown stain and a dark brown stain sealed with amber shellac and finished with satin polyurethane.




Finally, the True Ultimate Hiccups Cure.


A while ago I stumbled upon a sure-fire way of quickly getting rid of the hiccups. Before that I had been advised of, and tried many of the well known “cures”, all of which I had found to either totally fail, or be at best inconsistent in efficacy. You know the ones; slowly drinking water, drinking warm water, breathing into a paper bag, scaring them away (how do you actually do that?), holding your breath, filling your lungs and swallowing, and so on.

Thinking that maybe my method would probably be well known I performed a Google search. There certainly are a lot of methods discussed. I even found two I haven’t tried; eating a teaspoon of sugar or putting your fingers in your ears, but interestingly I could not find my method. So here at last, for all of you hiccups sufferers, I will reveal the true, ultimate, sure-fire hiccups cure (that doesn’t involve cutting your head off)…

To cure hiccups, stand on your head.


No kidding, this really works. Just do a head stand for about half a minute until you’re sure they’re gone. If you’re not skilled in yoga like the women in the photo, just put your head on a cushion and do  a three point headstand against a wall for support. It’s easy and fast, and helps with headaches too! Others may wonder what you’re doing, but it doesn’t look nearly as odd as hyperventilating with your fingers in your ears.

A Quick Wooden Computer Case


I recently decided to build a wooden computer case, despite the fact that I’ve never really liked wooden computer cases. The project came about because I realised that I had enough spare computer parts in my cupboard to build a reasonable computer. I don’t have room for another computer in the house, so I decided to build one for the garage. The plan was to make the computer as cheaply as possible from spares; the problem was I didn’t have a case to put it in. I thought about buying a cheap case, but in the end decided that since it was only for the garage I would whip one up out of plywood.  So that’s what I did. It’s not a particularly interesting project, it’s a simple wooden case with fairly boring parts inside, but I thought I’d put up a few pictures and notes anyway in the hope they may be of interest to others who may be thinking about building a wooden case.

I made the case from 12mm thick plywood. I went looking for a sheet of the usual pine ply, but was talked into an even cheaper sheet of poplar ply with hardwood veneer. I wondered about the quality of the ply (rightly so as it turned out), but bought it anyway. The problem with the ply was that the veneer is about 0.1mm thick and chips and flakes off with the making of every cut and hole. In addition, most cut edges (which I had planned to leave exposed) have gaps where there are missing bits in the laminated layers. It would probably be fine for making a door panel fitted in a frame, but was not a great choice for this project. I ended up covering the edges and using a dark stain to hide the chipped veneer, which worked out reasonably well.


Here I’ve cut the side on which the motherboard is mounted. I’ve added another square of 6mm ply under the motherboard in order to lift it up a bit more. This moved the cut-out for the connector plate further away from the edge of the back board, making it easier to cut. The block of wood beneath the motherboard is a spacer for the power supply, also used to move it away from the side.



As I did with the server cabinet, I used small rubber grommets as stand-offs and screwed the board down to the plywood.



There were a number of slots to cut, all of which I did with a router using wooden templates and a template guide on the router. This is the slot for the connector plate. I was able to use plywood offcuts to make templates since the perfect template thickness for my router guide is 12mm. You can see in the photo that for square or rectangular holes like this I just mark out the hole size with template offset added (two times the distance between the edge of the the template guide and the edge of the router bit), and then plunge cut the hole in the template with my drop saw. It’s quick and easy and makes a perfect square (or rectangle). The fact that the cuts extend beyond the bounds of the hole does not matter. Because I’m cutting right through the board here, I’ve placed another sheet of scrap ply underneath to stop the router cutting the table. I recommend making several shallow cuts, as cutting the full 12mm all at once is too much for the router.



And here’s the back of the case with all slots cut. I try and make very careful measurements (vernier calipers are indispensible for projects like this), but even so, the perfectly snug fit of the metal connector plate was a pleasant surprise. You can see that the router bit leaves rounded corners. These can be squared with a chisel, but I just left them as they were. The large hole is for the power supply, which will sit at the bottom of the case. It seemed easier to put it at the bottom rather than have to construct a sturdy shelf at the top, however it does make cooling more of a challenge.



This photo shows the PSU cut-out from the back. The PSU hole has a recess on the inside into which the PSU fits. This helps secure it. To cut the recess, I made a template to cut the exact outside size of the PSU when using a 12mm router bit. I then cut the through hole with a 6mm bit, which made it 6mm smaller than the PSU in each direction. Keeping the template in place, I switched to the 12mm bit and cut the recess to a depth of 7mm.



In this photo I’ve glued the back and base to the side and temporarily installed the motherboard to assist with positioning the hard drive and PSU. I only intend using the one hard drive, which is held in place with a simple friction restraint (a “Z” shaped metal bracket screwed to the base board). The drive sits on a rubber pad to reduce vibration, and will eventually be earthed to the motherboard with a wire.

I guess I should say something about the hardware. The mother board is an Intel D975XBX2, A.K.A  “Bad Axe 2”. I actually won it in a computer mag competition, along with some other parts. I used it for a while in a computer, and found it to be a difficult board to overclock, although stable at the right settings. The processor is a Core 2 Duo E6600, one of the original Core 2’s. The first Core 2 I bought was an E6600, but I later sold it. The only piece of hardware I didn’t have for this build was the CPU, and CPUs compatible with this board can no longer be purchased new. I found a reasonably priced E6600 on an auction site. The guy even threw in the custom “Freezer Pro” cooler, which I don’t think is a great cooler, but probably better than the stock job (I’m a big fan of the Thermalright ultra-120 extreme CPU coolers). My preferred hard drive brand is Western Digital, and luckily I had a spare WD 500GB drive for the build. Most of my data is stored on my home server, so my client computers only need one modest drive. With regard to drives, I decided to go all futuristic and not include an optical drive. Actually, it’s probably more that I wanted to keep the case as simple and compact as possible. It isn’t as hard to cope without an optical drive as you might imagine. I now buy and download most software and music etc. from the internet, and software on DVDs can easily be transferred to a USB flash drive on another computer. That’s how I installed Windows 7 on this machine. The graphics card, not installed in the photo above, is an Nvidia 8800GT with a nice quiet aftermarket cooler.



I spent a while thinking about how to fit ventilation fans to the case. Because the computer will be operated in a potentially dusty environment I did not want the case to be under negative pressure. I decided that two 12cm intake fans would do the job, one on the top feeding air to the CPU cooler and RAM, and one at the front blowing across the hard drive. The fans would need  filters which could be removed from the outside, as this case will not be as easy to open up as a metal one. My solution was to cut an 110mm diameter circular hole with a jigsaw, then rout two recesses on the outside face. The first recess was a circular 130mm recess centred over the hole and cut to a depth of 8mm. The second was a 134mm square recess centred over the hole and cut to a depth of 6mm. The result is shown above. To make a grill to retain the filter cloth, I cut the bottom out of a small garden sieve and trimmed it to fit into the circular recess. This is held in place with some hot melt glue. I then positioned the fan over the hole and marked, drilled and countersunk the holes for the fan retaining bolts. I chose bolts with countersunk heads so that they would be flush on the outside. Over all this went a square of filter cloth (vacuum cleaner motor filter), cut to fit into the square recess.



Finally, I made a removable wooden grill from some 5mm think strips of pine. The grill was sized to fit into the square recess, and was screwed down over the cloth with four pan head screws as shown. The panel on the left is the front panel, the other is the top panel. On the front panel you can see that I’ve also drilled out a 16mm hole for the power switch, and above that a 3mm hole for the power LED. The thread on the power switch was not long enough to go through 12mm of ply, so I recessed an area behind the switch hole with the router.



In this photo it’s all starting to come together. I’ve fitted all parts, installed Win 7, and am testing the system stability with Prime 95 whilst monitoring temperatures with Everest (two invaluable programs for the computer builder). You can see the little white power LED above the switch. As well as the left side of the case, I decided to also make the top panel removable. This makes it easier to replace the top fan, and to remove the motherboard. To secure the top panel, I screwed it to a wooden rail which I glued near the top of the three fixed sides. The removable side panel also has a wooden rail glued around the inside. Three of the top screws (missing in the above photo) screw into the side panel’s rail, helping holding the side on. I decided to make more of a decorative feature of the screws by using cup washers.



There are a couple of things to note about the back. Firstly, you’ll notice the wooden plug in the end of the video card slot. I had to make these slots a certain length in order to be able install and remove the cards. The metal return on the card bracket sits on the edge of the ply, which stops the card from rotating downwards. However, because of the slot length, when you plug in the cable, the pushing tends to rotate the card out of its slot. To stop this I made a tight fitting removable plug. The second thing to notice is the aluminium strip screwed over the lower slot. Ultimately the slot above it got one of these too (note: the blue light is from LEDS on the front fan – not intentional, it’s just that I had this fan going spare). I cut these two slots because among my spare parts I had a WiFi card and a Creative Audigy sound card. Once I got the thing powered up I quickly learnt several things: Firstly, useful WiFi reception was not available in the garage, secondly the WiFi card was not compatible with Win 7, and thirdly, despite Creative’s Win 7 drivers, the Audigy card did not work at all well with Win 7. Ultimately I decided to extend wired LAN to the garage, and use the motherboard’s built in sound chip (at least for now). The slots were thus superfluous, and were covered up.



Another shot of the back. Here you can see the small white reset switch. I installed it into a recess so that it is flush with the back. I hoped that this would help avoid accidental pushes.



This photo shows two more modifications. Firstly, I found that things were a bit warm because hot air could not easily escape the top of the case. There’s a reason why most cases have the PSU at the top. The solution was to cut some top vent holes in the removable side. These have some mesh behind them to discourage spiders. Secondly, I found that the removable side needed to be held in by screws at the front and back as well as top and bottom. The wood had a tendency to bow out otherwise. I thus added a row of screws down the front and back. The back and underside screws are just normal countersunk screws.



Then I decided that the exposed plywood edges were just too shabby, and milled some thin strips of pine to glue over them, which is what’s happening in this photo. I didn’t bother with the edges at the back.



And so to finishing the case. I had to strip everything out again in order to sand, stain and varnish the case. I started with this light brown stain, but ultimately decided to go for a dark brown finish, better to cover up the veneer chips.



Here’s a shot of the case inside. You can see the wooden rail below the top edge. I’ve also added another strip down the front inside to take the decorative front screws.



And here’s the inside with everything refitted and ready to go. Notice the wooden stop screwed in behind the PSU to stop it from moving backwards. The PSU hold down “Z” bracket is screwed into this stop.



Finally, the end result. Stained dark brown and finished with four coats of polyurethane. I must say that it ended up looking better than I imagined.

The HP monitor is one I repaired.  One day after a few years of use it started smoking alarmingly. I wrote it off as dead, but didn’t throw it out. Eventually I did some research, and with a few dollars worth of parts ordered online, and advice from folks on the Badcaps forum, was able to replace the burnt out transistors and get it working again. Brilliant. Now all I have to do is clean out my messy garage so that I have somewhere to put it!

The “Spindicator” Project

In this post I’m going to describe my attempts to date to build a novel computer hard-disk activity indicator, which I named the “spindicator”.


The usual hard-disk activity indicator is an LED connected to a header on the motherboard which illuminates when data is being read from or written to the hard drive. These reads and writes often happen many times in quick succession, resulting in the characteristic rapidly flashing LED  during periods of high disk activity. A while back I built a nixie clock from old Russian  nixie tubes. A related type of old-school discharge tube is the dekatron, which is a decade counting tube. I love the look of the spinning warm glowing dots of a dekatron counter, and wondered how I could possibly use one in a project. Then I had the idea of using one as a spinning computer disk activity indicator, or “spindicator”, with the activity pulses from the motherboard advancing the dot around the dekatron. There were a couple of problems with this idea, firstly I didn’t have a dekatron on hand, and secondly I didn’t (and still don’t) know how to design the high voltage  circuitry for driving one. So I decided to begin by building a simulated dekatron from a ring of ten LEDs, and trying to drive this with the disk activity signal from the motherboard.

Selecting a Counter

A quick look at my old Digital Circuits & Microprocessors textbook from university (I’m not an electronics engineer, I just took the course out of interest) and I could see that simplest type of counter that would produce the required output, a sequentially advancing logic high output, would be a mod 10 ring counter. One could be easily built from flip-flops, but ring counters do not use flip-flops efficiently. A mod 10 (decade) ring counter requires 10 flip-flops. A modification of the ring counter is the switchtail counter, also known as the Johnson counter. This only requires 5 flip-flops to produce 10 unique output states. The disadvantage is that to get a single advancing high output from this counter requires decode logic to be added to the flip-flop outputs. Luckily, however, a mod 10 Johnson counter complete with decode logic is conveniently and commonly available in integrated circuit form as the 4017 decade counter. The counter has 10 outputs, Q0-Q9, which respond to the positive edge of a clocking waveform as illustrated below.

Basic RGB

Figure 1. Response of the 4017 outputs to the clock input

This is exactly the output required to drive the spindicator LEDs. With the counter sorted, the next task was to figure out how to connect it to the motherboard HDD activity header.

Connecting to the Motherboard HDD Activity Header Pins

I did a bit of digging on the internet to try and determine the nature of the HDD activity signal at the motherboard header. I  found a description of the SATA disk activity signal, with example host side implementations (figure 2) in the Serial ATA specifications.

fig 60 SATA

Figure 2. Example host LED drivers (source: Serial ATA  Specification Revision 2.5, figure 60 )

The specifications state that the device (the SATA hard drive) will provide an open collector (or drain) active low activity signal. Exactly how the host (the motherboard) uses this signal to drive an LED is largely up to the board designer. The two circuits given in figure 2 are examples of possible host implementations. In a circuit of type B,  it would be easy to directly obtain an active low clock waveform from the header by shorting the two header pins, provided the open circuit voltage on the positive pin was the same as the supply voltage used to power the 4017 counter. I later determined that my board (a Gigabyte EP45-UD3R) had a B type circuit, and that the open pin voltage was +5V. However, initially I considered that the easiest way to obtain a signal was to use an optocoupler. That way I didn’t need to know the nature of the motherboard circuit or voltage. An optocoupler, such as the 4N25 that I used, is a nifty device consisting of an infrared LED and photosensitive transistor all contained in a small 6-pin IC. A signal is passed through it by way of light alone, allowing physical separation of parts of a circuit. For this project, the optocoupler’s LED can be connected to the motherboard HDD activity header pins in place of the regular HDD activity LED. When there is disk activity, the LED will light and switch on the opto’s transistor. The switching of this transistor provides the logic pulse to drive the counter clock.

Putting it all Together

Version 1: The Positive Edge Triggered Spindicator

It can get a bit confusing when you try and follow the waveform from device through to counter, but let’s try. The device (hard disk) provides an active low signal to the motherboard. The m/b uses this in such a way that an LED connected to the header will light when the device signal is low, as can be seen from figure 2. So when there is activity, the opto LED will light and switch on the transistor. If the opto’s NPN transistor collector is connected to V+, and emitter connected to ground, then a logic signal taken from the collector will be low when the transistor is on, i.e. when there is activity. The 4017’s count is triggered by the positive edge of a clock waveform applied to the Clock input. From our deduction above, if this input is connected to the collector of the optocoupler’s transistor, the count will advance at the end of each activity period (as the HDD activity LED goes from on to off). Such a device I call a negative edge triggered spindicator, named because it is the high to low transition of the optocoupler LED pulse that advances the count. Now of course there’s absolutely nothing wrong with this, it makes no difference to the operation of the spindicator, but for some reason I felt that the count should be advanced when the LED turns on, not off, which in my nomenclature would be a positive edge triggered spindicator. One way to do this would be to add another transistor as a logic inverter. However it turns out there’s an easier way (apart from not bothering with it at all). If you have a look at the 4017’s datasheet you will see that as well as a Clock input, there’s a Not Clock Enable input (this is usually written as Clock Enable with a bar over it, but I can’t do that here). This input is active low, so if you tie it to logic low, the counter will respond to the positive edge of the clock waveform at the Clock input. If  Not Clock Enable is high, the counter will not respond to the Clock input at all (it will not enable the clock as its name says). The thing that caught my attention was another manufacturer’s datasheet for the 4017. In this one, Not Clock Enable was called Not Clock (written as Clock with a bar over it), indicating that it was the logical inverse of the Clock input — just what I needed to change the triggering edge. Looking at the (simplified) internal logic of the IC, figure 3, you can see how it works.

4017 Waveforms

Figure 3. How the 4017 clock inputs are logically combined

If Not Clock is held low, then the output from the AND gate will exactly mirror the Clock input. If the Clock input is held high, then the output from the AND gate will be the inverse of the Not Clock input, and the counter will effectively become negative edge triggered with respect to a waveform at the Not Clock input. Anyway, the upshot is, that by holding Clock high and connecting the signal from optocoupler to Not Clock I could get my positive edge triggered counter as defined above. In hindsight I shouldn’t have bothered as I later ended up changing it back to negative edge triggered version anyway, as you’ll read below.

For the spindicator output, I chose ten 3mm clear-lens green LEDs. I found that connecting these directly between the outputs of the 4017 counter and ground gave adequate brightness without the need for additional switching transistors. So here then is the circuit as built and tested for the positive edge triggered spindicator.

Spindicator Small

Figure 4. The positive edge triggered spindicator – the count is advanced at the beginning of a disk activity period.

I built and tested the circuit on a breadboard using a 5V power supply, as I planned to tap into the computer’s 5V supply in the final version. To test the circuit I used  either switch pulses, or the output from astable 555 timer to simulate disk activity. After verifying that everything worked, I built up the circuit on a piece of prototyping circuit board and mounted the LEDs on a circle through a 3.5” drive bay cover plate, as can be seen in the photo at the beginning of this post, and the photos below. I should mention that my computer case is a mess after years of mods, and now sports no front cover, so these cover plates are exposed. It’s quite good, as I’m not worried about drilling a few holes. I’ve also taken to using foil tape as a type of grungy exterior case finish, so unused holes just get taped over.


The spindicator circuit board. I used IC sockets so that I could reuse the ICs if the thing turned out to be a failure. A terminal block is used to tie together the LED cathodes (brown wires).


The back of the circular LED array. Some of the LEDs were a bit loose, hence the messy hot melt glue job.

An early modification I made to this particular computer case was to rip out some top-mounted unused firewire/USB/audio ports and install a top window and fan. Handily, the cables for the firewire and audio ports were terminated in lots of individual header pin connectors. These have kept supplied with pin connectors for projects ever since, including those I used here to connect the HDD activity header to my spindicator circuit. The local electronics store provided the 4-pin molex connector needed to connect to the computer’s 5V power supply.

I made the above video clip with my webcam to better show how the first spindicator (the positive edge triggered circuit of figure 4) worked when installed in the computer. In the first part of this clip the hard drive is actively storing a file which is being downloaded. In the second part it is mostly idle (apart from saving the webcam video). As can be seen, the active drive activity consisted of multiple very rapid pulses (some don’t even show in the 30fps video) with longer pulses in between where the light appears to briefly pause. This gives the spindicator an interesting but slightly chaotic looking behaviour. When idling, there are very rapid bursts of usually 8 pulses, resulting in the light appearing to jump backwards by two places every couple of seconds. I couldn’t capture this exactly in the video as the computer was also recording the video. Overall I wasn’t very satisfied with this behaviour, and started to consider how I might be able to filter out the high frequency pulses to give a more consistent rotating look to the spindicator.

Version 2: The Negative Edge Triggered Spindicator with Frequency Cut-Off

It struck me that to remove the very rapid pulse sequences I could use the charging or discharging of a capacitor via a resistor to introduce a time delay in the triggering edge of the counter clock. I’ve since discovered that this arrangement is known as a low pass filter (you can tell I’m an electronics amateur). When I sat down to work out the circuit I realised that the easiest modification to make was to introduce a delay in the rising (positive) clock edge by charging a suitable capacitor through the existing 10K resistor. I did work out and successfully test a circuit for a discharging capacitor delay on the falling clock edge, but it was not as straightforward as the charging capacitor. Of course this meant that the counter needed to be triggered by the positive clock edge, so I also has to switch the wires around and apply the clock signal to the Clock input, and tie the Not Clock input to ground. I built up a test circuit on the breadboard and tested the circuits using a 555 timer generated clock signal of variable frequency. I determined that I probably needed a 0.47µF capacitor to do the job. In the test circuit this seemed to cut off frequencies greater than about 100Hz, although when I tested it in the modified hard wired circuit it cut off frequencies greater than 160Hz. Because I wanted the ability to try different caps in the final version, I wired up some unused pins of the optocoupler’s IC socket and just plugged the capacitor into that. The modified circuit is shown in figure 5 below.

spindicator with charging capacitor

Figure 5. The negative edge triggered spindicator with low pass filter – the count is advanced at the end of a disk activity period, provided the time between pulses exceeds a threshold value determined by the capacitor and resistor.

I should note here that it is of course possible to use a different value for the charging resistor if you want to use a different resistor/capacitor combination. I have used a 10K only because it was already soldered onto my board from the first version of the circuit.

I reinstalled the modified spindicator with a 0.47µF capacitor and found that it worked really well. The jumpy behaviour was now gone and the device had fluid spinning motion. The result can be seen in the video below.

I was so pleased with this version that it has remain installed in my computer. I also disconnected my power LED, as the spindicator has the advantage of acting as both a drive activity indicator and power LED because one of its LEDs is always on.


The modified circuit. Note the white capacitor plugged into the IC socket.

Postscript: Direct Connection Without An Optocoupler

Early on I had though about the possibility of obtaining a clocking signal directly from the motherboard header. Although I decided to use an optocoupler, I wanted to go back and see if I could drive the counter without one. The first requirement was that the positive header pin be at the same open circuit voltage as that used to power the counter. A check with the meter (connected between the open positive pin and the computer case) revealed that the pin was at +5V, so that was ok. The second requirement was that the motherboard driver circuit was of the B type (figure 2). In this case, the two header pins could simply be joined together to provide a driving signal. This turned out to be the case with my motherboard. The problem was, I still wanted to include my low pass filter, and I couldn’t do this if I directly connected the motherboard signal to the counter. I would need to use the signal to switch a transistor, essentially making it the same circuit as above but with a direct connection rather than an optical connection.

I built up the circuit shown in figure 6 on a breadboard (although with just 3 LEDs) and put it beside the open computer case so that I could connect it to the header pins. Sure enough, it worked like a charm, showing that it was possible to connect a transistor directly. However it’s really no more difficult or expensive to use an optocoupler, and it removes any uncertainty regarding the motherboard circuit design. If any reader of this blog should want to build a spindicator, I would recommend the optocoupler route.

spindicator with charging capacitor

Figure 6. An alternative to using an optocoupler – using the motherboard header signal to switch a transistor directly. This may not work in all cases, and use of an optocoupler is recommended.


Testing the direct connection circuit of figure 6 using 3 white LEDs. The green lights in the background are the interior illumination of my computer case.

Well that about concludes this long-winded post. I hope it’s been of interest to someone. I certainly had fun building the circuits. A guess at some stage I should try and figure out how I might build a spindicator from a dekatron tube. If anyone has any ideas about how to do it I love to hear them.

UPDATE: Using Transistors to Drive the LEDs

From the comments it seems that some folks are having trouble driving their LEDs directly from the 4017 counter. The other option is to use some general purpose NPN transistors such as BC 547s to drive the LEDs, although this does add several components to the circuit. The  circuit below should do the trick (only the modified counter output shown, the rest is as before). Note that you should change the value of the LED current limiting resistor (160 ohm below) depending on the characteristics of the LEDs you’re using, and the current you want to run them at.

Harvey’s Super Carrot Cake

Harvey's Super Carrot Cake

Inspired by some pretty good carrot cakes found in local cafes, I recently set out to see if I could cook one up myself. After several attempts, I  finally settled on the following recipe. It’s easy to make and produces a lovely dark, moist, delicious cake.

NOTE: The following quantities are for a 20.5 cm diameter cake tin. The base area of this tin is 330 square cm. If you are using a different size tin, work out the base area of your tin (3.1 times the radius squared) and divide it by 330, then multiply the recipe quantities by this factor.


  • 250 mL (230 g) bland vegetable oil (I use rice bran oil)
  • 3 free range eggs
  • 100 g dark muscavado sugar or regular brown sugar
  • 100 g molasses sugar (an unrefined dark, almost black, sugar)
  • 340-360 g of grated carrot (the quantity of carrot is important as it determines how moist the cake will be)
  • 300g plain white flour (I use stone-ground white flour. You could probably also use a mixture of plain and wholemeal)
  • 2 tsp baking power
  • 1/2 tsp baking soda
  • 3/4 tsp salt
  • 3 tsp mixed spice
  • A big handful of roughly chopped walnuts, and a similar quantity of chopped dried apricots

Lemon cream cheese icing:

  • 30 g butter
  • 80 g cream cheese
  • 1 tsp grated lemon rind
  • juice of 1/2 lemon
  • 240 g icing sugar

Line the tin base with baking paper

Preheat your oven to 190°C (I don’t use the fan). Prepare your cake tin by lining the bottom with baking paper. With my springform tin, I simply sit a square of paper on the base, then clamp the side over the base and trim the paper around the base.

Carrots, nuts and apricots added to the oil sugar and egg mix

Beat the oil, sugars and eggs in a mixing bowl until creamy. Don’t worry if there are little lumps of the sticky molasses sugar still present, it adds to the character of the cake. Throw in the grated carrot, nuts and apricots and mix. Add the flour and other dry ingredients and mix thoroughly. You will end up with quite a sloppy mixture.

Foil around the bottom of the tin

Pour the mixture into you cake tin. Because my cake tin is black, I like to cover the bottom and sides of the tin with aluminium foil to prevent over cooking these areas. Place the tin into the oven and cook for 40 minutes. After 40 minutes, place another piece of foil over the top of the cake to prevent the top from drying out. Continue cooking until a knife inserted into the middle of the cake has no uncooked mixture adhering to it when withdrawn. In my oven at 190°C without fan, this takes another 40 minutes, but begin checking after about 30 minutes.

The finished cake

Remove the cake from the oven and allow to cool for 10 minutes in the tin, then remove the cake from the tin and allow to cool completely on a wire rack. Make the icing by placing the butter and cream cheese into a metal bowl and heating over hot water until the butter melts. Beat this mixture into a fluffy paste. Mix in the rind and lemon juice and then add the icing sugar and mix to a thick paste. Spread over the top of the cake. If you want to get all fancy, sprinkle some pumpkin seeds and more chopped dried apricots over the icing. Enjoy.

Windows 7 (64 Bit) Installation & AHCI Mode Hard Drive Corruption

This is just a quick note about my recent experience clean installing Windows 7 Ultimate on a SATA II hard drive running in AHCI mode.

The installation proceded normally up to the request for the product key. I entered the Win 7 product key and hit the Next button, after which there was a pause followed by a blue screen crash with a message about an “unrecoverable hardware error”. On reboot, the BIOS hung when attempting to detect the AHCI connected (Intel ICH10R) hard drive. The only way to enter the BIOS was to unplug the hard drive. I guessed that some data critical to AHCI had been corrupted on the drive, so switched the drive to IDE mode. On reboot, the drive was detected by the BIOS. I did not want to install Windows in IDE mode and then go through the registry hack route to invoking AHCI, so I put in a Western Digital Data Lifeguard bootable CD and choose the quick erase option to clear the beginning and end sectors of the disk. I then put the drive back into AHCI mode, and it was detected normally. I started the Win 7 installation again, which completed without any further problems.


Get every new post delivered to your Inbox.