Dual-Boot PC w/ Toggle Switch

This is a project that I had planned on doing when I first built my new PC about a month ago. I have used software dual-boot computers before and while it can be handy I found the negatives to be too great to continue on that path. In order to dual-boot Windows and Linux you first install Windows in its own partition and then install Linux in a separate partition. In this arrangement you use the Linux bootloader to choose which OS to run on startup. This works fine unless you have to reinstall Windows; which as we all know needs to be done from time to time. Windows will then overwrite your Linux bootloader making your Linux partition inaccessible. While it is true that you can modify the bootloader to access Linux or reinstall the Linux bootloader using a liveCD, this is a fairly complicated process. I much prefer having completely separate installations of the two operating systems.

In order to achieve this I decided to build a hardware solution for switching between OS’s. The idea here is that I will use two separate hard drives and physically choose which of the two receives power, thereby only allowing one hard drive at a time to boot on startup. This is easily accomplished using two pieces of hardware:

  1. 4PDT toggle switch
  2. SATA power cable splitter

SATA_SwitchThe switch I chose is not a normal toggle switch. This model features a locking lever which helps to prevent inadvertently switching power to or from the hard drives. This is necessary since accidentally flipping the switch while the computer is running would crash the OS similar to unplugging the system from the wall. The locking lever works by using a spring loaded plunger with a pointy tip mounted on the lever. When in either ON position the tip fits into a notch on the switch body which prevents it from moving. In order to flip the switch you must pull out on the plunger which raises the tip out of the notch, thereby allowing the lever to be moved to the other ON position.

SATA_Harness1SATA1As you can see from the photos I cut the splitter cable in to 3 pieces: (1) power socket which plugs into my PC’s power supply & (2) right angle plugs that will attach to my hard drives. Normally a SATA hard drive power cable has 5 conductors: (1) 12V line, (1) 5V line, (1) 3.3V line & (2) grounds. The orange 3.3V line is rarely used and consequently removed it from the connectors, leaving me with 4 conductors each that needed to be wired to the switch. I added extensions using 22AWG wire so that the plugs could reach from the switch (mounted on the front panel) to the hard drive bays. The front panel of my PC case is made of aluminum, including the removable drive bay covers. This provided me with a fairly sturdy mount for my switch. I simply drilled a 1/4″ hole in the empty 3 1/2″ floppy drive bay cover and mounted the switch. After plugging in the power socket and hard drive plugs I reassembled my PC and tested my dual-boot setup.

SATA2SATA_Harness2This is a really simple and robust way to dual-boot a PC in my opinion since you essentially have two independent PCs using the same hardware. The only disadvantage this has versus a software dual-boot system is that I cannot access the same data from either OS since they are on separate hard drives. For me this is a minor issue since I use my HTPC as a data server which is equally accessible regardless of which OS I choose to run. I’m very pleased with this setup and it’s definitely worth the $17 in parts and about an hour of time I put into it.

Core 2 Duo PC Build

PC_front-backI had been thinking about building a new PC for a while now since my old desktop is about 4 years old and is becoming woefully under-powered. I also wanted a more powerful machine since my old box can’t run newer OS’s like Windows Vista without struggling. While I like Linux a lot and it has its place, after using it almost exclusively for my main OS over the last 18 months I’ve come to the conclusion that it isn’t the best for most of the media creation and editing tasks that I have been doing more and more of. I will also be using this machine for PC gaming and I might as well get the most for my money by using it to its fullest. In addition to building a more powerful PC I wanted to make this computer as quiet as possible as well as get a new monitor.

Below is a comparison of my two systems:

Old PC Specs

  • Case – Antec SLK1650B (ATX Mid-tower)
  • Power Supply – Antec Earthwatts 500 (500W)
  • CPU – AMD Athlon 64 X2 3800+ (2.0GHz)
  • CPU Cooler – Artic Cooling Freezer 64 Pro (92mm Fan)
  • Motherboard – ASUS A8N5X (nVidia nForce 4 Chipset)
  • GPU – nVidia 7900GS (256MB VRAM)
  • RAM – 1GB Kingston Dual Channel DDR 400
  • Hard Drive – 250GB Western Digital Caviar (8MB Cache, IDE)
  • Optical Drive – LG 16x DVD Burner (IDE)
  • Monitor – Princeton Graphics Senergy 714 (17″, 1280×1024)

