Nomadness

Tales of the new direction at Nomadic Research Labs... the move to a ship named Nomadness

My Photo
Name: Steve Roberts
Location: Camano Island, Washington, United States

Friday, January 30, 2009

Busy Boxes

'Tis a busy time, this January in the Nomadhouse: a wonderful visit from my daughter, Zen Cart learning curve, Satie's Gnossiennes, stoking the home fires, magnetized boat curtains, lab entropy reduction, and plunging into ship network design... and that's just the fun stuff, interrupted too often by the psychic energy sinks of daily life and a sore back. But the show goes on, with a diffuse sense of progress reflecting the classic "gain-bandwidth tradeoff" so tidily that I have a tangible sense of enhanced Q when I manage to focus on one thing for more than a few hours.

The area under a broad low curve is the same as that under a tall narrow one, reflecting a total expenditure of human energy on either lots of things at once (with minimal progress on each), or one thing at a time (with corresponding lurches forward whilst ignoring the rest). The former would seem to be worse, given context-switching overhead, but the latter carries its own hazards... like losing momentum on any project not currently in the spotlight. Being finite sucks.

Well, enough moaning about the twisted geek metaphors of sloth-avoidance. Things are going well... with shipnet development on center stage.

The Node S Busy Box

I mentioned last time that the first node under development is Sewage, and it is now well along. My initial test setup in the form of stiff dipswitches in the proto-board was not at all pleasant, so I tossed that and built a proper simulator, reflecting actual hardware. This is the first of many such "busy boxes" cobbled together from old junk around the lab, and they will allow software development in a realistic hardware environment that can then be ported directly to the ship.


It's not the prettiest thing, but has all the I/O needed (plus a vehicle back-up alarm mounted behind the 6x10-inch panel). The three "valves" correspond to the holding-tank thru-hull stopcock, tank vent, and overboard sink drain... and the toggle switches simulate the pump circuit breaker, macerator switch, and a sensor on the diaphragm pump for the Lavac head. The 3-position dipswitch will let me test the tank-sensor interface code, and the gadget on the right is a float switch that will detect water in the bilge. And there are three LEDs: the "OK" blinkie, a warning to avert firing up the macerator if the thru-hull is blocked, and another to remotely show a tank-full condition in the head compartment.

All these just have #22 solid wire leads, and thus play nice with the Arduino node and its prototyping shield mounted on the baseplate behind the panel. I considered using toggle switches for the valves as well, but preferred to have a visual indication that reflects the reality of the boat (and also get familiar with any contact-bounce or other artifacts in the magnetic reed switches used to detect their position). I milled a little flat on the tail of each handle, then used Gorilla Glue to attach a neodymium magnet:


This freehand-kluge stuff will be discarded when the system moves to the boat, but it will make development and testing much more realistic.

Nodes V and X

Once the Sewage node is done and I have a source of test data, the next two are in the domain of infrastructure (and will be fun ones). The Voice node is a carryover from my BEHEMOTH and Microship projects, both of which had similar functionality: it has a DTMF decoder to allow commands from a hand-held UHF ham radio, and a speech synthesizer to enable voice responses. The speech strings can be internally generated from the node's updated copy of all ship data points, or dictated from higher-up when the Hub has something to say. All the parts for this are on-hand, and I'm looking forward to building it...

The other one is the Crossbar node (X), which deviates from my previous 8816-based architecture in favor of a sparse matrix of DPDT latching relays driven by long-chain HC595 SPI shift registers. Working in tandem with the console mixer, this will let any audio or video source talk to any "sink," introducing such features as enabling the Node V speech synthesizer to be routed not only to the ham radio, but to cell phone, local speakers, Skype session, marine VHF, recorder, and so on.

Latching relays may seem a bit retro when we could do it all with codecs and routing software, but they are media-agnostic, have no appreciable insertion loss, draw no power except during state transitions, and are simple. Video might be a little messy when switching, but the dozen or so cameras around the ship are not genlocked anyway, so I might just cobble a little transition-fader to eliminate the sync glitch.

