Sunday, September 20, 2009

Arduino – Breadboard Arduino

As I have said in earlier posts I have been working with Arduino for the last several months. My latest project was to take the ATmega328 chip and assemble a very basic Arduino on a breadboard.

Using various sources found using Google I was able to assemble the breadboard Arduino in an evening and get it running a basic blink program.

ArduinoBreadboard

I found several excellent sources for parts and information which I pass along below:

Once I got all the parts and pieces the project was easy to assemble and get running. I was also able to combined this with the power supplies I built earlier to have a free standing finished product.

Monday, September 7, 2009

Simple 5V Regulated Power Supply Projects

Spent this Labor Day Weekend on a number of projects around the house but still had some time to undertake a couple of simple electronics projects.

The first project was to bread board a simple 5V regulated power supply using parts from Radio Shack and schematics from a couple of helpful websites found via Google.

The end result was a hybrid using the diagram below from http://www.tkk.fi/Misc/Electronics/circuits/psu_5v.html

and the schematic below from the Sparkfun Embeded Electronics Tutorial at http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=57

http://www.sparkfun.com/images/tutorials/BEE-Lectures/1-PowerSupply/PowerSupply6.jpg

My design didn’t include the diode or the switch as the Sparkfun design does but did include the 0.1uF capacitor and the LED/resistor. The Sparkfun tutorial also included a diagram of the pinout for the 7805.

http://www.sparkfun.com/images/tutorials/BEE-Lectures/1-PowerSupply/LM7805-Pinout.jpg

The second project was to assemble the Sparkfun Breadboard Power Supply 5V/3.3V (Part No: PRT-00114) http://www.sparkfun.com/commerce/product_info.php?products_id=114 which arrived during the week.

clip_image001[4]

The assembly was a breeze and took less than an hour.

A word of thanks to the folks at Sparkfun for all the good information on their website, the wonderful products they make available and for the speed with which they get things out the door. I have now ordered from them twice and both times have used the USPS Priority shipping option and gotten my order the in three days of placing it.

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 (http://www.arduino.cc/. 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 http://www.cadsoft.de/.

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.

ArduinoAmplifiedSpeaker

ArduinoAmplifiedSpeaker


//Arduino Sound Hello World
//Created by David Fowler of uCHobby.com
//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
  pinMode(SOUNDOUT_PIN,OUTPUT);
}

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.
  digitalWrite(SOUNDOUT_PIN,HIGH);
  delayMicroseconds(500);

  //Set the pin low and delay for 1/2 a cycle of 1KHz, 500uS.
  digitalWrite(SOUNDOUT_PIN,LOW);
  delayMicroseconds(500);
}

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.

Wednesday, June 17, 2009

Wii Fun Wrap Up - Part 5 - On Hold For Now

So after almost a month of off and on work, including a couple of very late nights, I have decided to shelve this project since I am not able to get the ease of use or the quality I am looking for.

One area I did not pursue was to hack into the Wii using one of the well publicized hacks and setup a Homebrew Channel. This would allow me to run code on the Wii with the same capabilities as official software. There were several options that looked very promising.

For now, when I want to run slideshows or videos on my TV via the Wii, I will use the Wii's Photo Channel and sneaker.net to move the images and videos from my PC to the Wii.

Wii Fun Wrap Up - Part 4 - Flash Media Players

My next step was to look at Flash Media Players. I wanted to see if there were flash options that would work for both my slideshow needs and also allow me to play family videos.

Back to google which provided me with a number of options. However, I quickly determined that most of these options wouldn't work. The problem is that the Wii's Opera Browser only support Flash version 7 and most of the flash media players required Flash version 8, 9 or even 10.

The problem according to several web sources is that the Adobe SDK required to run flash on platforms other than Windows, Linux or Mac hasn't been released. As a result the Wii Opera browser is not able to run anything above version 7.

I was able to find two FLV Players that ran, to some degree, on Flash 7. The two players were:

My next disappointment was that when I converted the Quick Time Movie generated by my camera to FLV using default settings this quality of the video degraded a great deal.

This led me down a path to better understand FLV and the software options to convert from Quick Time to FLV. After trying a number of different conversion options I finally settled on mencoder which is a video decoding, encoding and filtering tool from the OpenSource MPlayer project at:

It took me a while to settle on a set of conversion parameters but finally after much trial and error I found a set that produced nearly the same quality video.

Unfortunately, when I displayed the newly created FLV video using either FLV Player or JW FLV Player on the Wii the video would hang and/or stutter. The Wii appeared to lack the power to display the video acceptably.

I went back to the drawing board but was not able to come up with a combination that produced a video that looked acceptable on the Wii.

Tuesday, May 26, 2009

Wii Fun Wrap Up - Part 3 - Javascript/Ajax Slideshow Software

I started this activity by returning to google and doing a number of searches for javascript slideshows, javascript image gallary, ajax slideshow and finally ajax image gallary.

There were several sites that came back with 20 to 30 different options. Most were oriented towards displaying a gallery of images on a traditional website and were more complex than what I was looking for.

After much searching and reading I settled on the ones listed below and set them up to test from the Wii.

  1. Highslide
  2. Lightview
  3. Google
  4. Floatbox
  5. dojo.image.SlideShow
  6. Slideshow2
  7. Simple Controls Gallery

Generally my experiences were not as favorable as I had hoped. Several of the routines didn't work while others had some quirk that made them less than optimal.

One of the more unfortunate problems I ran into was that the Wii would issue a sound confirmation when it finished loading images. This along with the blue status bar was distracting.

Highslide

Available from: http://highslide.com/.

This software worked but the controls were awkward.

Lightview

Available from: http://www.nickstakenburg.com/projects/lightview/

I wasn't able to get this software to work on the Wii. The first time a series of images are loaded they don't display right. The next time they do.

Google

Available from: http://www.google.com/uds/solutions/slideshow/helloworld.html

This software worked but requires that images be on a server that is publicly accessible to the Internet. As I was looking for an easy way to pull photographs from my own internal server this wasn't going to work for me.

Floatbox

Available from: http://randomous.com/floatbox/home

I wasn't able to get this software to work on the Wii.

Dojo

Available from: http://www.dojotoolkit.org/

The dojo routine worked as long as you used v1.1.1. The Dojo library doesn't appear to work on the Wii's Opera Browser for any version of Dojo after v1.1.1. This caused some problems as the dojo.image.SlideShow in v1.1.1 didn't work quite right. This was fixed by taking the slideshow widget from a later verison of Dojo and running it with an earlier version of the library. Not something I would recommend but it worked. Also, the transitions were not smooth.

Slideshow2

Available at http://www.electricprism.com/aeron/slideshow/

This software is built on Mootools v1.2. I wasn't able to get this software to work on the Wii.

Simple Controls Gallery

Available at http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

This software appears to work but I didn't spend too much time with it.

After testing these applications I moved on to see what I could do from a flash perspective.