Saturday, July 18, 2009

Everybody Needs a Hobby

There's some element to having a hobby that keeps you from going completely insane. For a long time, computer games were my hobby. I quit playing WoW over a year ago, but never quite found a suitable replacement. I've been waiting for Starcraft II to come out, but as it keeps getting postponed, I need something to do until then.

I bought a set of stepper motors off some obscure website, along with the parts and schematic to make the serial motor driving circut too. I was really excited when it came. I bought a soldering iron of my own, and went to work assembling the circuit board. I got it all finished and to my utter dismay, it didn't work. You may be suprised to find out that neither of us own a voltmeter. So debugging the circuit wasn't really an option without buying one.

But buying things is such a difficult thing when it comes to engineers. You have to be sure you're buying the best thing for the money. And so you have to do all the research, and read all the reviews. You have to look at the specifications and the functionality. When you're finally done, one of three situations occurs:

1. You don't want it anymore because it took so long to figure out what you wanted.

2. You find that they don't have anything good enough to do what you want, or that you could build one yourself better than what is availiable.

3. You want the coolest one availiabe, thus making the item too expensive.

Needless to say, we still don't have a voltmeter.

I started my senior year at the UofA right after that, so I had very little time to work with my motors. The motors got shelved for more than a year. A few days ago, I was sitting there thinking, "I'm an engineer now; I probably know enough to fix that." It was a funny sort of realization.

I finally had a little time to pull out the motors again. It still didn't work. I spent a few days trying to figure out why. I finally decided that the circuit didn't do what I really expected it to anyhow, and that I could build one that worked better myself.

I was so excited that my wife had a geek box. Somehow her BYU tuition bought her something useful, where mine at the UofA paid for a lot of crap I never used, and neglected buying me real engineering lab supplies that I'd continue to use for years to come. Anyhow, I've been using her geek box for the past few weeks. She'll either decide she wants it back, or that I can have it. Either way, I'll probably get one of my own here soon so that I can clean up all the random parts strewn all over my desk and office floor, or just because I want to make a manly one instead of hers with seahorse and fish stickers.

I programmed a simple I/O application using the parallel port. I wrote it in Visual Basic because getting the GUI is just so quick. The Win XP's security causes the I/O to the ports to be somewhat limited, but it works for most practical applications. The RS-232 serial protocol didn't really suit my needs because I wanted to be able to control the individual data lines and keep my circuitry pretty simple. I ended up hooking up a 4-channel H-bridge to my parallel port. A little bit-flipping later, my motor was whizzing away.

Well... it sounded like it was whizzing anyway. Turns out I bought a stepper motor with 1.8 degree resolution. It's very accurate and I can tell exactly how far the motor has turned and can make minor adjustments to have a great amount of control over the motor. This is great except it maxes out on the realistic frequency at which the inductive coils can be energized and de-energized, even though that sounds somewhat Star-Trek-ish. Since the motor coils are inductive, it resists changes in current. I could do the math and figure out exactly what that frequency is, but I took the lateral-copout and let the computer do the very-fast guess and check. Turns out that the motor starts freaking out at about 200 cycles per second, which equates to about 30 RPM for my motor... 1 turn every 2 seconds. Yuck. The motor just can't go any faster than that. Oh well. I guess I over-valued accuracy and sacrificed speed without really knowing it at the time. That's what I get for buying my motors before I graduated, I guess.

Once I got the motors going, I showed Leann. She wasn't that impressed, although I coaxed her into giving me compliments on how good of a job I had done. Really I don't blame her, you can hardly see the motor's axle turning. I had to tape a wire to it so that I could tell it was turning while writing the code.

I built my first prototype out of cardboard and coat hangers. Mostly it was just a waste of time. The wheels didn't stay on very well, and the cardboard was too flimsy to hold the motor on straight. The rubber band I was using between the motor and the axle was too strong. It ended up bending the axle and tearing the cardboard. The car only survived long enough to prove that the motor had enough torque to power a vehicle with a little help of gearing.

I pulled up my CAD program and started building a model of my car. I decided that building my car out of Legos would probably be the most practical, so I started modeling individual Lego peices. That took a long time because I was precisely measuring the peices so that they'd be to scale and virtually fit together correctly. After a few hours of modeling I decided to just go buy the real thing. So I got the Quad Bike / Dune Buggy dual set #8262. (If you have legos already, you can download the instuction booklets in .pdf off their website.) I did look at downloding the instructions and ordering the Lego peices off of a 3rd party distributor, but decided that was just too much work. (And you have to buy them in bulk)

I think Leann started feeling bad for me and my pathetic attempts at being a mechanical engineer. But, the best part is that I talked Leann into letting me buy a toy. Yeah, the stepper motors were a pretty good toy too, but that was a long time ago, so I got a new toy. It's been a long time since I actually bought a toy that comes in a box with colorful pictures on the outside with some boy pretending to play with it. I had to drive to three different stores to find one that actually had a decent set of Technic Legos. I needed a set with enough peices that I could make a few different things out of it so that I wasn't limited to just what it was *meant* to build.

