Tuesday, March 18, 2008

New Prototype

The new Tracker2fc prototype boards came in late last week, and on Friday I built two of them and got one installed in a sample of a low-cost 5-watt synthesized UHF transceiver module. It's working great so far, aside from some minor mechanical fit issues. And I think maybe I broke the antenna lead on this sample, but the other one had the modem header installed wrong and would need some work to get the board to fit.

This system is the closest I've come to what I envisioned for the T2 a few years ago when I first started thinking about the OpenTRAC protocol and how a tactical SAR tracking system ought to work. A lot of that thinking was done on long walks through the woods at Vandenberg - I can remember where I was on the trail when I decided on certain critical features.

There's still a lot to be done before I can achieve that ideal, but at least it's a step in the right direction. The next big (and rather expensive) step is going to be getting the VHF version going. The vendor is sure they can do it, but I'm doubling their time estimates in my own planning. I might have samples to show at Dayton, but I'm not holding my breath.

I was planning to get some more debugging work done on the T2's support for the Garmin fleet management interface tonight, but when I do too much coding late at night I get wired and can't fall asleep for hours. And when I do sleep, I dream in C code and schematics.

Tomorrow I've got an appointment to check out some commercial spaces in the business park across from the airport. Things are getting too crowded here. One of the units is actually about twice the size of what I was looking for, but it might work after all. FTI needs to find a new office too, and since it looks likely that I'll be doing some consulting work with them on a regular basis for another year or two, sharing a larger place might be a good option - I'll be able to cover both without a lot of running around. FTI needs more office space and I need more warehouse space, so I think it'll work well. And if they leave town when the project is over, I can take over the remaining space or it can be split back into two units again.

I hadn't really planned on getting back into Air Force stuff again, but there's not really anyone else who knows the systems well enough to handle the modernization effort. And besides, there's a lot of satisfaction in knowing that my systems (ok, not solely my systems, but I put more work into them in the last decade than any other three people combined) are getting used on the Shuttle program, and maybe eventually Constellation as well - and knowing that we did on a shoestring budget what Lockheed Martin couldn't do for tens of millions.

Sunday, March 9, 2008

Cat Tracking


I've tested out one of the GPS data logger samples already on a trip around town, but I figured it was time to do something more interesting with it. Tory was out shopping and called to see if I needed anything, and since she happened to be right next door to the pet store, I suggested a small harness for the cat.

Turns out they had just the thing, from 'Outward Hound' - made for a small dog, of course, but it looked like it ought to fit. Apparently it's important for dogs to be able to carry cell phones these days.

I put it on Squeaky, and she had it off in under 5 minutes, without ever leaving the front porch. I tried it on Bella next, since she seems to be a considerably dumber cat. For a minute she'd only slink around backwards, but she eventually figured out that she could still move around just fine. She eventually wandered off and took a nap in one of her usual spots. I didn't see her again for a few hours. When she showed up on the balcony I didn't expect that she'd actually gone anywhere, but apparently she travels more widely than we thought. Looks like maybe she has some friends over at the retirement home. I'll have to try tracking her over a longer time span sometime.

Oh, I also got Robot 36 mode working on the SSTV encoder. The RGB to YCbCr conversion turned out to be not so bad after all, with the HCS08's hardware multiplier. The camera module itself continues to be a major source of frustration, thanks to undocumented timeouts and other odd behavior.

Saturday, March 8, 2008

Slow Scan TV Gadget


A few months ago, I started thinking about what I wanted to do for my next balloon launch. Getting live pictures back was at the top of my list, but I didn't want to commit expensive ATV gear to the launch and I didn't want to deal with lots of FEC and a high-speed data link to transport JPEGs. That got me thinking about SSTV. It's relatively simple, it degrades gracefully in the presence of noise, and it'd get a picture through fast enough to be useful.

I did some research and found that the Kenwood VC-H1 was pretty much the only compact, stand-alone SSTV device ever made. It was introduced at around $600, and still sells for around $300 on eBay on the rare occasions they come up for sale - they were discontinued some time back.

So I set out to build my own device. The first thing I needed to do was to figure out how the signaling actually worked and see if I could do it on the 8-bit microcontrollers I usually work with. Finding reliable information turned out to be a nightmare. Seems like everyone who's ever worked SSTV has felt compelled to put up their own explanation of how it works, based on everyone else's fragmentary explanations and misinformation.

