Back On Track

DCC Protection Panel 3476

After two months spent working on the website move, I’m back to working on (and playing with!) the railroad. That doesn’t mean I’m done with the website stuff. There are still pages left to convert, and a few problems to solve, and I’ll have more to say on that down below. But the new one is up and running, and relatively problem-free. And I’d budgeted this weekend to model railroad work in case there were problems, so I had some free time on my hands. I celebrated by getting the outer loop wired up and running a couple of trains. Then I turned my attention to working on the DCC protection and occupancy detection circuits so I can get the other two loops up and running.

Back in March, as part of the work on the Riverside Station scene, I’d installed PM42 DCC circuit breakers and BDL 168 occupancy detectors under the two tables that make up this scene. That was a lot of work, partly because I was working in close confines under the layout (I did the work with the table turned on edge, but the limited space available made it harder), and I wasn’t too happy with the amount of space it required, and decided I need to take a slightly different approach. The idea, which isn’t original, is to put the necessary circuitry on a board that can be hung under the layout. This allows it to be swung down for work, or removed entirely, and swung up out of the way the rest of the time. I’d cut and painted three plywood panels to make these, and continued buying the necessary electronics (I’d started that last summer; this stuff isn’t cheap and I wanted to spread it out). And then I got busy working on the Riverside Subway station, the Urban Tram Layout, DC signals, the website move, and the summer project party work on the Expressway. But for all that time, I avoided the DCC power circuity, in part because it’s a lot of rather dull work and I wanted to spend my time on more interesting things. But without it, I’m not running too many trains, as only the outer double-track loop supports DC power now.

Getting the outer loop back up was pretty easy. One of the tracks needed to be rewired to the other DC bus. I’d originally wired it up differently using one of the bus wire pairs I eventually decided was to be DCC, and never fixed that, but installing the DCC circuitry on the Riverside Station tables required fixing the wiring assignments in their final form, which meant disconnecting the second DC power pack from the “wrong” bus. But fixing it just meant making some new short bus-to-feeder connections, most of which I’d done back in March. I also needed to put the track above the Riverside Subway station back together, and clean the whole thing (it picked up a lot of grime sitting unused for nine months).

With that fixed, I took a break Saturday night and ran some trains around. I also now have a full-sized DC track for testing and break-in of new trains, just in time for the reservations I have for the fall months to start arriving.

Sunday saw me begin to work on the panels, inventorying my parts and planning the layout. But first I went back and looked at my plans. When I left off in March, the design, summarized on the Power Wiring Standards page, called for a total of seven PM42/BDL168 sets, two of which had already been installed. I’d been thinking that was excessive, and so I’d only bought six sets. Today I sat down and figured out how to eliminate one of them by moving some of the tracks between the Subway and Commuter line onto the existing “unsceniced” section’s power panel. This does mean that certain problems there can shut down the subway track, but since those problems today involve trains going to or from the subway that’s okay. When I (someday) build the helix, then it will need its own power panel, and I can relocate those feeders if I want to. So now I need a total of six sets, one per table in the two large scenes, one under the River Crossing scene, and one handling the unsceniced return curves. There’s a total of 49 occupancy detectors, which could in theory be done with five sets, but that would make the wiring more complex, and I probably would have issues keeping the four tracks separated on the circuit breakers. The way it stands, wires stay within a “scene” (and almost always within a table) and anything that trips a breaker affects only the track that the even occurred on, and not the other three tracks.

There’s actually a seventh circuit breaker board, as I had an old PM4 from my previous layout that I’d upgraded to a PM42, and I’m going to use that to protect the two DCC feeds that are used by the outer loop when it’s in DCC mode, so problems there won’t affect the power to the other tracks. The board for this will be trivial, and I’ll wire it up one of these days when I have an hour to kill.

Three of the boards (the two Urban Stations scene ones and the River Crossing scene one) are going to be nearly identical, and I’m building them first. These will be designed such that I can rearrange the transponding sensor assignments or the circuit breaker to detector association in the future, just by moving some wires between terminal strips. As such, even through they’re supporting different configurations, 90% of the work will be identical on all three. And I’m building all of them to support use of all 16 BDL168 outputs, even though two of them need only seven and the third needs only six today. The final board, for the unsceniced end, needs a slightly different design due to the lack of space off of the board for terminal strips; it’s going to need more wire and terminal strips on the board, and hence will be larger as well, but it can also mount to one of the support frames, which makes things a bit easier as well. I’m going to do the three identical boards first.

