Monday, August 23, 2010

Geek My Ride - Part 2: The Tools

Part of the reason for writing this series is because I'm a bit of a narcissist.   Okay, that's not true...part of it is I feel a need to give back to the community of folks who have provided me with so many of the tools I'll be using to do these projects.  The hardware platform I've chosen to work with is Open Sourced, and very well documented.  But, for someone new or returning to the hobby as I am, the docs can be a bit overwhelming.  By documenting my projects, progress and choices, I hope to provide some level of a repository for others following in my footsteps.

Or, I really am an narcissist.  :)

So, to start out, let's talk about the hardware.  As mentioned in my last post, it's Arduino.  Also as mentioned last post, I'm sure there are much better platforms out there to start dabbling in microcontrollers, but Arduino's got a nice, large following and a large repository of projects that are also well documented.  I'm looking to put things into production, not reinvent the wheel.  If I accidentally learn something along the way, so much the better. Since I did have a number of projects I wanted to put together, I decided to eschew purchasing a pre-made board and followed some instructions I found on building your own (warning, link is to a PDF, I couldn't find a link on the site). 

My thinking was that I'd put some extra money into putting together a dev board that could then be pulled off a bread board en masse and moved elsewhere.  In the end, I think this will be a bit cheaper for me as I'll only need to purchase chips going forward.  As I had most of the parts I needed, I just had to pick up some caps and the AtMega chips.  The end result:




Yeah, it's a bit unimpressive especially when you consider the only thing it does at the moment is blink the LED on  the left every second.  But, it's a start.  It's up and it's working.  Not bad for a first try!

As for other tools, there's a couple that will come in handy over the long haul.  The first, believe it or not, is Dropbox.  I will warn you, that link is a referral link.  If you click it and install Dropbox I get an extra 250M of free space.  But, you ALSO get an extra 250M, so it's win-win!  Dropbox is a great way to keep files in sync across multiple computers.  As I sometimes like to work on my projects during my lunch hour at work, it's convenient to have access to the Arduino programming environment there, too. But, I also need any libraries I might've installed, not to mention my sketches.  As the IDE amounts to a whopping 250M when unzipped, and self-contained within a directory, it's the perfect way to ensure my environment's the same at work and at home.  No more "but it works on my machine..."

I've etched PCBs in the past, but the reality is it's a messy, dangerous thing to do at home.  With a 2-year-old running around, I have no real interest in keeping those kinds of chemicals around, so I've decided that when I DO need a PCB etched, I'm going to have it done professionally.  I've already found a couple of places that look like they'll be cheap enough to use.  But, in order to create a PCB, I need a design and so I've settled on FreePCB to do them in.  Another Open Source solution, it helps keeps those costs low!  It doesn't do autorouting, but it can use a web-based autorouter for the task, and I'm fine with that.

That last piece in the puzzle is probably a bit of a surprise, but considering the nature of the projects it's an essential:

:

A lifetime ago, when I got my first car, the alternator went soon after I bought it.  I took it to a mechanic who told me it would cost $200 to replace.  I headed to my local Pep Boys and asked the parts guy how much a new one was.  "$35", I was told (this WAS a long time ago, I said).  "Are they easy to install?", I asked.  "Two bolts and a wire", he said, "go grab a Chilton's manual it'll tell you how to do it."  I was hooked.  Once I replaced that thing, I decided to try my hand at any and every car repair I needed going forward.  Some were spectacular successes.  Some required me to pay extra to the mechanic to de-screw it up afterward, but I learned something new each time.  For every car I've owned since, I've owned either a Chiltons or Haynes (I haven't actually seen a Chilton's in a while...).  As I'm going to need to be able to find electrical connections, having the wiring schematic for my car will be invaluable.  Or, in this case, at least worth $19.99!

That's it for the tools I'll be using for now.  I'd like to give props to our local electronics store, Goldcrest.  Only place in the city I cold find picofarad caps!  Next week, I'll talk about the first project which is already about 90% done.  I've got it wired and programmed, I just need the spiffy LCD I've ordered for it. What is it?  It's a surprise, of course!  But, I'll give you a hint: remember this is a car project, and I decided the first project should be one that helps me save enough money to pay for any remaining projects!








Thursday, August 19, 2010

Geek My Ride - Part 1: The Ride


I've recently moved into a new position that's more of a management-type role, and so don't have much action solving problems for which I can document solutions (although I was pleased to learn recently that one of my coworkers was having issues similar to the one documented in the article "
Resolving difficulties with using certs" and in searching for a solution he came up with mine!)  So, my mental energies being not so completely drained each day, I decided that I should probably give this whole "hobby" thing a try.  It's been a very long time since I've had the time or energy to try getting involved with a hobby, so for me it's a very new thing!

