Friday, August 21, 2009

Arduino – Amplified Speaker Project

I have been playing around with the Arduino for a couple of months. The Arduino is an inexpensive open-source electronics prototyping platform ( The compilation below represents a very simple project to connect an amplified speaker to the Arduino.

The amplifier I used for this project is an LM386. The LM386 is a power amplifier designed for use in low voltage applications. It ant the other parts needed for this project , capacitors, resistors and a speaker, can be purchased at Radio Shack.

This example makes use of a Sound Hello World sketch by David Fowler to generate tones.

This also represents my first attempt at a circuit schematic using the freeware version of Eagle from CadSoft at

My hope is that someone will find this useful and will be able to follow what I have done as I have done following the examples posted by others.



//Arduino Sound Hello World
//Created by David Fowler of
//Define the I/O pin we will use for our sound output
#define SOUNDOUT_PIN 9

void setup(void){
  //Set the sound out pin to output mode

void loop(void){
  //Generate sound by toggling the I/O pin High and Low
  //Generate a 1KHz tone. set the pin high for 500uS then
  //low for 500uS to make the period 1ms or 1KHz.

  //Set the pin high and delay for 1/2 a cycle of 1KHz, 500uS.

  //Set the pin low and delay for 1/2 a cycle of 1KHz, 500uS.

Thursday, August 20, 2009

It Worked for Me - Disk Recovery Software

A couple of weeks ago a friend of mine's computer failed to reboot after a power failure. Unfortunately, there were a number of files on the computer that were not backed up.

After attempting to help him recover his system over the phone and not getting anywhere I asked them to drop it by my house.

The computer showed up a couple of days later. I plugged it in and powered it up. It started through the boot sequence and then gave up with a BSOD. The error message wasn't too much help but seemed to indicate either a memory or disk error.

Not that I expected much I swapped the memory with some I had and the system still would not boot. I moved the disk drive over to another system and found that while some of the data was available much of the data wasn't.

A CHKDSK run on the disk would get to 78% at which point the computer would lock up and need to be rebooted.

At this point I decided to see what I could recover using various recovery software. A quick google search turned up a couple of options:

  • Stellar Phoenix Windows Recovery Software
  • Data Recovery Wizard
  • GetDataBack for NTFS
  • Data Doctor Recovery NTFS
  • Nucleus Kernel for FAT and NTFS
  • Recover My Files
  • Pandora Recovery (free)
  • Testdisk (free)

The basic model that many of these software products use is that they run in a mode where they will show you the data they find on your disk but to recover the data you must buy the software.

Some packages focus on recovering deleted files or files from drives that were reformatted where others focus on drives that have hardware problems.

Each package works somewhat differently. However, most of the have a mode that will attempt to recover files within the directory structure they were stored in and a second mode where they just recover files with a guess at the file type but little else.

In this case I needed a program that was able to deal with a drive that had obvious hardware problems. The problem was that with the programs above that they would work up until they "hit" the bad spot in the drive but then they would hang the system requiring a reboot.

The problem area appeared to be right in the middle of the MFT. It turned out that only one tool Stellar Phoenix Windows Recovery Software was able to access the files that occurred in the MFT after the problem area.

I purchased the "Single User (Home User / SOHO Segment)" License for $99 off the company web site at:

After putting a new disk drive in the system and rebuilding it I was able to return with all but one or two of the files that were on the bad disk drive.

In this case we were lucky. The obvious moral to the story is to backup your critical files to another disk or CD-ROM/DVD or an online service.

However, if you do get stuck in a situation like you may want to check out Stellar Phoenix's Windows Recovery Software. I cannot say that it will work for you but it did for me.