After I laid out the positioning of the terminal strips, circuit boards and RX1 sensors, and marked the first board, I copied the markings to the two other boards as seen in the photo below (which also shows my collection of 18 gauge wire; none of this wire is long, so use of 18 ga is acceptable as voltage loss will be minimal, and it’s the largest wire the card connectors can easily accept).

DCC Protection Panel Marking 3481

Now I just need to start soldering wires to the card-edge connectors, and crimping spade lugs on the other ends, and screwing the whole mess down. I may get a start on that tonight, but it’s going to be a job spanning several evenings. Still, I’m started again, so it won’t be that long until it’s done (famous last words, right?).

The Web Site

Now for a bit of administrivia. The new website is up and running. As described, this uses RapidWeaver with “Stacks” to replace iWeb, and I have a new hosting provider, Little Oak. That breaks all dependency on Apple, which has announced an end to their hosting service next summer, and the end of any further development on iWeb. Aside from the sheer labor of moving all that content, this isn’t without problems. First, I still haven’t figured out what I’m going to do for comments here. I either need to use a different software package, or an external (and likely ad-supported) comment system. Neither appeals, so I’m procrastinating while I let myself think about it.

Note: my email address is given on the About the Site page on the left if you need to get in touch to report a problem or if you have a question.

But more seriously, I’m running into limits with RapidWeaver (or possibly with Stacks) that cause it to become unstable when exporting the site, which as you might guess is a bit of a problem. What’s happening is that RW handled embedded photos in a way that works okay with small numbers of them, but is very inefficient in quantity (and if there’s one thing this site has, it’s a quantity of photos). There also appears to be some kind of memory leak (likely a failure to garbage collect properly for the programmers in the audience) which causes the assigned memory to grow without bounds during an export, until it hits the limit for a 32-bit program. And yeah, despite the fact that I have a 64-bit OS, am running a 64-bit kernel, and have 8 GB of RAM, RW is a 32-bit application and can’t use any more memory.

My first attempt at a fix was to split the photo album (which accounts for half the sites exported size) off from the rest. This was easy enough to do, since the photo album doesn’t link to other parts of the site, and I hadn’t yet linked any of them to it. Unfortunately, it turns out that while the photo album is 50 MB of the roughly 110 MB of the exported site, it’s only 80 MB of the 560 MB of the unexported site. Removing it made the photo album export much faster, which is nice, but it didn’t solve my problem. It probably did buy me more time to find a solution.

My suspicion is that the root of the immediate problem is Stacks, which adds page-layout to the basic text-and-photos capabilities of RW. There’s a clear RW failing here, but Stacks is adding a lot of overhead, and that may be causing me to hit the limits sooner than I would otherwise. I need to investigate that more to be sure, but it may be that some photo-heavy pages that really don’t need stacks could be converted to do without. Or maybe I’ll get lucky and the next release of RW will add real support for embedded photos that doesn’t encode them and stuff them in a text file for no apparently good reason (their programmers must live in a parallel universe or something; there’s no good excuse for such a mind-bogglingly strange thing to do with a photo that starts out as a separate file and in the end needs to be stored on the web server as a separate file, and yet that’s what they did and I think it’s at the heart of the problem).

Meanwhile, I’ve got this site exporting the way I want, and have at least some headroom to add more content. And I’ve got, as far as I can tell, the two RSS feeds working properly. These are the Musings feed and my “General” feed that replaces the “recent website changes” text I used to add to the end of each musing, allowing me to announce added/changed pages without waiting for the next musing. You can see the RSS link for the Musings feed over at the left, and the General feed is linked from the sidebar on the Home page. Still no feed for changes to the photo albums, but I’ll mention any such changes in the general feed.

One thing I like about the new system is that it provides real usage stats. From this I know that over the three day period Thu - Sat I had 100 unique visitors (much more than I’d expected really) from 34 (I think) countries, and 25 of them came back for a second visit (or more likely fewer came back more often). Wow. Now many of those seem to have been either pageless or one-page hits, probably people using Google search who didn’t find what they wanted. But people from 20 countries (I have no idea how many individuals) stuck around long enough to look at a second page. Pretty cool. Thank you all for visiting, and I hope you enjoy the site, or at least find it useful.

For your reading pleasure, here’s the list of countries and pages/hits each. I can make some guesses at who some of those would be, but Kazakhstan and Ukraine? Now those are surprises.