Just finding exact line timing was nearly impossible. I found a site that showed line times to several decimal places, but it turned out to be the same inaccurate garbage presented in a different form. I finally got in touch with Jim Barber, N7CXI, and found out that he'd presented a paper on the subject at Dayton back in 2000, but hadn't gotten around to publishing it online. Turns out there were some quirks to the Scottie modes I was using that I'd never seen documented elsewhere. Once I had that, generating a test image was easy enough.

The next step was getting an image from a camera. I found a source of suitable digital camera modules - not high-end optical instruments by any means, but good enough and easy to interface, stupid communications glitches notwithstanding. Rather than build everything onto a development board, I started with one of my simplex repeater prototypes. It already had all of the hardware I needed, aside from a serial port.

I grafted the camera and a debugging serial port onto the processor using 30 gauge wire wrap wire, and soon had it dumping frames into flash memory. Getting the timing right to fill up the width of the frame was a little annoying, but I got it, to within a reasonable degree of accuracy. I also added a character generator to use the top 16 lines for text display.

The real challenge was getting it to do everything at once. It's got to start transferring data from the camera, storing that to flash every 256 bytes, reading back a line of data at a time (each line gets scanned 3 times for red, green, and blue), and sending samples to the PWM module every 1/38,400 second. Writing a page to flash takes about 3 milliseconds and it can't read while it's doing that. It also can't do line reads during the sync interval because of the idiotic line sequence in the Scottie modes.

It's some of the ugliest code I've written in recent years, but it works, at least for S1 mode. It's almost there for S2, but the faster scan rate is still causing problems. Once I've tackled that, I'm going to try Robot 36. I'm not looking forward to it -I'll have to convert on the fly from RGB to YCbCr color, with an odd interleaved chrominance subsampling scheme. I've got a few kilobytes to spare for lookup tables, though, and the HCS08 has a hardware multiplier. I'm sure I can come up with something.

Worst case, it'll have to wait for version 2. I'm working on a new design that'll have enough SRAM for a proper frame buffer, with an NTSC/PAL/SECAM decoder for external video input. The same hardware should work for a larger selection of digital camera modules. I'm going to have to learn some VHDL for the CPLD I'm using to tie it all together. Might also make the switch to a 32-bit ARM7TDMI processor. I was planning to use an Atmel part, but NXP has some really nice devices that are considerably faster for about the same price.

Thursday, March 6, 2008

Almost Ready


The contract manufacturer sent pictures this morning of the first panels of T2-135, OT2m, and OT1+ SMT boards. Looks like no major problems so far - hopefully I'll have them by next week. I've got a growing stack of orders for the OT2m - I've been able to keep up with T2-135 demand through local production, for the most part, but the OT2m is too complicated to be worth doing here.

We all caught the bug that Tory brought home - she and Charlie stayed home sick today, and I've got the sore throat and cough, but not quite as bad as those two. I'm hoping that I'll be over the worst of it by tomorrow - got too much stuff to try to get done.

I got the USB/Bluetooth GPS data logger samples today that Stephen picked up. He happened to be in Taiwan already, so I had him visit Progin's headquarters in Tainan to talk to them about a new project (not ham radio related, and I'm keeping it under wraps for now) and put in an order for some assorted samples for him to pick up as well.

They're cute little gadgets, and they seem to work well. Haven't got the Bluetooth feature to work with my smart phone yet, but that's probably more the fault of the phone. Used with a laptop they'd be good for APRS, but data logging is what interests me most. The software will output directly to KML format for Google Earth. If they'll do 3D tracks, they should be great for hang glider and paraglider pilots.

Picked up 600-odd OT1+ cases from the print shop today. Now if I can just get the sequenced axial component tapes back in stock, I can build up a stockpile of kits that might last me more than a few days.

A new Tracker2 board layout designed for internal use with a 5-watt data transceiver went out to the board house the other day. With luck, I'll have the boards on hand in time to build one next weekend.

Monday, March 3, 2008

House Hunting

I'd intended to mention this in my first post, but had to run off to swimming practice before I got a chance.

After Tory moved in last year, it was obvious that the old house just wasn't going to be big enough for all of us any more. We'd been renting the place for seven years - about twice as long as I'd expected to be there. The real estate market was at its peak, and we decided we just couldn't justify buying a house. I'm very glad now that we didn't.