New PC Specs

  • Case – Cooler Master Sileo 500 (ATX Mid-tower)
  • Power Supply – Corsair CMPSU-450VX (450W)
  • CPU – Intel Core 2 Duo E8400 (3.0GHz)
  • CPU Cooler – Asus V60 (92mm Fan)
  • Motherboard – Gigabyte GA-EP45-UD3L (Intel P45 Chipset)
  • GPU – ATI Radeon 4850 (512MB VRAM)
  • RAM – 4GB G.Skill Dual Channel DDR2 800
  • Hard Drive – 320GB Western Digital Caviar (16MB Cache, SATA)
  • Optical Drive – LG 22x DVD Burner (SATA)
  • Wireless – Edimax EW7727IN 802.11b/g/n (PCI card)
  • Monitor – Samsung 2243BWX (22″, 1680×1050)

PC_inside1My new PC easily bests my previous model not only in performance, but build quality and noise reduction as well. The Cooler Master Sileo 500 case that I used has much better build quality than my old Antec case. It is much stiffer with less vibration and has noise reducing foam applied to the top, bottom and both sides of the case. It also has two 120mm fans that run at a low RPM and are virtually silent. Other nice features include toolless hard drive and optical drive installation.

PC_inside2The Asus V60 CPU cooler is also very quiet and keeps the CPU temperature below what the stock cooler could do. In order to get a quiet graphics card I purchased a dual slot model from MSI which uses a larger heatsink and fan than normal and does a significantly better job of cooling than a typical cooler would do. To keep the noise down when I’m not gaming I adjusted the GPU fan speed in ATI’s Catalyst Control Center to around 45%. This doesn’t impede the card’s ability to cool the GPU, while greatly reducing the noise output of the fan. When I want to play a game I just set the fan back to automatic control and it adjusts the fan speed to keep the GPU from overheating.

My new Samsung monitor is also a significant upgrade over my old unit. Besides the higher resolution, it also has better black levels, higher contrast and a faster response time. It also features a very adjustable stand that allows the screen to be raised and lowered as well as pivoting into a portrait position. This monitor is also much more configurable than my previous model, with several handy brightness/contrast presets.

I am very pleased with my new PC build. This system runs Windows Vista very well and has more than enough power for the games I want to play. I also did some power usage measurements and found that they were similar to my old PC, around 100W during typical usage and close to 200W while gaming, not bad for a significantly more powerful machine.

Arduino Punk Console 8 Step Sequencer

APCAPC-faceThe arduino punk console is a simple tone generator that is capable of making some cool audio sequences. I’ve always enjoyed playing around with different audio equipment (see my analog synthesizer) and this looked like a cool project when I saw it on the Make Blog. It is a fairly straightforward project that uses an arduino to handle all of the switch and potentiometer inputs and generate the tones. What is especially fantastic about this is the flexibility afforded by having a reprogrammable controller instead of a hard-wired sound generator. That said I haven’t modified the original code yet.

APC-insideWhile the original project was good (see also this Instructable), I made the following changes for my version of the arduino punk console:

  1. Eliminate the LCD screen – I wanted to make my version as cheap as possible and I thought the LCD was somewhat unnecessary for a simple project such as this since it doesn’t display very valuable information.
  2. Scratch build the arduino board – Similar to other DIY arduinos (see here & here) I’ve done before based off of the Boarduino design, I had the parts and building it myself cut the cost of the unit.
  3. 9V AC adapter power – I have found it is much more convenient to power many of my projects with an AC adapter instead of batteries as it saves having to access the inside of the unit for battery replacement and the portability provided by battery power is rarely necessary.
  4. Substitute 5K ohm potentiometers – I’m not sure why the original project used 100k ohm potentiometers, but I had a bunch of 5k’s around and they worked fine.
  5. No speaker – I was planning on using an external amplifier so I replaced the speaker with a mono 1/8″ audio jack.
  6. Eliminate the volume control potentiometer – Again, because I am using an external amplifier I don’t need another volume control.

Check out the video below of the sequencer in action:

GPS Receiver v2