Being an IT/science/parenting geek, I settled on some criteria I figured I could use in deciding where to put my efforts.  First, it would have to be fun.  Obviously.  Secondly, I felt it should also be "productive" to some extent.  If I was going to devote time to a hobby, it meant time would have to come away from my chores and spending time with my family.  I felt that it should somehow contribute back to them in some way, even if it ended up being tangentially.  Third, it needed to be relatively inexpensive.  We don't have a lot of disposable income, so by definition I couldn't dispose of a lot of income on it.  Fourth, it needed to be something that I could use to engage my daughter in eventually and get her interested in some kind of sciencey/techie things. 

I finally decided that something that I'd wanted to do for a LOOONG time was dabble in electronics.  How long?  Well, when I was five years old, I took apart a radio that belonged to my mother.  I carefully pulled each component off of the circuit board inside and meticulously laid each one out on a retaining wall in our back yard.  I've always been fascinated by the field, and have a collection of electronics hobbyist magazines I've gathered over the years.  And, depending on how much I did, it could be done relatively inexpensively. 

I knew, also, that I wanted to get into playing around with microcontrollers.  Electronics are fun, but electronics you can build and then program gives you two bangs for your buck!  Having followed its development for a while, as well as seeing a significant number of projects out there to whet my appetite with, I knew I'd be going with the Arduino platform.  It's relatively inexpensive, has a wealth of information available from the community and is easy to build on.  Is it the best microcontroller platform?  Probably not, but it would give me a number of quick and easy successes early on to help keep my interest.

But, what kinds of projects to start with?  It's easy to say "I want to build projects using a microcontroller", it's another to actually decide on which ones to do.  Fortunately, the decision was made for me.  My old daily driver beater, a 1989 Buick LeSabre that was originally my wife's (I ended up using it as I have a long drive to the office and it got GREAT gas mileage), died.  It was a good car, but in the last year it had really (and literally) started to fall apart around me.  Since we couldn't get by on a single vehicle, we went into a mad press to find a replacement. 

We found a couple of options, and the one we settled on was this spiffy silver 2001 Chevy Impala. It's a bit of an old man's car, but sporty enough to not be totally embarrassing to be seen in.  It's roomy and comfortable to drive, and actually gets reasonable miles per gallon.  This was important...if I really kept myself to a reasonable speed, the Buick typically got 30-32 MPG.  Obviously any significant drop in mileage would end up making it a costly investment.  But, I've been checking it at each fill, and have been averaging between 27-29 MPG (I do mostly highway driving), so no real complaints.  Also, that's been with A/C which the Buick didn't have (another serious plus for this car!)



I've always been a car guy.  In the past, it was all about muscle cars and performance, but I've come to appreciate the bells and whistles that come with more modern rides.  Now being a father, the idea of extreme performance has become anathema to me (and, really, you're limited to at most 65 MPH anyway.  What does all that performance buy you?)  So, that settled it, I was going to use my new car for the base of my electronics projects.  There's a few that I've had rolling around in my head for a few years, but I never had a car worth putting that kind of effort into.  Since I spend over an hour a day in my car, it made sense to put the effort into making the car more comfortable and user-friendly. 

With all of the above in mind, I've settled on a framework on which to design my projects around....When my wife and I were in Las Vegas to get married a couple of years back, we were fortunate in that the rental car place ran out of sedans of the type we'd registered for.  We thus had to settle on getting around town in a fresh-off-the-truck, only 500 miles on it, brand new Infinity G35.  Man, that was a nice car!  At one point, while climbing out of it I noticed the Nissan emblem on the door jam.  I realized that the body of the car was almost exactly the same shape as an Altima, and it finally made sense to me: a 2010 Infinity is nothing more than a 2015 Nissan! 

The Infinity owners pay through the nose for the privilege of "beta testing" all of the new features that will eventually be old news and put in as standard on the "lower quality" cars.  Big dummies.   But, as long as the luxury features work, they get some really nice perks: touch screen navigation and vehicle control, high performance, low fuel consumption engines, quiet, comfortable rides, etc, etc...In thinking about some of the features I liked in that Infinity, I decided that what I was going to do was build a low-cost luxury car using the Impala as a basis. 

So, that's what this series of articles will be about: the journey of my car from family sedan to home-brew luxury beast.  And, since these modifications revolve around an Arduino-based control system, the next article will be about my first steps in using that platform...