Incidentally, there appear to be 15 nodes in the plan at the moment, most of which are simple I/O concentrators for a collection of local sensors. If you have Arduino experience and would like to take one on, please let me know... I miss the good old days of development teams and volunteers. Being in the remote forest of Camano is not at all like the heart of Silicon Valley; my best memories of the BEHEMOTH project involve energetic evenings with fellow geeks in the bikelab... often capped with Tony & Alba's pizza.

Nomadic Research Labs Online Store

Thanks, folks, for your suggestions on my question about where to hang the shingle. I've decided to keep the Boat Hacking name for the book about that subject, but the store is more general. The domain will be my long-dormant nomadicresearchlabs.com, which at this writing still redirects to microship.com, but is about to get a Zen Cart installation. It's a business name I've been using for a couple of decades now, and better reflects the full range of goodies I intend to offer.

I think this is going to be fun, and not only because I really need to make a living while having all this other fun. The initial focus will be on the intersection between mainstream marine electronics and the world of high geekery, along with a few other things that happen to fit. This includes tools and parts for setting up a mobile lab, kits for my own designs, favorite gizmos and gadgets, related publications, and even a bit of NRL surplus (a Microship, anyone?).

The learning curves are steep... online payment APIs, SSL certificates, template overrides, vendor relationships, accounting, and an unfamiliar level of formality regarding inventory. I think the store will flicker to life sometime in February, and hopefully will develop in parallel with the other projects so it won't be too disruptive (speaking of gain-bandwidth issues...)

Soft Goods

Sky and Karen are working on the new boat curtains, and early indications are that they will provide a lush alternative to the stark fishbowl look of those large windows (especially at night in a marina). They are made of two layers: a light UV-resistant material outside and a dark blue textured fabric inside... reversable for use when bright interior lighting is a high priority. Attachment is with powerful magnets, still in the experimental stage.

I bought some new Samson Pro-Set docklines last year, and Sky sewed the Seadog leather chafing gear, located where they seemed to make most sense. Over time, we discovered that different mooring situations call for rearrangement of the lines... sometimes with unprotected regions leading through chocks. A few weeks ago, I checked the boat after a big windstorm and found something disturbing:


It was a cheap lesson - I only lost a $36 dockline. But chafing gear is not optional!

Time to update a few variables and drop through a case structure when a command arrives via USB... I've really missed this stuff over the last few years.

Saturday, January 10, 2009

A Learning Curve Junkie in the Zone of Hackery

Wow, I haven't been in this mode for years, and I feel rusty! Downloading libraries, reading documentation, defining data structures, parsing strings, and even sketching a retro flowchart or two... this is definitely Good Times, but man, am I ever out of shape. But still, hot on the heels of installing Zen Cart for local development under MAMP and firing up a server on the Technologic TS-7200 ARM Linux board, my current plunge into Arduino development is like coming full circle and landing again in micro-land. That's where I most enjoy frolicking... where I can feel the bits between my toes, there is no vertigo in the address space, and raw I/O is just a statement away.


The workspace is artificially clean now, but that won't last long. This is the warm spot in the lab where I'll be doing all the embedded electronics and software, and before long there will be a big folding console in the midst of it, with dangling umbilici creating a trip hazard and exposed electronics rendering the space off-limits to Java-the-cat, who is drawn to warm novel nap sites.

The first node in the shipnet is SEWAGE, a good choice since it is both useful and easy. It has ten electronically-trivial sensor inputs, including magnetic sensors on the stopcocks for thru-hulls and tank vent, a flooding sensor, electrical observation of the macerator pump circuit, Lavac head pump-stroke counter, cabin and head compartment doors, and a hack into the commercial tank level sensor (which it reads by pretending to push the button and observing the LEDs). One of its important jobs is blinking a warning if the pump circuit breaker is on and the blackwater stopcock and vent are not open... and if a careless human persists and actually fires up the powerful macerator, a buzzer will scream loudly and the node will call the Hub for reinforcements. The problem is that this can create a catastrophic mess, ranging from a damaged valve to explosive decompression of raw sewage.