GPS_insideGPS_bodyWhen I first built my GPS receiver over a year ago I was fairly pleased with its performance. After using it more, however, it became obvious that I needed to make some improvements. The following were my biggest problems with the device.

  1. Battery life. The 9V battery and 5VDC regulator combination that powered the receiver wasted a lot of energy in the process of reducing the 9V input to the 5V needed to power the receiver. I wanted to find an alternative power source that could use rechargeable batteries with more capacity.
  2. Build quality of the receiver’s enclosure. I found that the enclosure I had been using was too large to conveniently fit in a backpack with other gear. I also wanted to rewire the device to better utilize wire management techniques inside the enclosure.
  3. Power & Backlight Controls. In my first attempt I used slide switches which, while functional, looked terrible. In my revised build I used push-on-push-off switches. This was an improvement, but they were still poorly placed and could turn on accidentally when pressed against other objects in a pack.

Battery Life

GPS_lidThe solution I found for this problem is actually a project that I’ve built before called the MintyBoost. This ingenious device takes a 2-3V input from 2 AA batteries and boosts it to 5V. While originally intended to charge USB devices such as cell phones or mp3 players, the MintyBoost works perfectly with my GPS receiver and offers a big improvement in convenience and performance. I can now use rechargeable NiMH AA batteries which provide 2000mAh of power, constituting over 300% more capacity than a typical alkaline 9V battery. This should translate into over 12 hours of battery life.

GPSWhile I would normally build a simple circuit like this from scratch, I decided to get MintyBoost kit for this build. Aside from the obvious convenience factor, it also packs the circuit into a much smaller package than I could accomplish on a proto-board. The only changes I made to the kit were that I did not install the female USB connector and its associated pull-up/down resistors since I connected my power wires directly to the board itself.

Build Quality

GPS_topI looked around for a new enclosure with a AA battery compartment, but I couldn’t find one that was the right size, so I decided to use a generic 6x4x2 project box from Radioshack and modify it for my purposes. While somewhat thicker, it is otherwise much smaller and fits better in the hand than my previous enclosure.

Because I need to access the inside of the case every time the batteries have to be changed, I wanted to be able to take the cover off without having to use tools. As with all Radioshack project boxes the cover is normally held on with 4 countersunk Phillips head screws. To allow for hand access, I drilled and tapped the screw holes in the body of the box to accept 6-32 cap screws. These machine screws have a knurled head instead of a screwdriver slot, allowing you to grip the head of the screw with your fingers. This makes removing the cover by hand a breeze.

In addition to modifying the case I also rewired all of the connections from the LCD and GPS module to the main board. This means I now have only 4 wires going from the main board to the lid, allowing me to bundle the wires and secure them with wire ties to the lid and body. Another change I made was mounting the two circuit boards and battery holder to the enclosure with double sided foam tape instead of stand-offs and bolts.

Power & Backlight Controls

To resolve my complaints about the receiver’s controls I decided to change both the placement and type of the switches I used. Instead of the face of the receiver, I moved the controls to the top of the unit. The main idea behind this is that it streamlines the profile of the receiver so that there are no protrusions when it is placed vertically in a backpack, making it less likely that the unit will be turned on accidentally. For the power switch I used a large rocker switch with a fairly stiff action. This switch is both functionally and aesthetically superior to my previous choice. For the backlight control I stuck with a pushbutton, but this time I went with a small momentary version. This was done because I rarely use the backlight and by requiring the user to hold down the button they are more likely to use it sparingly, thereby conserving the battery.

I am very pleased with this latest revision of my GPS receiver. It has always been a fun project and now it is even more capable and robust. Check out the video below for a walk-through and a demonstration of the unit.

First Timelapse Attempt

Here’s my first attempt at making a timelapse video using my Analog Intervalometer. The video was made with Adobe Premiere Elements, which is much better at making timelapse videos than Picasa since the user has greater flexibility regarding the resolution and compression of the finished video.


One mistake I made, as you no doubt noticed in my time-lapse video above, was setting the camera to shutter priority mode. This resulted in considerable depth-of-field shift as the camera changed the aperture when the light dimmed from day into night, placing much of the scene out of focus.

Time-lapse Photography w/ DIY Intervalometer

