Saturday, November 28, 2009

Minimal Arduino?

I prefer breadboard-friendly Arduino-compatible boards like Boarduino and iDuino, but I keep wanting functionality people have built into shields like Adafruit's Motor Shield and Batsocks' TellyMate Shield.

All I want in an Arduino:
  • ATmega328
  • FTDI programming header
  • Arduino "form factor" with odd D7/D8 spacing and standoff holes
Sorting my Arduino-compatible board spreadsheet first by price, then by form factor, it seems the lowest price for a shield-compatible board is ~$17 for a serial Freeduino, compared to ~$10 for a Dorkboard, though the latter comes with an ATmega168, not a 328.

Necessary items:
  • microcontroller: ATmega328, socket, capacitor
  • clock: oscillator and 2 caps, or a resonator
  • reset: 90-degree (side) button, 10K resistor
  • FTDI cable interface: 6-pin header, capacitor
  • Power: Barrel connector, 2-pin header
Extra interface header pin pads:
  • icsp (2x3)
  • i2c (4)
  • spi (6) (nah)
Simple extras, parts not provided:
  • Power indicator: LED, 1K resistor
  • TX/RX indicators: 2 more LEDs, 2 more 1K resistors
  • Power regulation: 7805, 2 capacitors, jumper
  • Diode to prevent inverted power hookup
I'm traveling for the next month so this will be a fun little layout project, perhaps as a way to learn kicad (as opposed to EAGLE, which I currently use) and to explore board house pricing and specs. The goal is to be able to produce a $10 kit (cost), which may be possible given how many goodies SparkFun includes in their $20 Arduino Pro 328.

Update 12/29: I got a single-sided board laid out with just four jumpers, and I'll tear it up and redo it with the programming header where I want it, jumping TX and RX across the board. The files for the "Severino" single-sided board helped me figure out the routing.

Wednesday, November 18, 2009

PPAC Demo Video

The inflation feature demonstrated with the bed unoccupied:

