by Steven K. Roberts
Nomadic Research Labs
Santa Clara, California
May 17, 1996

“So with a trimaran, you actually have THREE holes in the water to pour money into…”

— John Wharton, Stanford University, AMW, & Intel 8051 architect

Actually, it hasn’t been QUITE that exciting, but we do have news of incremental developments and a few other items of note…

SeXBAR… The Final Chapter

In our last episode, which includes complete schematics, the Serial Crossbar had just flickered to life and I was looking forward to writing the FORTH code to run it. This, I’m happy to say, went smoothly, and it works so well that it’s almost spooky.

The thing that makes it interesting is the little utility called POLTEST, a 3-line piece of code that connects the specified channel (which can be either pin of any of 32 serial ports) to the window comparator circuit nestled on a daughterboard between the crossbar itself and the connector matrix. This hands a 1 to an input port bit if the connected signal is active (either mark or space, to use the old RTTY terminology), or a 0 if it’s not. POLTEST inhales the channel number and exhales this flag.

That allows the calling word, SCONNECT, to do its magic. When it is invoked with the two desired serial port numbers on the stack, four calls to POLTEST are made to assemble a 4-bit value. If you think about it for a moment, you see that the only valid conditions for plugging two serial ports together are limited to four of the sixteen possible combinations of those bits. One line of each channel has to be transmitting, the other receiving. SCONNECT evaluates this, rejects situations in which one channel is all dead (or, highly unlikely, “crazy” with both bits transmitting), and then — here’s the good part — plugs the two channels together with either a virtual straight cable or a virtual null modem cable, as needed. It also returns the 4-bit value as a diagnostic aid.

The net effect? If the connectors physically fit and the devices are alive, they will talk to each other on the first try. This is not the RS-232 of my turbulent youth, in which the standard approach was to try every damn combination of 9- and 25-pin cables and adapters in the junkbox until it worked, sometimes resorting to physically swapping pins 2 and 3. This may sound rather trivial if you haven’t been there, in this happily plug and play era (well, for Mac users anyway!), but when hacking together a bunch of random devices it’s a true pleasure to have it be so easy, even peer-to-peer. (At one point I was connecting my HP OmniBook laptop to the bike’s speech synthesizer, and the FORTH code told me the laptop was not functioning. All sorts of theories involving power-saving serial port disabling and bad cables crossed my mind, until I noticed that the cable I had plugged into the SeXBAR terminated on the floor, not in the back of the laptop. Durn thing’s smarter than I am…)

With all that finished, it was a fairly simple matter to integrate it into the Hub and network as well. The connection between the former and the latter is now handled via the SeXBAR, making it very easy to talk to any other device on the ship with the Hub’s interrupt-driven serial channel with ring buffer (a lovely piece of code by Bill Muench that makes it easy to go back and parse received strings at your liesure). I eliminated the original latching relay that was in the loop here, for simplicity, but left the one that guarantees a correct connection from the Hub’s console to the Macintosh on startup. The twist is that it can be redirected to a SeXBAR address under software control, so for amusement I toggled the console between the Mac and the OmniBook with a pair of simple FORTH words.

The remaining serial hack is a small board that provides four bidirectional NMEA-RS232 conversion channels. The NMEA standard used by marine electronics is a single-ended, RS-422 system, which works best with an isolated differential receiver. To do it right and not depend on lucky compatibility as most people do (though it usually works), we’re putting an optocoupler in each line and using it to drive a MAX232 chip. A pain, but it should be bombproof. This will be a standalone board mounted next to the SeXBAR, with DB-9 jumpers to whatever channel is needed. Other than that, all the low level serial networking stuff is finally DONE, and I promise to stop talking about it!

AuXBAR, Meet SeXBAR

All this mucking about in crossbars got me thinking about the other two — audio and video — and how they need to be merged into the CAD system and generally cleaned up. The units were completed by UCSD students last year, but haven’t been fully integrated into our documentation and system software.

Microship Audio and Video Crossbars
The Audio and Video crossbars in Grand Central Station

I quickly came to the conclusion that having dedicated New Micros 68HC11 FORTH boards for each was a power and space extravagance… the poor things spend about 99.999% of their time waiting for a command, then whip through a few lines of thrilling code before going back to the ol’ grind. Even with A/V device power switching and DAT/VCR control to give them some variety, this is rather a waste of resources, so I decided to integrate the Audio Crossbar control system into either the Video Crossbar or the Hub. The former seemed conceptually more reasonable, but the latter was chosen for two reasons: AuXBAR and ViXBAR are radically different in hardware and software, and audio devices will almost always be active on the ship and should thus be controllable with minimal additional power cost and software fragility. The Hub was a perfect place to move it — AuXBAR and SeXBAR use identical Mitel 8816 chips and nearly identical driver code.

The hooks for that are all documented now, and the cabling is work in progress. We should be able to factor the FORTH a bit to take advantage of common logic, passing along a pointer to the relevant array as needed. Hardware only requires a decoder and some new ribbon cable headers on the nexus board.

When this is done (real soon now), the Grand Central Station level will be put into daily use in the lab. We have five miniature video cameras (the most recent two from Halted on a horse-trading deal), and I’ll write a task to serve up a succession of images to Faun’s recently completed AppleScript webcam tool that will let the Voyeurs of the Net keep an eye on us. We’ll also, just to exercise the whole system, run all our serial and audio devices, even the stereo and music on hold, through the matrix.