Once I got home I built the dune buggy... the more promising of the two instruction sets. The set is meant to be built by a 9-16 year old boy. However, the steering assembly is complicated enough that I seriously doubt a 9-year old boy would ever have come up with that on their own. The poor kid would be doomed to always have to build an inferior Lego contraption. I'm an experienced Lego-builder. I even belonged to the Lego kids club and got the magazine each month. I owned the BlackTron space sets, and my little brother owned the ice vehicles (I can't remember their real name at the moment) I had the vehicle built in about a half hour.

I played with the car for an hour or two. It's a pretty good design, and is pretty fun to play with. It has a steering axle that comes out of the top so that you can turn the wheels while playing with it from the top. That was pretty cool, but in the process of playing, my inner-engineer began to kick in. The steering on the vehicle was just too wobbly. The turn radius was far too small to be effective. Leann went to bed around 11:00 pm, while I stayed up until 3:30 am re-building the steering assembly. Now, this wasn't an easy task. With limited parts, I had to change the vehicle from front-wheel drive, rear steering to rear wheel drive, front steering and improve the steering at the same time. But I managed to do it, and keep the shocks at the same time. The original design also only had power to one wheel off the drive shaft, so I changed it to be 2-wheel drive instead of 1-wheel drive.

Today I hooked the Lego car up to my stepper motor. I still used a rubber-band to transfer power from the motor's axle to the drive shaft of the vehicle. This isn't the best situation because of the stretch factor involved. It makes the car drive in spurts. The rubber-band stretches around the axle until it builds up enough torque and then the car lurches forward and stops. This would be better done with gears, but I have to figure out how to get a gear attached to the motor's axle without permanantly damaging the motor so that it can't be used for anything else. Even though the car didn't drive very fast or smoothly, this time Leann was impressed. (I was actually somewhat impressed myself) The car moved fairly well on my first attempt. Not too shabby.

Anyhow, I'll eventually replace the main driving motor with a plain DC motor so that my car can go faster. But at the current moment, the car is tethered to the circuitry and also the back of my computer so it can only go as far as my alligator-clip leads can stretch. But it's probably for the best. The desk isn't that long, so going faster wouldn't really do me all that much good anyhow. Unless I could get up to 88 mph and add a flux capacitor!

Check out the video of my car. Sorry for the crummy quality, I had to reduce the resolution so that it was small enough for email and such.


Tuesday, July 14, 2009

Worse Than A Needle In A Haystack

Ok, so being a new mom, I am having many wonderful experiences: watching my child grow, seeing the many smiles he gives, being excited when he learns something, watching him turn his head when he hears my voice, laughing internally when everyone tries to calm him down, but then he gets handed to me and is happy as a clam! (hahaha)

But the one thing that seriously takes forever is finding a pair of matching baby socks in a load of clean laundry. I mean finding one of my pairs of socks is tricky, but then shrink the size of the socks, and it's nearly impossible!

There are many cool baby inventions... one that I particularly appreciate is how they make all levers, clasps, buttons, etc. on strollers red. If it is red, it can move and make the stroller move somehow. Great idea! Instead of hunting around for hours to find the magic release lever, I just have to try the 5 red thingys on the stroller. And you can even call them thingys, because by marking them red, it made your life that much easier!

Thus I have decided they should make red tags for you to stick on your baby's laundry, so when you go to find something in the pile, all you have to do is look for red!

What's your favorite baby invention?

Friday, July 3, 2009

The Little Things

So, I'm finding with motherhood that I am somewhat deprived of my computer time. So here is an effort to fulfill my computer withdrawals and keep everyone updated.


Now that Reid is 3 weeks old!!! I thought I'd update everyone on what he's up to.

- At 4 days old, he weighed 6lbs 9oz
- At 1 week old, he weighed 7lbs 20z
- At 2 weeks old, he weighed 7lbs 8oz
- At 3 weeks old, I don't know his weight, but he feels huge to me and he's finally getting his baby rolls

- He is a great eater. If he does a nice long feeding he'll go 3-4 hours before needing the next one. (this is great for nights)
- Usually when he eats he closes his eyes and is very calm while eating.
- Occassionally while eating he likes to put his hands around his face, which usually get in the way, and moves around a bunch. (This is cute, except when I'm really tired)
- If he does open his eyes, he loves looking behind me, so I've started trying to put colorful things for him to enjoy.

- He smiles a lot, mostly asleep, but some while awake. (and I think to think, some at me)
- He laughs... full blown laughter in his sleep. One time he did it right after I made a cheesy joke to Matt... his timing was awesome!
- He is starting to focus better on things, especially our faces.

- His hair is starting to come in more blonde.... here comes my little toe head!
- His eyes are a gorgeous deep blue.
- I think he is more tan than me!

- In the last week he has become more of a cuddler and wants to always be held
- He spends more time awake, especially if you aren't cuddling with him. (hahaha)

- His toes have gotten fat... yes, fat! They are stubby little dudes... super cute!

And the most obvious observation... he still looks 100% like Matt!

I love everything about this little guy... not gonna lie, I've had some adjusting to do, and it's been hard. But you find the strength somewhere in there.