Monday, May 18, 2009

Alarm Clock Board Built!

Last night, I finished the board layout in EAGLE and got to work making it:
  • Turned off layers in EAGLE except layer 1 and pads, and printed to a PDF,
  • Rasterized PDF in Photoshop at 1200dpi and processed into a black+white image (right),
  • Laser printed onto an L.L. Bean catalog page, with the print output set to "transparency,"
  • Ironed onto 2.5" x 2.2" single-sided copper clad,
  • Fixed gaps with etch-resist pen,
  • Rubbed off paper and etched in ferric chloride for 15 minutes (though I'll use use the HCL and peroxide method in the future),
  • Rubbed away ink with acetone,
  • Tested trace continuity and scraped away tiny bridges with a knife,
  • Drilled out all holes (1mm bit),
  • Populated with parts and soldered it up,
  • Pressed chips into sockets,
  • Hooked up LCD, jog/shuttle, a button and LED.
It behaved exactly like it did on the breadboard! Now I can focus on the right button/LED combo and casing, redoing the relay board, and tightening up the program.

This is my first from-scratch Arduino-compatible board-- sure to be the first of many...:)

Thursday, May 14, 2009

Click for A, Press and Hold for B

I planned to add a time setting mode to the alarm clock later, as gravy-- thought I wouldn't need one since the clock chip keeps time-- but with the board not yet built, I keep accidentally disconnecting the DS1307's battery and needing to reset it with a special sketch.

That's a pain, so I'm adding it to the PPAC program next, and to keep the interface simple-- jog/shuttle and a button-- a press and hold event seems appropriate for switching into an otherwise hidden mode, like shutting down a MacBook by holding down the button instead of just clicking it.

Despite a few posted examples on debouncing a button press (explicitly or with a library), I couldn't find any press+hold examples, so I took a stab at it and got a test sketch working pretty quickly with a button and two indicator LEDs. The code is posted below, as a comment.

Wednesday, May 13, 2009

Paperduino, Hifiduino

Love the *duino naming scheme people are putting on their projects! Fun+easy to create a buzzword that conveys the function of an Arduino-based project. Two projects that have popped up on the internets in the last week that I thought were very cool:

Hifiduino: project blog by The Lazy Engineer chronicling his work to build a very slick Arduino-based hi-fi remote control. I especially like the casing work-- nicely assembled wooden box with its top made from an aluminum hard drive housing; one of the best uses of scrounged hardware I've seen. He has also chosen a lot of technologies I've been exploring in terms of (1) making an elegant interface with a single rotary encoder and display, and (2) using I2C chips for easy interfacing. The blog "extras" on the right are an excellent example of sharing, too, with links to code, examples, references, etc.

Paperduino: an Arduino circuit design by Guilherme Martins for introducing Arduino to neophytes in a workshop setting by having them build one from raw components on a 2-sided color printout. Beyond looking cool, it helps to get over the "soldering is hard" issue (pssst-- it's easy and fun!) and to understand the minimal necessary components to make a working Arduino circuit. Flickr set from the workshop, Paperduino PDF patterns.

PPAC Board V7.3: Hand Routed

Work on the main board (alarmduino?) is progressing nicely, but not without a false start-- after etching and building out the first board last week, I found that the 5-pin header to mate with the Futurlec DS1307 mini board was backwards! But the DS1307 doesn't need much circuitry, and the mini board had a lot of unused space, so I decided to revise the alarm clock main board with the clock built-in.

The latest PPAC layout has the DS1307 on the right side, with the battery holder on the bottom and interrupt going to A3; I would have tested the schematic on a breadboard tonight but I can't find any 10K resistors. I added an I2C EEPROM too (or, at least a socket for one-- I don't have the little sucker yet) for program settings, maybe a log of wake up times, and relief for the ATmega's built-in EEPROM.

Not to whine, but I'm getting impatient with EAGLE's autorouting for 1-layer boards-- I can usually find a route for the missed connections, and it's annoying to have to push around so many traces to fit them in. This board layout was routed completely by hand after EAGLE kept leaving at least four air wires. It might work as-is, or I may spread into the unused areas and widen the traces. Must resist the temptation to just etch it and build it before breadboarding the whole thing-- I want to have the program ready for this specific circuit, since I shuffled some pins around on the EAGLE layout after converting it from my previous working breadboard circuit.