Endless Twists In Rigging

So you think electronics and computers are rife with trade-offs and difficult design decisions? Piece o’ cake. The real head-scratcher lately, largely because I don’t have enough information to make a truly informed decision, involves the rigging options. I’ve told you before about the F-31 rig that has been proposed by Ballenger… now I’m talking with Mike Leneman (from whom I bought the boat) about a rotating rig. This has the blessing of John Marples, Jim Antrim, and a number of other notables, and is distinguished by a bare minimum of standing rigging and the mast’s ability to turn as the boat tacks. Racers love this, of course, since a clean leading edge returns about half of the 30% efficiency loss attributable to that aerodynamically sloppy stick in exactly the wrong place, though John compared it to adding a turbocharger to the family station wagon in our case.

Indeed, raw performance is not really the motive here. Low cost and simplicity are. Basically, this thing is a mast with a stainless steel trailer ball in the base, sitting in a delrin socket encased in an aluminum box on the mast step. Three stays hold the whole thing up, terminating at mast hounds 20-25% of the way down from the top. A single set of spreaders and one set of diamond wires hold it in column.

The forestay would be our Mariner roller-furler from Frank Sharp, and the fact that it is oversized for this boat now becomes a feature since there is no inner forestay or other backup. The running backstays attach to existing chainplates embedded in ama bulkheads. The truly clever part involves raising and lowering, something that we need to be able to do easily. Mike just runs an extra headboard up the mast track with the main halyard, using it to tension a pair of temporary shrouds that terminate in the same axis as the pivot at the end of a control arm extending from the base of the mast. After capturing the pivot in a deck fixture, the whole thing is then winched down via a turning block at the bow, landing neatly, one would hope, in a nest molded into the radar arch. Collapsing the crossbeams (for a narrow slip) with the rig up involves the same procedure with temporary shrouds, plus conjuring a pseudo-backstay using the topping lift and mainsheet.

It all sounds wonderfully funky and elegantly simple, and cheaper besides. Some notable high-performance multis, such as the Antrim 30, have used rotating rigs… extending the performance advantage by molding carbon fiber spars in true airfoil shapes. Since the mast no longer destroys the airflow over the sail, it can be arbitrarily large — not only giving it better stiffness via a larger section but also evolving into a progression of higher performance rigs — wing masts and wing sails. We won’t go that far: I want something simple that can be put away in a blow.

And so, the saga continues… getting out for test sails this summer with a basic non-techno boat is a high priority, so I’m actively seeking and synthesizing opinions about the trade-offs of the two approaches.

Acks and News Bits

Thanks this issue go to David Martin (an old friend from the Early Days) and Barbara Chase (my former NRL base-office manager) for visiting last week and doing lots of sysadmin on the Microship SPARC. They installed the Apache httpd server and cleaned up various other things. I always feel just a bit inept around unix boxes, so it’s nice to have friends who know them well.

We did a kayaking jaunt a couple weekends back, arriving at the Cybercruise raft-up on our Current Designs Storms. “Sorry, I forgot to bring fenders,” I called jokingly to someone high above on the bow of his yacht. “You are the fenders,” he replied. We took off up Smith Slough for a few hours, paddling past the Redwood City airport while birdwatching and enjoying the exploration. These sloughs get VERY shallow at low tide, however, and we barely escaped having to slog through the mud. (Boating tip: when you can see birds standing in the water, it’s not deep enough for your boat.)

A jaunty tip o’ the captain’s hat goes to Dallas Semiconductor, for helping us out with interesting and creative chips when needed. We have some DS1305 clock chips enroute, allowing certain FORTH nodes to have access to real time via their SPI channel without needing to talk to the Hub about it. This is of particular interest to Faun, whose hydroponic garden controller wants to water the veggies even if the main system is down. Dallas has an amazingly innovative product line.

I gave a talk at Stanford a couple days ago, to a mixed audience of EE students and visitors. We’re keeping our fingers crossed… I’d love to work with Stanford EE and ME student project teams, and this presentation helped make the initial contacts. Some of the upcoming control system projects will be exceedingly interesting (and challenging) — just right for Stanford students!

Finally, in volunteer news, Ken Glaeser is enroute from Wisconsin to spend 2-3 weeks working on the project with us between terms at wisc.edu (hey, I wonder if schools will eventually stop calling themselves “University of…” and just start using the .edu form? Of course, this might lead one to pan a particularly bad school by calling it “Much .edu about nothing.” Yes, I know that was totally off-topic, but all guarantees of continuity are off when opportunities for wordplay present themselves.)

ANYWAY, Ken is driving out with his kayak, and offering his experience in ham radio, electronics packaging, and many summers of boat repair in a marina… so we’re looking forward to his arrival. Also, David Harris is getting interested in building our APRS nodes — turns out that our Motorola VP Encore OEM GPS receivers and PacComm Handi-Packet micro-TNCs are a perfect combo for sealed locator boxes that can go on kayaks, backpacks, or whatever — displaying their location and any related telemetry on Macintosh maps.

We’re off this weekend for a day of sailing on the Bay, a night of partying, a day of kayaking in Elkhorn Slough, a night at a friend’s house, and a morning in Santa Cruz… then back to it!