(Sorry for removing the original video, but... I promised Liz I'd remove it!)

Tuesday, November 17, 2009

Getting Out Of Bed: PPAC Major Components

The "Princess and the Pea Alarm Clock" (PPAC) has been working beautifully, waking me up with "buzz" alarms and literally getting me out of bed with "inflate" alarm functions! I will post more photos and videos soon, but first to outline the alarm clock's major components:
  • Alarm clock: LeSueur peas tin can containing the main circuit board, jog/shuttle dial and button input, 16x2 character LCD display, modular handset cord jack, and female 6-pin FTDI cable jack.
  • Power block: Power input/output circuit mounted in a plastic iPod Nano box, with input DC power jack and regulator, relay input power jack, two relay-switched output jacks, modular handset cord jack, status LEDs, and main power switch.
  • Valve tree: Brass and plastic fittings around the main trigger solenoid-controlled sprinkler valve, with quick-release fittings on both ends, manual safety valve before the trigger valve, and manual release valve.
  • Air pressure source: 10-gallon (red) or 5-gallon (yellow) air tanks, both with pressure gauges and female quick-release connectors, usually filled to 110-120psi.
  • Air bladder, aka "Pea": Green exercise ball between my mattress and box spring, with a hose ending in a male quick release fitting.

Monday, November 16, 2009

Silly Alarm Clocks

I've been bookmarking funny alarm clocks for a while-- snoozing is so universal, and I get a kick out of the features people choose to include in their wake-up devices to ensure that they actually get out of bed. While not Arduino- or ATmega-based, here are a few of my favorites:
  • Clocky news popped early 2007, and it took me about a minute to place an order-- had to have one as soon as possible! It was too easy to just turn on its side, though, with the side of a tire as the base, so it spins around on my night stand instead of taking off. Cones on the end might prevent that, but I still love it, and it got me thinking seriously about my old inflating alarm clock idea, so is probably the single biggest inspiration for the PPAC.
  • The Pneumatic Bed Shaking Alarm Clock was built for Toronto's "The Edge" 102.1 "World's Biggest" contest and while it seems too violent to be used every day, its maker claims to have used it to get up for four years! This may be the epitome of taking a silly alarm clock idea too far, and I have nothing but the utmost respect for its maker.
  • The Perfect Wake-up Machine, a design project by students a Colorado State University, assaults all senses with its control of just about anything. Serial communication, a few PIC chips, and multiple power systems combine to make a beast of an alarm clock-- kudos for overkill!
  • "The World's Loudest Alarm Clock was a simple but effective build by Kip Kedersha (aka "Kipkay"), replacing a cheap alarm clock's speaker with two sirens for a deafening wake-up experience. Like The World's Biggest Alarm Clock, I can't see this as something anybody would want to use a second time!
  • Alarm Clock/Bedpost "-MAWD-" is an odd refitting of an alarm clock, lamp, and speaker into a tube attached to a bedpost. Most notable for being the product of a one-night, I'll-do-it-right-now!-inspired fit of tinkering, it has "silly hacker" written all over it. I love the tangle of wires supporting the LCD.

Tuesday, October 13, 2009

4-Way Button: Click, Double-Click, Hold, Long Hold

How many ways can a button be clicked? [Anonymous] commented asking about double-clicking after my "Click for A, Press and Hold for B" post, and I finally got around to it, adding a long hold function too. Last night I tidied up the code and debugged obscure outlier cases, and the result is a simple 4-way button function which can report click, double-click, hold, and long hold events.

When used with a rotary input (pot, rotary encoder, jog-shuttle, etc), complex branching menus are easy to implement. Note that the long hold event always triggers a "normal" hold event first, while single- and double-click are completely independent (as well as being independent from the hold events).

I've posted code in the first two comments-- the tabs of my test sketch, with the second comment containing the checkButton() function. This seems like a good candidate for my first proper library; I would appreciate any help in getting this example sketch converted into an easily instantiated object, like AlphaBeta's Button library.

Thursday, September 10, 2009

Strobit Wireless Camera Trigger

Stephen Eaton has been working on a wireless, low voltage Arduino for camera trigger applications: Strobit. After a call to geekdom in 9/2007, the project has gotten to the point that boards have been manufactured and are being tested.

The project page at Gcode has lots of information, there are photo sets on Flickr-- board development progress and some photos taken using prototypes-- and an Arduino Forum thread with a few questions answered. I continue to be impressed by the level of sophistication people have been putting into their Arduino-compatible boards.

Friday, August 21, 2009

Illuminato X Machina... WOW!

From the folks at Liquidware who brought us the beautiful Illuminato Arduino variant and numerous shields comes the (ahem) WTF?!-board Illuminato X Machina (announcement here), described by Wired writer Priya Ganapati as:
"...a motherboard prototype that uses separate modules, each of which has its own processor, memory and storage. Each square cell in this design serves as a mini-motherboard and network node; the cells can allocate power and decide to accept or reject incoming transmissions and programs independently. Together, they form a networked cluster with significantly greater power than the individual modules."
The small board, cleverly sold alone or in 4-, 9- and 16-packs aims to be a different model for computing hardware, with power and data I/O on all four sides, and while it's hard to imagine applications, it's an impressive example of the power of open source hardware and clever design.

Sunday, July 19, 2009

PPAC Progress: UP!

I've been working on (mostly) minor tweaks to the alarm clock:
  • The can I had used to test mounting techniques served its purpose as a prototype, so I redid the mounting in a fresh can, with adjusted positioning of the LCD and (new) lit button, with use three screws per end cap instead of two. I scanned the LeSueur label and printed a copy to test the positioning of the LCD, button, and power/relay port cutouts.
  • I over-tightened the plastic ring which opens the output valve of my 10-gallon air tank, leaving me with a sealed can at 105psi! I bought a 5-gallon tank as a replacement, figuring it would be fine for a full run, and was impressed by its lightness. I "fixed" the 10-gallon tank's valve by cutting off the plastic ring, so I can turn the open/close with a small wrench, so now have 15 gallons to pressurize.
  • Testing the 5-gallon tank at 100psi, the plastic "open" safety valve popped a leak, so today I replaced all pre-solenoid valve hardware with brass-- no more leak!
  • Since the emptying valve didn't get enough pressure from the inflated "pea" to open, I replaced it with a manual valve-- not as elegant, but the alarm is about inflation, not deflation.
  • The alarm was still triggering when the alarm was "off" and the target time was reached, plus there were a few small bugs to work out.
  • The maximum inflation time was set arbitrarily at 30s, so I added another click+hold "hidden" mode branched from the alarm mode selection so the max inflate time can be adjusted. It's also stored to (Arduino) EEPROM with other "system" parameters.
The IDE tells me I still have a little headroom:
"Binary sketch size: 13566 bytes (of a 14336 byte maximum)"
I'm tweaking the program a but more, but it's late and I'm so happy with how far it has come! I plan to be woken up rudely in the morning...:D

Tuesday, June 16, 2009

LCD difficulties

After putting together a schematic in EAGLE for the shower control circuit, I tinkered a bit trying to get a scrounged Powertip PC1602-G character LCD working. Serial LCDs from SparkFun are easy to use but expensive, in addition to hogging the serial port and being available only in 16x2 and 20x4; I'd like to be able to use cheapo 8x2 or other displays.

I soldered on a pin header and got to breadboarding it with an iDuino, but quickly discovered that the tutorials are pretty haphazard, and I wasn't able to get any output using the LiquidCrystal library in spite of quadruple-checking my schematic and breadboard connections.

I tried Limor's tutorial but got no result, and I think editing the library to set the pins is an odd (wrong?) way for a library to work. I even used the exact same pins-- no dice. I wonder if the scrounged LCDs I'm using have custom commands that makes them incompatible with the library-- I need to try a different LCD, and maybe use Massimo's raw example.

Update: In a comment, Al asked if the LCDs I was trying weren't HD44780-compatible at all and... oops, thats the problem! I got it working fine with an LCD scrounged from an old Brady Labelmaker, which contains an actual Toshiba HD44780.

Saturday, June 6, 2009

Xcode > Arduino?

After bookmarking melka's Xcode Arduino template the other night, it was funny to see it posted the next morning on the Make: blog-- all signs point to Xcode, so here I go. Not having experience with a full-featured IDE or "real" C++ development, it should be an interesting learning experience.

The first thing I had to do was get the latest Xcode, 3.1.2, a 995.9MB download-- I installed 3.0 a while ago, but it complained when I tried to open melka's template. Got it installed, then went through melka's README and... everything worked!

I screwed up the first run through by renaming and moving the project. On the second try, I copied the unzipped "Arduino Base Template" to my desktop as "ArduinoBaseTemplate" and everything worked with the new template in Library/.../Project Templates/Arduino.

All is not wine and roses, though-- a test sketch that worked fine in the Arduino IDE gives me a lot of errors in Xcode, all related to the order I'm declaring things-- I generally define functions after my setup() and loop() calls, but Xcode gives me "was not declared in this scope" errors for all of them. It seems I do need to learn the basics of C++ to get this working. How to get a crash course in this stuff? Google came up with "C++ Language Tutorial" so, more to read...

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.

Tuesday, April 21, 2009

PPAC Progress: RTC, Jog/Shuttle

I got my old test sketches working again for the DS1307 clock and jog/shuttle controller, and suddenly everything is working...:) It's "just" a matter of software and hardware layout at this point [gulp!].