The node's routine activity is to collect simple data from those points and return it whenever requested by the hub, whereupon the values join the vast sensor map of the boat. From there it is databased with time stamps, used to answer queries from any of the comm channels, and presented graphically on the ship web server. This is one of about a dozen Arduino-based nodes, and they are joined by other data sources including the NMEA 2000 network and the Outback power system.

Here is the "hello, world" of simple I/O - a flooding sensor dangling temporarily off the Adafruit prototyping shield atop the board, with an LED reflecting the state of the magnetic reed switch. Trivial program, but that means everything in the chain is working... and is the first hurdle in getting familiar with new tools:


The next step is to cobble together a simulator for all the I/O the node will encounter, and write the program. This includes some string processing to deal with a small repertoire of 8 commands, but of course I first have to get clear on some fundamentals to streamline things at the other end (like slurping it tidily into the database). The first question, which occupied me for much of this exciting Saturday night in the lab, was whether to use key-value pairs or comma-delimited sentences reminiscent of NMEA 0183. I seriously considered fixed-format point IDs like the PGNs in NMEA 2000 (and may still), but in a small system like this I am fond of having everything human-readable. I want to be able to type a command from a terminal and see understandable text... not have to use a reference manual to translate numeric addresses into names of valves, or count commas to find the number I want.

As this shapes up, the trade-offs will settle out, but none of this is an immediate impediment to bringing the first node online.

The Hub

