May 27, 2012

Adding Arduino Libraries in Mac OS X Lion - Arduino 1.0.1

I already had arduino-0022 on my MacBook Air and wanted to keep a separate application of Arduino 1. I have at least 3 years' worth of *.pde sketches that I don't want to convert right now.
I easily downloaded Release 1.0.1 of Arduino for Mac OS X, but didn't know how to add a Library. Here's what worked for me:
  • Download and copy the Library you wish to install
  • Open the Application folder, then Command-Click on the new Arduino 1.0.1 Application. This will open a New Finder Window
  • Select your Arduino 1.0.1 Application
  • Click on the icon that says "Perform Tasks for Selected Item" when you hover over it
  • Select Show Package Contents
  • Double Click Contents; Double Click Resources; Double Click Java; Double Click Libraries
You can paste your new Library into this open folder, then restart Arduino 1.0.1 to see the new Library.
You can also do this from the Terminal.Starting at your Downloads folder (or wherever you have the new Library):
cp -R NewLibraryName /Applications/'Arduino 1.0.1.app'/Contents/Resources/Java/libraries/NewLibraryName
The -R is to recurse the new folder for all its contents.

May 21, 2012

Windows XP Install - Fix for "Can't Activate/Can't Login" Problem

I recently bought a refurbished HP/Compaq DC7600 for  < $100 for a client of mine. This unit came with Windows XP installed, included a valid (special refurb) COA and a CD with Windows XP and SP 3 slipstreamed on the same disk. That was worth $100 right there!

Powered the unit up and was treated with the Dialog Box, "Can't login, you must Activate first". OK, let's activate. "Cannot connect to activation server". Uh, oh - networking isn't set up, I need to login for that. So, I can't login until I activate, and I can't activate until I login!
Zugzwang!
I googled a bit for how other people fixed this one. Got the idea from them to use Safe Mode under Administrator, (NOT Safe Mode with Network). The I used the "Setup Internet Connections" wizard under Control Panel. Rebooted. Bingo! Activation complete.

May 18, 2012

LED Edge-lit Acrylic Valentine's Day Sign


Img_0759




This project is a variation of the work of yergacheffe at the atomsandelectrons blog. I wanted to create a Valentine's Day present for my wife, and thought a nice edge-lit sign would go over well.

On his recommendation, I tried out some octobrites from macetech. Although I have some experience with arduino and other electronics projects, I quickly realized I would have to really dig into how the octobrites work in order to achieve the effects I wanted. I didn't have that kind of time, Valentine's Day was quickly approaching, so I decided to go with an array of 10 Ultra-bright white LEDs available from adafruit.com. I used the LED Array calculator to determine the resistor values for the array. Note: you need to know the Forward Voltage value and Foward Current value of your LEDs to use this calculator, but that is easily obtained from the LED data sheet.

Img_0755


I used an adafruit Perma-proto full-sized PCB as the base for the array, cutting the board in half length-wise to fit. I used a Dremel-like rotary tool to cut out the base and shadow box of an IKEA picture frame as yergacheffe did. I was surprised that I was getting smoke off the material as I cut it. I used fluorescent red acrylic, 1/8" thick cut on a TechShop Epilog Laser. The actual heart logo was clip art I grabbed from the web, then did some smoothing in CorelDraw. I used the trick yergacheffe discovered of mirror-etching the sign on the front of  the acrylic, then mounting the sign reversed so the text was the correct orientation and was brighter. Good tip!

Img_0757



Finally, I added a switch and a 5V voltage regulator circuit. That way, I could use either a battery or wall power to light the sign. The result is a bit dim, even on wall power, but where my wife has placed it, it's plenty bright.


Img_0758








May 17, 2012

Music Box Based on ATTINY45


Img_0753
Img_0754
Img_0751
Img_0752
I saw this post (http://elm-chan.org/works/mxb/report.html) about WaveTable synthesis and creating "music box" like sounds on an ATTINY45 and thought I would try it. That post documented the code and schematics needed to build a "music box" song generator. I have some experience with the Arduino platform but hadn't used the ATTINY before, although I bought some to have for future projects. Chan laid out enough info to get started with this project, code and a schematic, so i rigged up an Adafruit USBtinyISP to a breadboard with the MCU and loaded Chan's code with avrdude. Rigged up a test with a small Radio Shack speaker and it worked like a charm!There's a saying in Science Fiction writing, "Make the metaphor real", so I thought, why not make this look like a real music box? I got a craft "treasure box" at Michael's Art Supply for around $1.00. Then, I downloaded some clip art of musical staffs with notes on them. I combined these with some text and laser cut the top of the craft box with an Epilog 60W laser at TechShop SF.
Next, I got a hole saw drill bit about the diameter of the speaker I had and cut a hole in the craft box, gluing the speaker down. I found a Mercury switch at Fry's - this would turn on the music when the top was tilted open. A better choice would have been magnetic switches, freely available on eBay. The Mercury switch will activate if you tilt the whole box, not a desirable effect.
I put a laser cut piece of mirror acrylic over the works to hide them and feel more like a real music box, just held in by friction. I cobbled this all together with a deadline of my wife's birthday. She was delighted to receive such a cute, personal gift.