RepRap Day?

4/20 has been a banner day for the RepRap Foundation with the release of the V2.2 extruder controller board and news of the first RepRap-printed circuit board.

The controller includes H-bridges, MOSFET drivers, RS485, thermistor circuit, and lots of little niceties. While currently offered only as a $30 SMT kit, the impressive assembly how-to makes surface-mount soldering look not so scary.

And printing a circuit board is... just astounding! For all the criticism levied against RepRap's claims of (eventual) self-replication, this step says to me that RepRap has real legs-- it's not just an open source 3D CNC platform with an insane goal. The resulting board functions as an optical end stop for a RepRap-- to Rhys Jones, I offer my humble [APPLAUSE]!!!

Thursday, April 9, 2009

BrewTroller Brewing Control System

Excellent project out today: BrewTroller - Brewing Control System. Starting with the Sanguino layout, Jeremiah Dillingham built out a custom 1-sided board with a great interface-- rotary encoder and character LCD display. Nice use of RJ11 connectors for temperature sensor input, plus a 6-pin rotary encoder header and screw terminals for other connections. (via Hacked Gadgets)

Wednesday, April 8, 2009

Smapler v0001r2 by BlushingBoy

That's a lot built-in-- audio out, SD, keyboard port, vreg... doesn't expose pins so is it "Arduino-compatible"? Very nice-- I like blushingboy's stuff.