I have still not made a final choice on the always-on computer that will talk to all these little guys while also acting as ship's server, archivist, and general apps engine. As I mentioned in a previous posting, my first aesthetic choice would be a Mac Mini, though they do draw about 20 watts (and I was most disappointed to not see a rumored new model announced at MacWorld). I've also been growing very intrigued with a low-power Ubuntu Linux machine (which I won't name just yet, but very likely soon), and that got me thinking about a role for the Technologic TS-7200 acquired for the original Shacktopus system:


This is a sweet board, currently sitting beside me on the bench running Apache. It is hilarious to FTP to it from the Mac and realize it feels and acts just like a distant server, yet only draws 400 mA of 5 volts. It would never stand up to a slashdotting, of course, but in this context it is surprisingly robust. The ship does need a "back door" node, reachable from the Net and empowered to answer queries and perform maintenance on the main system... I had considered the Make Controller for that, but it has no file system, network services, or USB host port. So this may yet find itself integrated into the nautical reincarnation of Shacktopus.

The Boat Hacking Emporium

A room full of merchandise may sound like an anchor for one who is trying to get nomadic, but I'm making good progress on the new online store... and have even lined up some excellent dealerships. My intent, of course, is to render the physical side of this business clearly defined enough that it can be handled by a manager, helping to amortize the expense of keeping home base operational while we're gallivanting about. Besides, like most folks, I've been hammered by the economy... I need to deploy more nickel generators while I can!

The puzzle now is where in my tangled namespace this should live. Not including domains I maintain for non-technical friends and a few strays unrelated to boat geekery, I have these:

BOATHACKING.COM - for the new book and maybe the store
DATAWAKE.COM - the streaming data-collection project
GONZOENGINEERING.COM - too nice to pass up
MICROSHIP.COM - my front door
MICROSHIP.NET - defensive position
MICROSHIP.ORG - defensive position
NOMADICRESEARCHLABS.COM - company name, but too long
NOMADNESS.COM - you are here!
RIGNEXUS.COM - part of Shacktopus
SHACK2GO.COM - a fleeting product name idea, also related to Shacky
SHACKTOGO.COM - variant on above
SHACKTOPUS.COM - bringing this back to life as part of the ship
SHOALDRAFT.COM - silly idea over a beer one night
TECHNOMADIC.COM - small store for spin-off products

I've already let a couple go (at $15 each per year, it adds up) - Pedarka and Kayaktopus were never going to be as useful as I thought during that first neologistic buzz, though Shacktogo is cute for a portable ham-radio station. But what I really need to figure out is where to best place a store... and I'm assuming that is not in a subdirectory of another site, even though my two main ones have very nice page rank.

If someone has been through this exercise and would like to share a few thoughts, I'd appreciate it. My current thought is to use boathacking.com for that, and give it a subdirectory for material related to the new book.

Back to it! I feel the urge to twiddle some bits... but first, speaking of learning curves, this is wonderful:

Monday, January 05, 2009

Intertwined Fronts, Stereo, and the Microship

Cold, dark winter days are demotivating and I didn't get it together to go see how the boat handles a foot of snow loading, but I am happy to report progress on three simultaneous fronts: the ship's Shacktopus network, the Boat Hacking book, and an online store to conjure a nickel generator from the first two.

I have been writing in the exquisitely agile Scrivener environment that allows me to see the whole book project in parallel, at any level of granularity... yet encourages drilling in at any point to write (with a full-screen mode to hide the cluttered desktop, or a split-screen mode to deal with reference material). What is fun about this is the way the book has become a live development document that drives the ship system design. I theorized that this might work, but during the first few weeks of doing it in Apple's Pages, I found the process cumbersome, sequential, and very layout-oriented. Scrivener has fixed that, providing a context for big-picture brainstorming with smooth transition into finished text at any point. If you are contemplating a book, you owe it to yourself to check this out; it was written by an author because it was sorely needed, and the price is completely sane ($40). If I didn't already use a Mac, I'd probably get one just to run this and OmniFocus, which have quickly become indispensable tools around here.


Anyway, the book is now 10,671 words along and taking shape nicely, with all the chapters on virtual index cards pinned to a corkboard. After a few dozen pages of context-setting, there is a chapter called the "Node Catalogue" with one section for every Arduino or other widget hanging off the USB hierarchy. This was intended as a clear way to explain the system to readers, but I have been amazed to discover that it is an even clearer way to explain it to myself. The design has thus been stabilizing dramatically (complete with cruft-reduction and modular task definition, which is the only way to keep it real). I've already begun the first simple node (Sewage), as well as the initial process in the hub that scans all nodes to deliver queued messages and build a table of data points. This in turn has subscribers in the form of the Datawake archivist, security/watch software, and web server.

If things continue in this vein, I might actually have a book ready shortly after the system is buttoned up. That would be a first.

While all this has been going on, I have been working on the online store... and have started lining up dealerships, selected the shopping cart software, and planned the overall organization. It should go online in embryonic form sometime in the next couple of months, and I'm looking forward to it; at the age of 21, I cut my business teeth back in Louisville with a mail-order electronic parts business called Cybertronic Systems, and have missed it ever since. The plan, of course, is for this to provide another cash-flow generator to help justify a competent full-time home-base manager.

Console Integration

I haven't started fabrication of the ship's nerve center yet, but it is fairly well defined. A corkboard (the real kind this time) is on my lab wall with an actual-size console delineated with yarn and pins. Manila folder cut-outs show all the equipment front panels, and I can move them around with push pins. It's crude, by CAD standards, but having a full-scale mockup has always been most useful to me at this stage, since I can feel it.

The console is 40" wide and 15" tall, and it opens fully for access: the enclosure rolls forward on embedded rubber wheels, the front panel hinges down, and the top panel flops forward onto the same plane. This exposes all the microprocessors, interface hardware, and other goodies, opening it up onto a single 40x45-inch surface that is workbench height at the boat's original nav station.

As with BEHEMOTH and Microship before, I suspect the biggest single engineering problem will be radi0-frequency interference (RFI)... computers and radios really don't like each other very much, and this system has dozens of each. This is a very good reason to start bringing subsystems online the moment they are installed, rather than waiting until all the packaging is done to invoke the smoke test and listen to the chorus of birdies from DC to daylight.

The Ship Stereo

It seemed at first a bit of an extravagance, but I bought the only marine stereo I could find that met all the desired specifications... you can click this little photo for a new window with product information about the Fusion MS-IP500:
MS-IP500 TrueMarine iPod Stereo
This thing is amazing. The iPod docks inside a waterproof compartment, with its complete user interface brought out to the front panel and integrated with the stereo's own controls. It accepts a black-box Sirius satellite tuner, has line level inputs (and outputs for all zones), uses a class-D amplifier that wastes much less power, and even has a CANbus interface for the zone remotes. With my iPod classic tucked inside, this thing has more hard drive space than my laptop (and sounds spectacular)!


Somebody finally got marine stereo right, and I look forward to getting rid of the existing CD widget with gratuitously blinky front panel, non-intuitive interface, and the Radio Shack speaker selector switch box whose guts are dangling into the power distribution bay (which is itself about to get a major makeover with Outback gear next month).

Of course, my choice of the Fusion was no accident, nor was my choosing this moment to fiddle with it. This is the audio amp for all sources on the boat, not just music... and it will mount next to the Edirol M-16DX mixer as well as the sparse-matrix audio crossbar that is a distant relative to the rather grand 32x32 Auxbar we built for the Microship. I still haven't completely ruled that out, since it works so well, but I need a manual mixer for interactive tasks like podcasting and music, and a few channels of software-controlled configuration management are needed when we're in minimal-power configuration. So a board of latching relays next to a serious studio mixer is a nice, er, mix.

Previous Project Update

Speaking of my earlier technomadic contraptions, I have two updates for you.

First, BEHEMOTH is on display in the Computer History Museum as part of their Innovation in the Valley exhibit, and is still entertaining crowds as always. The bike has been enjoying all the attention (even getting loaned to the Williamson Gallery for an exhibit on bicycle art a while back!), but the Microship is still lying at the center of a mountain of lab clutter. Her hull hasn't felt the lappings of salt water since 2001, and this has been bothering me more and more.

It has been difficult to accept that after a decade of my life devoted to this project (along with all available resources), the planned 14,000-mile Clueless and Lark expedition will probably never happen. I have some rather serious back problems, not to mention other creakiness, and, ironically, an 18-ton steel ship is much more realistic for my future wanderings than an athletic little machine. But with all the focus on Nomadness, I wince every time I step around Wordplay... still poised for adventure in the Microship lab, awaiting her technomadic destiny.

It has thus become evident that she should probably find a new pilot, someone who is mediagenic, geeky, and insanely adventurous. I would expect to spend at least a full-time week or two with the skipper here in my lab, sharing all aspects of the design as well as the infrastructure it represents for an overlay of systems, and I'll also stay available for brainstorming and consultation as the new project develops. The boat sails like a dream (some heavy-hitter marine architecture consultants were on the design team), and is the resultant of over a dozen man-years of focused engineering work. This is a powerful substrate for a high-profile expedition, and that really needs to happen.


She won't be cheap compared to other boats of this scale, and she's certainly not for everyone. But for the right person, she could represent a huge shortcut in time and money compared to the R&D project that would be required to replicate this range of capabilities: pedal, electric, and sail propulsion; amphibian mode including folding akas and retractable landing gear; 480-watt solar integration; hydraulic controls; and much more.

I can help the new skipper brainstorm the "business model" of a Microship expedition to see if it might benefit from sponsorship, publishing deals, or other spin-offs. Of course, she can just be a high-tech nautical toy for one with deep pockets and a yen for engineering. But personally, I would prefer to see the boat achieve her originally intended purpose of an extended public journey through coastal and inland waterways, and for the right person there is a good probability of corporate and media support (given the continuity of my work over the past 25 years).

I am not mentioning any price tag because it depends on how much is included and the extent my own ongoing involvement, and there are some alternatives to outright purchase that involve more of a shared project. (If you're just looking for a low-cost one-person trimaran, this isn't it... you might want to consider the Hobie Adventure Island or the WindRider, both of which are excellent.)

There's a photo album over here if you want to look her over. Serious inquiries only, please.

Yearnings

I knew this winter was going to be hard; sometimes working on the boat from a distance is maddeningly abstract. The waterworks panel is still on the bench, awaiting one more trip to the ship to return with real numbers, and little scraps of paper remind me of stuff to take or pick up. The new electronics lab will be a great "ship simulator," but in a way it adds yet another level of indirection: mechanical assembly down in the shop, electronics and software design upstairs, the boat impossibly far away.

Was this really just a few months ago?


I'm ready to get back on the water.

Fair winter winds,
Steve