December 22, 2007

Blogs

Over the past several years I’ve tried started to write blogs three times now, and each time it’s lasted maybe a month or so and then stopped. Maybe this time will be different now that I have a more permanent server. deater.net is a great static web site, but doesn’t allow running of nicer, more dynamic apps. And running my second blog off of a QEMU instance running on a Via C3 600Mhz server and my home IP address proved to be too cumbersome. Now that we have our own site, this should be much more permanent. Let’s hope tird time is the charm.

But I think the problem really runs deeper. It’s hard to discuss things on your blog because it’s so public. Most things that are going on in your life you can’t discuss. Excited about that new job offer you got? Better not mention it here, or else your current job might find out. That friend/girlfriend/wife really get under your skin? Nope can’t post that either, unless you’re -really- looking for trouble. Working on something really cool at work? best leave that off as well, since you probably can’t talk about it.

So what’s left?

Hobbies. Cool projects, programming or otherwise. Family news announcements. That’s about it, and when you spend most of your life at work as I have recently, there’s not much left. That probably says more about my life right there than anything else.

Here’s hoping this blog stays moderately relevant and interesting for at least a few people out there.

Posted by john under General | Comments (0)

December 17, 2007

Karma

Karma is coming back to eat my dogmafood.

In 1998, I took a course at RPI called Introduction to Engineering Design. It’s the big engineering project course, where they take teams of engineering students of different types (chemical, mechanical, computer, electrical, etc..), give them a problem and a budget, and then it is each team’s job to design a solution and build a working prototype by the end of the semester. It’s required for every engineer, and it’s really important because it’s one of the few classes at RPI where you actually have to both design and build something. You get out from behind the computer simulations an go rummaging around junk yards and wielding power tools to actually create things with your hands. Every engineering school has a course like this. It’s a right of passage.

In my IED course, my part of the project was to design a motor controller with random movements using a microcontroller. That’s when I bought the BASIC Stamp controller that I still have today and am using to control my point-to-point trolley setup. Everything worked great until the day of the final project, when the microcontroller simply refused to do anything but spin the motor in one direction. Not devastating for the project as a whole, but it cost me an A in the class and I never did really figure out what went wrong. I had my suspicions, but when you’re done with a class like IED where you spend the last few weeks basically living with your team working day an night to get things built and working, you want nothing more than sleep. And sleep I did, for about a day and a half if I recall correctly.

Auto-reversing circuit
Now, fast forward to today. I’m building another circuit with the BASIC Stamp. After spending all night wiring up all the IR circuits and detectors to the real 8′x4′ layout, and running wire back to my protoboard, I turned everything on for the first time. Of course, the IR circuits aren’t working for some reason, so I’ll have to figure that out somehow. So I decided to just make sure my auto reversing circuit worked. This circuit consists of 2 5V relays, hooked up to pins on the Stamp through a transistor. One relay stops the train (breaks the circuit), and the other reverses the direction of the train. The microcontroller simply runs the train for 5 seconds, stops it, waits 2 seconds, reverses the train, waits 2 more seconds, and then starts it for 5 seconds again. It does this in a loop. But when I run even just that code, it fails to run correctly. Instead it runs in one direction only (or stops, and the continues in the same direction.)

It slowly dawns on me.. This is exactly the same type of circuit (2 relays), and exactly the same problem I had 9 years ago that I never solved. I have my suspicions, I think I left the reset pin floating, which is probably getting wiggled by the relay coil flipping about an inch away. It’s too late to do more tonight. If that’s not it, I don’t know where to go next.

Sometimes, karma really is a bitch.

Posted by john under trains | Comments (0)

December 7, 2007

Train update

So the STAMP has a bad pin on it but I managed to solder it back together, so that works.  After building another serial cable from scratch I was able to get the STAMP to work under Linux using the BStamp project.  Using the STAMP and a RadioShack IR emitter/detector pair, I was able build a simple circuit that detected the presence of a train and lights an LED.  Good to know I can still build simple circuits.

This past weekend, I borrowed my friends truck and we bought the wood needed to build the train platform.  I knew roughly what I wanted to do, which was build a 4′x8′ platform with removable legs and a hinge in the middle so it would fold up for easy storage.  So we grabbed the following from the local Home Depot:

  • (1) 4′ x 8′ sheet of particle board
  • (6) 8′ long 2×4’s
  • (2) door hinges
  • (8) 5/16″ 5″ long bolts
  • (8) 5/16″ wing nuts
  • (16)  5/16″ washers
  • several  drywall screws

We had Home Depot cut the particle board in half for us, and all the 2×4’s in half as well.  Thus everything fit pretty easily in the back of Eric’s truck.  We came back and started assembling, basically making it up as we went.  We took two of the 2×4’s and attached them together with the two door hinges so that they swung out.  Then we took each 4×4 piece of particle board, and added a frame made up of the 2×4’s along three of the four sides, securing the boards to each other and then flipping over and securing them to the particle board with screw from the top.  Finally, take the two 4×4 sections and lay them so the open ends of the frame point at each other.  Line them up to be as flush as possible, and then use the set of hinged 2×4’s to make the fourth side of each frame.  This will join the two sides together through the hinge.  When open, the force of gravity on the center of the table will hold the hinge closed, but lifting up on the middle of the table will cause the table to fold in half.  Ours turned out to fold beautifully, which is remarkable since we were just eyeballing everything.

Th add the legs, we cut the remaining 2×4’s into ~25″ sections.  We then lined up the legs in the corner of the bottom frame 2×4’s, and cut two 5/16″ holes through the fram and the leg.  We then secured the legs to the frame using the bolts, washers, and wingnuts.  This allows them to be removable so the table can collapse when the holliday is over.  Fully assembled, the hinge+gravity trick works, but was pretty unstable.  The real solution is to add another to the center of the table, but we were out of wood (due to the fact we originally cut 3′ legs, which were too high), so we wound up just screwing in cross braces across the joint that I’ll have to remove in the future.

With the platform now set, I’ve laid out my simple track plan.  A basic oval around the outside with a curvy point-to-point track in the center.  It should work out rather well.  I also got my shipment of 5V relays in, so I started to try and coax the STAMP to trigger one to no success to far.  They require mroe curren than a stamp can supply.  I have some opto-isolators that I need to figure out how to use that should do the trick…

Posted by john under trains | Comments (0)

December 7, 2007

Clemensfam.org Reshuffle

Well, Katy wants a static front page, and wants her own blog. That wouldn’t be possible with WebFaction unless we upgraded our service. Except that as of a few days ago, Webfaction just upped their service for everyone, so now everyon has ‘unlimited’ applications (within disk space limits). This means we can run two blogs, a static front site, the photo album, and the subversion server for the photo album. Very very cool.

Work has me writing Windows socket programs again. I thought I’d left that whole frustration behind with my last job, but I guess once you know how to do something the work has a way of finding you. On the bright side it lets me play a -lot- with KVM to run virtual windows machines. And get this, you can download MS-DOS 5.1 or Windows 98SE from MSDN, but you can’t download Windows NT or Windows 2000. Sigh.

Posted by john under General, work | Comments (0)