Post Index:
« Flashback: ADAM MK2 | Main | Remotely Enable Remote Desktop »

Flashback: ADAM MK1

I really hate having to transfer my old projects over here.  Rather then pretend I'm adding any of this fresh, or trying to hack apart old descriptions, I'm going to take the lazy route and add a bunch of photos of the older projects here, with descriptions.  At least I'll have an archive of something I've accomplished that way!

Originally posted July 3, 2008:

For the last few months, I've been toying with the idea of building myself a little robot.  I figured it would be fun to build, and also be a great platform to learn more about the Atmel AVR microcontrollers I've been experimenting with.  A few weeks ago, I decided to take the plunge, and bought a few servos and a sheet of HDPE plastic to mount on.

Long story short, I designed and built the thing pretty quickly considering it's my first 'bot.  So without further adieu, I present ADAM v1.0:

He consists of:
- 2 HiTEC HS-311 servos modified to spin a full 360 degrees
- An Atmel Mega8 AVR Microcontroller
- A custom 5v DC regulated power supply powered off of a 9V battery
- A soon to be replaced 7.4v Li-Ion battery pak I stole from one of my RC choppers (Need a 6v pack for the servos)
- A custom PCB consisting of 4 servo sockets, a pin breakout for the AVR, I/O headers, and a 5v power header
- 2 awfully large wheels I stole from an old RC car Kate found at a thrift store

Total cost: Roughly $50 so far.  Could have probably built it cheaper, but I wanted nice parts so I wouldn't have to worry about them breaking down.

I have a Maxbotix LV-EZ2 sonar rangefinder headed my way, as well as a mini breadboard to mount in the empty space on the PCB.  Should be fun to build on this guy this summer.

Originally posted July 10, 2008:

As previously posted, I've got me a little robotics project on my workbench to keep my brain functioning when I get bored with TV.  Which is, like always lately.  It's designed to be a platform to learn with and grow with, and man, has that been kickin' my pasty geek bootie the last few days.

First, the wheels turned out to be mounted pretty badly.  After a few failed attempts at getting servo horns attached, I finally made them stay on well enough to make me feel great about it.  But once I got the first servo test program up, I realized they were just off center enough to make the chassis ride funny.  Can't have a faulty platform, now can we?  So I ripped those puppies off pretty quickly until I come up with plan B.  (Actually, Plan B is drying as I write this.  Should be centered better now, but we'll see tomorrow...)

Then I spent days trying to fight with funky programming issues.  I just wanted the thing to drive straight as a test program, and I ran into all kinds of issues with my compiler.  I'm using AVRStudio 4 and AVRlib, and had no idea how I was supposed to set up the header files to make them work.  It was weird.  I could compile my program, but it would only pulse one servo at a time, which would make ADAM jerk forward one wheel at a time instead of one smooth straight run with both wheels.  After several posts on the Society of Robots forums, I was about to give up for a few days to clear my brain.  But as a last ditch effort, I started from scratch, re-coded the whole thing, and now it seems to be working perfectly.  I have no idea what the hell happened, but I really don't care.  I have a functioning code base.  Yeeha!

Pulling further cowboy expletives from my throat, my battery pack, breadboards, and sonar rangefinder came in today.  ADAM's starting to finally look like he can be shown to others without having to answer "But what does it do?" every time, and I should be able to make him semi-autonomous in a week or two after I figure out this I2C stuff.  Sensor communication = big learning curve.  Anyway, here's a pic with the breadboards mounted and the current (super simple) wiring through the jumpers I've set up (sans wheels as they dry):

Also, because I always work on seventeen projects at a time, I've started picking up Python.  It's one of those geek skills that can potentially come in handy every day on your PC, and so far is so super easy it scares me.  It's like learning BASIC, but with street cred.  I can see why so many people are devoted fanatics.  If Jesus were a programming language, he may just have been Python...






Originally posted July 11, 2008:

As a quick tip, I made a pretty silly mistake early on in my haste to get this lil' guy rolling.  If you're modifying servos so that they spin 360 degrees, make sure you power them from the same voltage source as they will be using once you mount them.  If you don't, you may end up having the issues I did with zeroing them out later to make them stay still.  Since I used a 5VDC bench top power supply when I initially zeroed mine (and am now using a 6VDC Ni-MH battery pack), I was pleasantly aggravated when I noticed that I could move forward, back, and turn...but couldn't ever stop.  He'd actually just slowly spin in an almost imperceivable circle to the right.  Well it was perceivable enough to bother me, so I had to pop my servos off the chassis and open them up again.

Let me tell ya, scraping gorilla glue out of these things with an awl is no fun at all.  On the positive side however, I've learned a pretty handy lesson for the future.

Originally posted July 11, 2008:

Tonight I started playing around with the LV-MaxSonar-EZ2 ultrasonic range finder.  It seems pretty easy to configure.  I just hooked in a +5V and a ground line, and a single analog output line to my micro.  The sensor outputs ~10mV per inch down the signal line, and I just have the micro sample the voltage through the analog to digital converter and program a response to various ranges.

As of tonight, my servos are still waiting for the glue to dry, so I just hooked up a signal LED to the micro on another output, and tested the sensor with a quick function.  When it sees an object at around 7 inches, it turns the LED on.  Otherwise, it turns it off.  That's one of the drawbacks to using an ultrasonic sensor in this fashion: there's a minimum range needed to bounce the sound off of something and have a meaningful return.  Here's a video of it in action:


Yep, my commentary is always that lame...:)

So now I just need to have ADAM react to the range data appropriately, and he'll be able to pretty much free-range about the apartment without smacking into the furniture/walls/Kate's foot.  I still really suck at development software-wise, so the next part may be a bit trial and error.

I also found a source for some female pin headers, and other misc. goodies to expand on ADAM's mainboard and make him even more modular.  I didn't think I really had to until I was finding ways to mount the EZ2.  I ended up just soldering male pin headers to it, bending them 90 degrees, and then soldering it right to the front of the board connected to a second header to run jumpers from.  Not exactly modular.

Originally posted July 13, 2008

So mechanically, ADAM's been pretty set up for a while now.  Sure, we had our misaligned servos, non-binding glues, and failed mounting brackets, but it's pretty much been up to me and my mad programming skills.  By mad skills, I of course mean that when other people look at my code, they decide I'm crazy.  Also I guess it makes me swear a lot.  My C is pretty poor at the moment, so it took me a few hours longer then I anticipated, but this afternoon marks the occasion of ADAM's first official run all by his lonesome!

A victory for me I say!  The important thing here is that I'm constantly learning something new about AVR micros and how to interact with them, so all in all mission successful so far.

The latest issue with my coding is that I can't seem to get functions to work properly the way I'm working my timing loops.  The code seems to just make its way into one, then get stuck.  It's totally something in the way I write out my algorithms, but I'll figure it out soon I'm sure.

As far as the platform goes, it tends to pull to the right a bit on carpet.  I think it's because the wheels I used aren't completely straight.  The plastic inside is fine, but the rubber tire portion seems to be warped a bit on the right side, causing a bit more friction.  I'll have to see if there's something I can do about that.

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>