Prioritizing Projects

Too many parts and projects lying around-- need to nail down an order and finish something soon!

PPAC should be the first priority-- I've gotten it to work, but attempts at packaging it have been held up by the fact that I'm still not sure about UI and whether I even want to use high pressure air or a pump. Would be great for a contest, but not unless it's (1) done and (2) demonstrated through video. First-things-first time:

  • EAGLE: set up with display, jog/shuttle, RTC, buttons, switch, power, and output. Don't worry about whether output is to relays or oo's,
  • Arduino: get a good program working on the breadboarded circuit,
  • Figure out best fill/empty plan,
  • THEN start laying it out in 3D for the final build.

Next up (while figuring out ppac fill/empty plan) is a working growduino with relays, no sensing, no logging, and no solar-- don't try everything at once! Better to get something growing.

The invervalometer is so close, but needs:

  • To be reeled back to the breadboard after the stuffing problem-- Arduino OK?!
  • Panasonic-capable trigger,
  • Serious power system consideration.

The mutetater should be a simple build:

  • Limit to Sony since that's easy to read, and I have Samid's old Sony TV,
  • Breadboard > potato should be simple using a dorkboard with female header pins.

Tuesday, March 24, 2009

Comprehensive Arduino-Compatible Hardware List?

I can't find a complete list anywhere, so here's my stab at it, starting with the list at, Make's 2008 Arduino Gift Guide, Freeduino, Adafruit, Sparkfun, Seeed Studio, RepRap, Wulfden, [more]. Not sure about the Orangutan and mpguino since not all pins are exposed, and unsure of Teensy boards since they need custom Arduino IDEs.

Update (June 16): I revised the spreadsheet and messed around with font and cell sizes to make it more easily viewed in-line here, plus it should update automatically as I add or edit boards. Happy hacking!

Update... ALL THE TIME!: This is constantly being updated as new Arduino-compatible boards are announced!

Click here for the spreadsheet on its own in Google Docs.


After trying to stuff the intervalometer circuit into a jar a few days ago, it just hasn't worked right. LCD goes blank in trigger and shoot modes, and it doesn't trigger the camera, though the serial output is right. The backlight "peek" function has stopped working too.

Using the protoshield on my "proper" Arduino has been too limiting space-wise anyway-- time to transfer to a bigger breadboard with an Boarduino or iDuino to sort things out and finalize the controls and ports in Eagle, plus I'll have room to mess with audio amplifier circuits and FZ20 vs. EOS remotes.

Had an idea about an Arduino variant this morning (in the shower of course) but wonder if something like it has been made already... is there a comprehensive list of *duinos anywhere?

Monday, March 16, 2009

IR receiving success

Following this example on, I'm reading remote codes from all of my Sony remote controls-- works like a charm! Need to make sense of the Arduino timing code, then I'll try the RC5 example from

Update: I programmed all of the codes for my RMT-V203A and even took it apart to put the window back in and to try getting FF to work-- still no good. Found a list of Sony VCR codes and commands, and it looks like that's them, with 1408 added, or 10110000000.

Mutetater: IR work

I was able to get an IR LED to snap the trigger on my Rebel XT following jaycee's example in the Arduino forum-- pretty simple code.

It looks like I'll need to use more complicated, standard remote control protocols for "mute"-- RC5, RC5X and RC6 come up in searches, and Allesandro Lambardi did much of the legwork programming Arduino to read RC5 signals.

Time to dig through the TV-B-Gone threads at Limor's forums...

Ping... ing... ing...

Using a bunch of Arduinos for projects, it makes sense to post about it to help keep track of what I'm doing.

Current in-progress projects:
  • PPAC: Princess and the Pea Alarm clock: "pea" inflates to eject whiny princess (or, um, me) from bed,
  • Intervalometer-in-a-jar or "intervalomejar": time lapse camera controller with beam break, light level, and audio triggers,
  • Mutetater: TV mute control with a potato (seriously),
  • EL-wire suit: audio level meter of EL-wire,
  • Cheapo general-purpose PID-based temperature controller,
  • Growduino w/logging, solar power,
  • Smart shower controller,
  • [more...]