intervalometer-1In Make Magazine issue 15 a project caught my eye (based on this Instructable) that functions as a camera shutter timer, or intervalometer, allowing your DSLR to do time-lapse photography. This is possible because most DSLR cameras have a remote accessory port which allows the camera’s shutter and focus functions to be performed remotely. The way this works is very simple; the remote accessory port is simply a 3 contact jack similar to the one you plug your headphones into on your MP3 player or stereo. The difference here is that instead of outputting sound, the port is just a set of contacts which can be used to remotely trigger the shutter or focus. When the shutter contact is shorted to the ground contact the shutter is activated. Time-lapse photography has been something I wanted to play with for some time and this project looked like a great way to get my feet wet with my new Canon Rebel XSi.

intervalometerThe article itself, however, admitted that the design had limitations; it didn’t reliably trigger the camera’s shutter and its timing range was limited (30 seconds to 2 minutes). Looking at the original schematic I realized that I had experience making similar timing circuits and decided to make a more versatile intervalometer.

The primary upgrades I planned for this improved version were the following:

  1. Shutter trigger reliability
  2. Camera interface isolation
  3. Timing range options
  4. Battery or AC adapter power options
  5. Camera connection flexibility

intervalometer-2In order to achieve better shutter triggering reliability I used a more sophisticated timer chip, the 556, which is essentially two of the 555 timers used in the original circuit in one package. I then chose appropriate resistor and capacitor values such that I increased the time the shutter is triggered to around 1.5 seconds, thereby eliminating any reliability issues.

The original design used a transistor to short the camera’s shutter pin to ground. I decided to completely isolate the camera from the timing circuit by using a reed relay which requires little current draw from the circuit. This eliminates the possibility of stray voltage entering the camera via the timing circuit and damaging the camera. Another benefit of eliminating the transistor is that I can use the two pushbuttons to manually focus and trigger the shutter while the timer is running, which was not possible in the original design.

To add timing range options I inserted a DPDT toggle switch which allows the user to choose which RC timing network controls the time delay of the shutter triggering. By switching in a much larger timing capacitor I greatly increased the timing interval that can be set. The Low Range allows for delays from 17 seconds to 5 minutes, and the High Range allows for delays from 7 minutes to over 60 minutes.

The final two alterations were the most minor, but still very useful. To allow the circuit to run off of an AC adapter instead of just battery power I added a coaxial power jack. I also configured the power wiring such that if an adapter is plugged into the intervalometer it cannot pass voltage to, and possibly damage, the battery. Instead of hard soldering a cable with the appropriate connection on the end to the intervalometer, I soldered all the camera connections to a 1/8″ stereo jack. This allows me to use a Radioshack stereo patch cable via a 1/8″ to 3/32″ adapter to connect to my camera’s accessory port.

After I built my circuit and put it in an enclosure I had to setup my camera properly to take good time-lapse photos. This article has a lot of good tips regarding what settings your camera should have and how you should assemble your finished video. I set my intervalometer to take a picture every 2.5 minutes and let it run.

Freeduino (Arduino Clone Kit)

freeduinoThe Freeduino is a great kit for those interested in the Arduino platform. It is essentially identical to the Arduino Diecimila, but made with through-hole components to allow for easy assembly as a kit. I assembled mine in about 30 minutes. Unlike my homebrew Arduino, the Freeduino shares the Arduino’s form factor and therefore is interchangeable with the pre-assembled board (including compatibility with the various shield kits that are available for the Arduino). Another benefit of the Freeduino is that, due to its onboard female headers, it allows for prototyping without the use of a solderless breadboard.

Pictured above is a side-by-side comparison of the finished Freeduino kit (on the left) and my scratch built Arduino.

Panel Meter Clock

panel_meter_clock1There are several versions of this project, including one which can be purchased as a kit (The Chronulator). In this case I based it off of the one featured in Issue 13 of Make Magazine (original code and schematics). I liked this iteration as opposed to The Chronulator because not only can I easily build it from scratch using an Arduino board, it also has a seconds display

