Thursday, March 31, 2011

Evil Ride

I'm training for the Gran Fondo NY coming up in a month and a half, with a plan Brad put together.  The GF route is quite hilly, with ascents of Little Tor (northbound), Buckberg Mountain, Bear Mountain (to the summit), Gate Hill, Little Tor (southbound), as well as the various hills needed to connect them (Toga, State Line, etc).  So anyway, Brad's foul plan for yesterday called for four repeats of River Road (from the parking lot), to which I added a trip up Eisenhower, for 45mi.  (Strava link)

The River Road repeats were exciting, as always.  I seem to be able to knock out three without much difficulty (though my back isn't a huge fan).  The unpleasantness kicks in about halfway up the fourth.  I can only imagine how exciting next week's five repeats will be.  All the whining aside, it is pretty cool to know that I can string together that many repeats and still walk away from it, so to speak.

This was only my second time up Eisenhower.  The descent to Eisenhower, on Hillside (from 9W), is easily one of my favorite descents in the area.  Perhaps I'll grow jaded, but for now it's lots of fun.  I don't know exactly why I like it more than State Line.  Maybe it's that the descent is windier.  Maybe it's because I haven't done Hillside three thousand times.  Who knows.

Eisenhower has three hills.  The first and the third are brutal.  It's like force work, without the inconvenience of needing to change to a higher gear.  The scenery is nice, though.  Giant mansions (in varying degrees of tastefulness) line the road.  You could hear a pin drop in this neighborhood after everyone's gone to work, so there's almost no traffic.  Just climb, climb, climb, climb.

Here's the descent to, and ascent of, Eisenhower. Yes, the camera was on sideways. Sorry.

Sunday, March 27, 2011

4-bit counters

I played around with 4-bit counters to see how the program counter for my CPU will work.  It's becoming clearer now that I know how the counters cascade and how they can be set with new values.  It's also becoming clearer that I don't have nearly enough breadboard space.  PB-105 here I come?  The writeup is here.

Pretty picture and circuit:


Saturday, March 26, 2011

7-Segment LEDs

I've been playing with 7-segment LEDs over the past couple of days, starting with the LED and a '4543 BCD decoder, then adding a counter, a debouncer for the switch that drove the counter, and eventually a timer to make it count by itself.  The writeup is here.

I feel compelled to prepare these elaborate writeups so I don't feel quite so bad when I tear the circuit down.  It's not like woodworking (alas), where you end up with something to keep when you're done.  Instead, build a circuit, take it apart, build another one, take it apart, and so on.  Well, I'll keep some circuits.  This just wasn't one of them.

The result:

Train layout blueprint

With the layout done in a CAD program, I figured I could easily print it 1:1, lay the printout down on the plywood, and begin assembly on the plywood.  That way there's no need to do painful measurements -- I simply put the parts on the blueprint, and I'm done.  This of course, ignores cork roadbed and how I'm going to get the blueprint out after I've attached the track, but one thing at a time.

So first, we need to get the layout printed 1:1.  XTrackCAD can do this natively, by dividing the layout into 8.5x11" sections -- sections which you then glue back together.  This brings back memories of pasting together banners with Print Shop on Apple //e's with dot matrix printers.  This blog post describes what you need to do to get XTrackCAD to print this way.  One advantage of using XTrackCAD is that you can ask it to include marks for the cork roadbed.  The disadvantage of doing it this way is that you have to cut margins from a zillion individual pages (18 for my layout) and painstakingly align and tape them together.  With CutePDF on Windows, you can at least convince XTrackCAD to put the whole thing in a PDF for printing.  On the Mac, it prints as PS, which you have to convert to PDF for printing.  I ended up doing it on the Windows machine, as I had no end of trouble trying to get Preview to open the PS files (and didn't feel like installing ps2pdf).

Once we have the layout printed on 8.5x11, we have to summon the urge to do all that cutting and taping.  I tried and tried, but it wasn't to be.  Wouldn't it be simpler to print the whole thing out on one sheet of blueprint paper?  I wasn't able to convince XTrackCAD to print on large paper -- it seemed to want to restrict the maximum page size to 8.5x11.  It certainly didn't want to try printing to a 36"x48" blueprint page.  So now, the adventure begins.  I figured a bit of time invested fiddling with software would more than pay off if it freed me from the need to play cut'n'paste.

Here's what I ended up doing:
  1. In XTrackCAD, select Select All from the Edit menu.  This selects everything, of course, but also causes the Export and Export DXF items to activate under the File menu.
  2. Export DXF.  Save the file somewhere.
You may be able to stop here, if your printer (or print store) will accept DXF.  I wanted to be extra sure. DXF is opaque to me, but PDF is not.  I wanted to get a PDF which would print to 36x48, and wanted to visually verify that.
  1. Install EDrawingsViewer -- a free viewer for DXF files.  It's available for PC or Mac, though I used the PC version.
  2. Open the DXF file with EDrawingsViewer, and print it.
    1. Select a 1:1 print:

    2. Select the CutePDF printer
    3. Hit the Properties button to configure CutePDF for this print.
    4. Select the Layout tab.  You'll probably want Landscape.
    5. Select the Paper/Quality tab, and click the Advanced button
    6. Under Paper/Output, you'll see Paper Size.  Change the value to "Postscript Custom Page Size".
    7. Click the Edit Custom Page Size button.
    8. Set the dimensions of the page.  For me, it was 36" by 48".
    9. Print the document
    10. CutePDF will open a dialog box, asking you where to save the PDF file. Pick a location, and save it.
  3. Take the PDF file to your local print store. I took mine to Staples, where they printed it out on blueprint paper for just over $5.  One thing to note about Staples: While their online tool claims to support wide-format printing, it doesn't have a rotate button.  If it disagrees with the rotation of your PDF file (as it did with mine), you have to place the print request in person.
Here's the result:


That's the blueprint (the glorious one-sheeted blueprint) sitting on the sheet of plywood.  I added a turnout just to verify that the sizes were right, and they were.  The turnout fits exactly.

I will miss the roadbed outlines.  XTrackCAD can generate them when writing PostScript, but apparently not when writing DXF.  Sigh.  I'd rather have one sheet of paper than roadbed outlines, though.

Sunday, March 20, 2011

Helping Hand

I saw a post on Viktor's DIY Blog awhile back about building a Helping Hand. I wasn't terribly fond of the cheapie helping hand I'd been using, and decided to copy the one Viktor built.  First, I had to find the Multi-Direction Plastic Water Oil Switch Pipe Adapter used for the arms.  Needless to say, these aren't stocked by my local hardware store (nor could I find them anywhere else in NYC).  I ended up ordering them via ebay.  This was my first time ordering from a no-name company in Hong Kong (for delivery from Hong Kong), but it worked out ok, and everything arrived as ordered.

Ok, so now we have the parts, so time to put them together.  As Viktor pointed out, the pipe adapters are 12.5mm in diameter.  Ideally, we'd use a 12mm bit to drill holes them, and then we'd screw the pipe adapters into the holes.  My life is never this simple.  First of all, metric drill bits seem to be scarce in these parts (the local Ace didn't have any metric bits at all, in any size).  Second, the nearest fractional inch bit (15/32") was close to $13.  I have no desire to spend that much on a drill bit that I'm likely to never need again.

But wait!  I received a Dremel Trio for Christmas.  I've been looking for a reason to use it, and now I have one!  I could start the holes with the biggest bit I do have handy, and could then use the router to enlarge them until the pipe adapters fit.  And that's just what I did.  In the process, I verified that the Trio terrifies the dogs just as much as the other power tools do.

I didn't have any fancy scrap wood lying around (well, it turns out that I did, but the fancy scrap was hiding under the bed), so I used a simple piece of pine.  I figured it'll be on the receiving end of a bunch of abuse as time passes, so no need to use something special.  Below, you can see the wood with the pipe adapters screwed in.  Happily, the valve part pops right off the bottom threaded part.  This made it much easier to screw the threaded part into the wood.  I had discovered earlier that the orange piece at the tip -- the place where the alligator clip will be attached -- is not removable.  I guess that's why I ordered four -- so I could break one.



In this picture, I've installed the articulated parts.  One of the already-installed adapters is holding the alligator clip in place while the hot glue dried.



My biggest takeaways from this: Routers are awesome.  As is hot glue. And now I have a helping hand that's not going to fall over when I look at it cross-eyed!

Train Parts

I went to Train World this weekend, and bought the first batch of parts needed to build the layout.  None of the expensive stuff -- just the track and cork. I'm holding off on getting the expensive stuff -- breakers, auto-reversers, and so forth -- until I get a better handle on what exactly I need and which models I should get.

Here's a picture of the haul.  Everything's new except for the controller, some of the flex track, and the loco and cars.


I've got all the special track I should need (turnouts, crossovers, etc).  Hopefully I have enough flex track and ballast.  We'll see.

Train World was great.  It was everything I expected a train store to be.  It's hard to overstate how much more I liked it than I did Red Caboose.  Train World was everything Red Caboose was not: spacious, clean, staffed by helpful salespeople.  It's much less convenient than Red Caboose, but I'll go to Train World again in a heartbeat.  This is surprising to me, as it's Red Caboose that's supposed to be the NYC mecca for model railroading.

Finally, a word on couplers.  My loco and some of the cars have the Atlas Accumate coupler, while a couple of the (Con Cor) cars have the Rapido coupler.  Sigh.  I picked up two pairs of Accumate trucks from Train World, planning to use them instead of the Rapido couplers on the Con Cor cars.  Unfortunately, the Accumate trucks don't quite fit on the Con Cor cars.  The pin used to attach them to the cars seems to be a hair too big, making it hard to rotate the trucks.  For giggles, I tried some Speedplay Dry Lube on the joint.  It helped with one car, but didn't help with the other.  I guess I'm going to need to buy replacement trucks for those cars from Con Cor.

Con Cor sells trucks with Microtrains couplers for $5-6 a pair.  (cough)  According to this page, the Accumate and Microtrains couplers are supposed to be compatible, so I guess that's what I'll do.  They've also got their own brand of (rigid) couplers, which are cheaper (about $3 a pair), but don't support automatic decoupling like the Microtrains couplers do.  I eventually want to have automatic decoupling on this layout, and don't want to have to swap trucks again, so I'll probably pay the Microtrains tax and get the Microtrains couplers for the Con Cor cars.

Monday, March 7, 2011

Layout design part 2

Here it is, after reworking the bit between S4 and S9 to allow enough space to fit a loco pulling three 50' cars.  The cool entrance to siding 2 which appeared in the previous version (the one which allowed us to get rid of an S-curve) is gone, and the S-curve is back.  Only this time I put a 5" straight piece between S9 and the curve that leads to siding 2, so hopefully that'll be enough to mitigate the effects of the S-curve.  5" is long enough to fit a 50' car.

I couldn't leave well enough alone, so I added a third siding just for kicks.  Hopefully it isn't overkill.  We'll see.  At least I oriented S11 properly so I didn't end up creating another S-curve.

Sunday, March 6, 2011

Layout design

As part of my periodic hobby/obsession rotation, I'm working on my train layout again. This time I've put some effort into coming up with a layout that is workable, interesting, and free of obvious major flaws. The basic idea is this: a figure eight superimposed on an oval. I want to automate the running of two trains on that layout, preferably without them killing each other. Along the way, I thought it'd be fun to add sidings. Then someone at work suggested a passing track, and that's how I ended up with the final layout. The biggest constraints were height (this has to fit under the bed, so no grade separations) and size (a maximum of 4' x 2.5'). The length constraint caused me the most headaches, as the minimum turning radius I'd allow (9") caused curves to eat up real estate rather rapidly.

Here's how it evolved:



My first attempt at a figure eight in an oval. I built it using AnyRail.  When last I tried a figure eight in an oval, I was using flex track for the X in the eight, and was having no end of trouble.  This time, I used sectional track for the whole thing (well, for the version before the one in this screenshot -- I switched to 9" radius flex for the outer curves to make it fit).  I also took some inspiration from Mike's Small Trackplans for directions for future revisions.



The layout got a name in this revision.  It also got sidings.  Still using sectional track for the X, though the outer curves are flex.  S-curves abound.  I liked the idea of having sidings at top and at bottom, because they'd allow for deliveries.  That is, a train could pick up some cars on the bottom siding, and deliver them to the top.  One notable disadvantage of running the sidings like this is that there will need to be reversing, most likely as the train enters the siding.

 I also switched back to XTrackCad (AnyRail had been an attempt to escape XTrackCad's user interface) because I couldn't seem to figure out how to make AnyRail do the nudging that XTrackCad does.  That is, XTrackCad accounts for the fact that track is flexible, and can be forced to fit (within reason, of course) even if the precise numbers used by the CAD engine say it shouldn't.  As the design developed, I began to learn how to lay out track more precisely, and thus didn't need this leeway.  I still stuck with XTrackCad, though.


Why not add a passing track, someone said.  While you're at it, make the sidings come out from the passing track.  This keeps them off the main line and eliminates an S curve.  Easily said, harder to do.  The sectional track is gone.  I had to use 9" radius curves everywhere in order to fit within 4'.  Furthermore, I had to make the layout taller so that the X would fit with the 15 degree crossing (the old crossing was much shorter).


This is the previous version, but with fully-developed sidings.  I was also able to eliminate the need to back into the sidings by providing a second entrance.  All interactions with the main line can be done at full speed.  Trains needing to access the sidings themselves still need to back up, but they can do so on the siding track, between the two entrances.  Unfortunately, I didn't quite understand how to spot S-curves, and managed to introduce a doozy for trains trying to access siding 2 from the left entrance (which they wouldn't do in practice, since they'd have to back in off the main line, but still...).


The latest version, with S-curves eliminated.  There may still be a problem, though.  There may not be enough room to get 3-car trains past S9 without intruding on the main line.  I may need to reduce siding length in order to move S9 (and S7 and S10) to the right so that there's enough space.

Update: Nope, not enough space.  Happily, there's plenty of room on the sidings.  I may move S7 flush against S8, since S8's straight track will provide enough separation to prevent yet another S-curve.