So we rented this house, and we'd planned to stay here for at least a few years. The house is big - probably a thousand square feet bigger than any place I've lived before. The master bedroom is huge, the kids' bedrooms are a decent size, and there's room for my office in the converted garage downstairs. There's an extra storage building (built to house a spa, but never did) so I've got room for my lab benches, server rack, helium tanks, dewar, and all that good stuff in the detached garage. I did finally part with Behemoth, my old VAX 6000-510 minicomputer that I'd had in the garage at the old house for so long. It found a new home at the Computer History Museum in Mountain View - maybe some day I'll go visit it.

All was good until a few weeks ago, when the landlady called. The house is owned by a trust - it was inherited by five siblings when their parents died. Apparently two siblings had already sold their shares to one of the brothers, and now another is faced with a big tax bill and wants to sell out as well. The brother agreed, but on the condition that he would buy the one other share as well and own the house outright.

They did give us the option to buy the house, but at a price that would have been more realistic a year ago, when the market was better and we hadn't had 10 months to find all of the little problems with the place - like the electrical conduit for the wiring to the office that wasn't done to anything remotely resembling code and had to be completely replaced when it corroded away. But the brother's willing to take the place as-is, so we're out of here in the next couple of months.

It's a buyer's market right now, but it's still California, and a decent 3-bedroom house anywhere near town is still half a million bucks. We found a place we like just a few blocks away that'd be great - not huge, but big enough, and with both a shop (with plumbing and 220 volt power) and a very clean detached garage. The price is still a stretch, though. At this rate I'm afraid we're going to be renting for a few more years.

Cables


I just got my first batch of custom cables in from China today. I have to say I'm very happy with the results. I'll definitely be doing more business with this vendor. They were great about providing drawings and tracking all requested changes. A refreshing change after having my radio cable supplier just entirely give up on trying to understand what I wanted and sending me exactly the same thing as the last order.

I'm reading a book on dealing with Chinese manufacturers, and it warns about exactly this behavior. The new vendor is based in Taiwan, with production facilities on the mainland. I'm sure I could get a slightly better price going directly to the mainland, but sometimes it's worth the added expense of a middle man, especially when there's such a huge language and culture gap.

I'd keep my manufacturing domestic if I could do it even at twice the price, but I can't. Last time I got a quote on over-molded cable assembly from a US company, the setup alone was more than this entire order. There's actually a place in town that makes custom cable assemblies, but I think their prices start at about a hundred times what I'm paying now. To be fair, they mostly work in the nuclear power and aerospace industries.

XO

I got my XO-1 today - the cute little white and green laptop from the much-hyped One Laptop per Child project. I'm not exactly blown away, but it's an interesting piece of hardware. I'd intended to let Allie be the first to try it out; what better way to test the usability of a device made for children than to give it to an 8-year old? After playing around with it a bit myself, I decided that maybe it would be a little too frustrating for her without help.

At the moment, Charlie's got it. He's been begging to try it out since I got it out of the box. I figure it should be much less of a challenge for a reasonably computer literate 12-year old. Sounds like he's either using the oscilloscope function or the recorder right now; I can hear him making noises and strumming his guitar.

The machine's definitely not fast, at least in terms of loading applications. The applications themselves seem to be responsive enough once they get started. The keyboard is just barely usable by adult fingers. The user interface is most definitely not the simple, intuitive system I was expecting from all of the hype.

Charlie just brought it back, apparently tired of trying to get around and find applications. I don't know what he did to it, but it was running very slow for a few minutes. I managed to close a few things and it's running better now. If just loading up several things at once is enough to bring the system to a crawl, I think that's going to be a problem. It's not immediately obvious how to exit from all of the programs.

I tried to close TamTam jam, but it says 'Keep error: all changes will be lost', and gives two options: 'Don't stop' and 'Stop anyway'. Not terribly informative.

The system seems like it's designed by programmers for kids who want to be programmers. I'm all for allowing tinkering, but it's like the highly nerdy and obscure humor in Futurama - great if you can fit it in for those who appreciate it, but only if it can be done without annoying those who don't.

Some day maybe I'll work on some long-range comm hardware for it. Would be kind of cool to come up with a portable HF / amateur satellite email gateway, at least.