panel_meter_clock2In order for panel meters to tell time the Arduino pulses three of its outputs according to what the clock demands. For example, if it is 6:45 the Arduino will pulse the hour meter output 50% of the time and the minutes meter output 75% of the time. The pulses occur so fast that the meters can’t react in time, consequently it appears as if they are receiving a constant supply of current. Since the Arduino’s outputs are 5VDC and the meters were chosen to read 1mA maximum, then a resistance of 5000 Ohms is necessary between the outputs and the meters. 5000 Ohms is not a standard resistor size so I used some parts I had lying around in my junk box, in this case 4700 Ohm resistors and 1000 Ohm potentiometers. The potentiometers allow you to adjust the total resistance of the circuit enabling you to set the peak value of the meter to the correct reading (1mA).

panel_meter_clock3To finish the project I took an 8″x6″x3″ plastic enclosure from Radioshack and cut holes in the lid to mount the meters. I also placed the mode, hour set, and minute set buttons on the top of the enclosure. To finish it off I added a power connector for a 9V power brick which will be the power supply for the clock (in the lower left corner of the circuit board you can see the power circuit consisting of a protection diode, a 5V regulator and 2 capacitors which together supply 5V to the Arduino from the incoming 9V supply).

In order to make the panel meter faceplates read time instead of current I had to make a new set of scales for the three gauges. I started with the templates available on The Chronulator website (I particularly liked the VU meter as you can see in the photo). Since these are vector graphics images you can easily resize them without losing detail like you would in a bitmap image. I used a free conversion tool called FreeSVG to convert the files from PDF to SVG (Scalable Vector Graphics) format which can be read by the free, open source vector graphics editor Inkscape. Note: I believe that the new version of Inkscape will include the ability to open PDFs.

I used Inkscape to resize the faceplates to match the dimensions of the panel meters I had purchased (which were larger than the template). I also inverted the color scheme of the template since text on a white background is more visible than with a black background. I printed the new faceplates out on 4″x6″ glossy photo paper (which really shows off the colors of the scale better than regular paper). After cutting out the new gauges with a razor blade, I then used rubber cement to glue each of the completed faceplates onto the original aluminum gauges. I allowed the finished gauges to dry overnight and they went on without issue.

Total cost was about $60 for my scratch built Arduino, 3 panel meters, pushbuttons and enclosure.

This is an excellent project to get your feet wet with the Arduino, and it looks great too.


arduino_boardarduino_protoboardIf you have been following this blog at all you probably noticed that I have done a fair number of microcontroller projects. In my experience working with the PIC and AVR microcontrollers I ran into a number of issues:

  1. The PICBasic programming environment , while easy to learn, only works on Windows
  2. The C programming environment for the AVR requires more effort than I wish to put into a casual hobby enterprise and I have been unable to get it working in Linux

As I looked for more project ideas I noticed a lot of people using the Arduino development board. The Arduino is an open source hardware and software environment similar in concept to the BASIC Stamp (except it’s not expensive). Basically all the Arduino does is provide a standardized microcontroller board using the AVR ATMega168 processor and various power, I/O, and programming connections. They can be purchased as a completed board for around $35 (several versions of unassembled kits are also available). The biggest advantage from my perspective is that the Arduino software is truly cross-platform since it runs in Java and therefore can be used in Windows, Mac OSX and most importantly for me Linux.

One version called the Bare Bones Arduino removes the standard USB-serial adapter from the board itself and instead substitutes a FTDI USB-serial cable to connect the board to your PC. This is done to minimize cost since the adapter cable is a one-time $20 dollar purchase that can be used with an infinite number of compatible boards instead of paying for the adapter chip on the standard Arduino every time you get a new board. Another version of the Arduino called the Boarduino modifies the form factor of the circuit board into one more convenient for use on a solderless breadboard. otherwise it is essentially the same as the Bare Bones Arduino in that it also uses the FTDI adapter cable. Both of these boards are completely interchangeable with the Arduino.

While these are good products, I decided I wanted to build my own version from scratch to better fit my electronics setup. I used the schematic from the Boarduino website to base my design on, but I used the same form factor as the Bare Bones Arduino. Since I use a Graymark 808 Protoboard which has a built in power supplies I removed the power circuitry from my design. In its place I simply put two headers, one for +5V and one for Gnd that connect to the protoboard’s power supply (as shown in the pictures above). I also reduced the number of headers (which stab into the solderless breadboard) used to fit the Radio Shack PC board I used for my layout. I retained the power select jumper to choose whether the board is powered by the USB programming cable or the protoboard’s power supply. I also left the two indication LEDs, reset button, and the 6 pin ISP and USB programming headers as they are on the Boarduino.

Total cost for my homebrew Arduino was $9 (not including the USB adapter cable).

Having never dealt with the Arduino’s software package before, I wasn’t sure what to expect. It is a simplistic Java application which provides a very user friendly environment to write your programs (or sketches as they are called) in. The programming syntax used is similar to C, but the environment has many useful functions already built in so it’s very easy to do simple tasks such as set a pin as an output or toggle an output on & off. As someone who has used other languages, PICBasic for example, I can attest to how intuitive these functions are when compared to manually setting register ports in BASIC. Like in C you can also create your own functions and call them, making this a very powerful language despite its simplicity.

The installation of the Arduino software is fairly straightforward, even on Linux, and I encountered no issues. In Ubuntu it entails downloading the application from the Arduino Software page and following their well written instructions. These mainly involve installing Java and removing a package which inadvertently thinks the Arduino is a braille reading device and grabs your computer’s USB port. Left out of the instructions is an issue which caused me some problems; the Arduino software should be run with root privileges in order to gain access to the USB port and consequently the Arduino board. This is done by opening the terminal and executing the following commands:

cd /home/username/Arduino-0010 (navigates to the Arduino software’s folder)
sudo ./arduino (runs the Arduino software script with root permissions)

The application will now launch. Once running I selected my board under Tools – Board – Arduino Diecimila(currently the newest board design and bootloader) and picked my USB port under Tools – Serial Port – /dev/ttyUSB0. Since I built my Arduino from scratch, my ATMega168 did not come pre-burned with the Arduino Diecimila bootloader. The bootloader functions as a sort of operating system for the microcontroller, allowing you to transfer files over a serial port instead of having to re-burn the entire firmware every time you change your program, thus simplifying the entire process. In order to burn the bootloader I plugged my AVR programmer into the 6 pin ISP header on the board and selected Tools – Burn Bootloader – w/ USBtinyISP. The software displays its progress on the bottom of the screen and lets you know when it has finished burning the file to the chip. To check if the bootloader is running properly follow this guide (since the various bootloaders behave differently). Next I wrote a simple LED flasher sketch and after plugging in the FTDI cable I successfully uploaded the sketch to the board and it ran perfectly.

Aqua Teen Hunger Force Animated LED Art

athf2athf1On January 31, 2007 Boston was shutdown when pieces of LED artwork that looked like characters from the Cartoon Network show Aqua Teen Hunger Force were mistaken for bombs. Ever since this occurred I have wanted to build my own version to hang up in my apartment.

My version is designed to look like the character Ignignokt; in case you don’t watch the show Ignignokt and Err (his sidekick) are Mooninites (residents of the moon, designed to look like characters from an 8 bit video game) who occasionally come down to Earth to annoy the Aqua Teens. I chose Ignignokt because he is green and blue (Err is purple and blue) and green LEDs are cheaper than purple LEDs. My design used 72 green and 40 blue LEDs.

athf_schematicI got my LEDs from Mouser and I chose them based primarily on their diffusion angle (over 40 degrees), which allows for better viewing angles than other LEDs. In order for an LED array like this to function properly the LEDs must be wired in parallel (ie. all of the cathodes are connected together as well as all of the anodes). I also had to subdivide the LEDs into a group of all of the green LEDs (D6 on the schematic) and all of the blue LEDs (D5 on the schematic). This had to be done because the LEDs were different types and there were more greens than blues, causing the current draw of the groups to be unbalanced. This created a problem where only the green group would light, consequently, I adjusted the resistor values such that I balanced the current drawn by both LED groups. There are also four additional groups to create the effect of Ignignokt giving the finger. These groups are controlled by a PIC16F84A microcontroller which orchestrates the animation of the LEDs. As shown in the schematic, group D1 is the hand and groups D2-D4 are the finger. The code (written in PicBasic) is very simple, involving only turning on specific digital outputs of the PIC for set periods of time. I can power the whole thing off a 9 Volt battery using a power circuit similar to that shown in the schematic for my GPS project (I substituted a 78L05 for the 7805 voltage regulator since this circuit draws less current). Check out the video to see Ignignokt in action.