Sunday, January 25, 2009
The Definitive Human Activity: Science
Uncertain Principles
Saturday, January 24, 2009
Pluto, get out of the way, we're looking for REAL planets.
NASA has a website that contains a countdown clock for the launch of the Kepler mission. Kepler is a visible light telescope similar to Hubble which will search for planets in galaxies far, far away. Many planets in solar systems other than our own have been found with the Keck Observatory in Hawaii (pictured above). Specifically, the Kepler is searching for planets are are in the special zone that could possibly support life. So aliens, watch out, Earth has just become Jimmy Stewart in Rear Window.
The Kepler mission home page is here.
Creation of the Title Picture
I've been dinking around with LCDs controlled with an Hitachi HD44780 LCD Controller. You can purchase one at Sparkfun, of course. As a matter of fact, here is the model I used for the picture above.
I've used the Matrix Orbital serial and usb LCDs before and found them to be very easy to use and implement in a project like Junkbot. The downside to Matrix Orbital LCDs is two-fold. First, there is a price. For $14, I got the LCD from Sparkfun. Comparitively, the same LCD with a serial backpack from Matrix Orbital may cost from $80 to $100. Second, you are limited to using Matrix Orbital's implementation of the serial interconnect. This isn't that big of an issue, but sometimes one just may want low level access to their human interaction interfaces.
However, in order to use the HD44780 controlled LCD, I had to write my own driver for my Atmega8 in order to support the display. This proved to be an interesting project and it took me an afternoon of trial and error. Luckily, there is a ton of information out on the internets about the HD44780 controlled LCD.
Sunday, January 18, 2009
My Kingdom for a Viz-Wall
The university I work for may attempt to build a scientific visualization wall similar to the one at TACC (Texas Advanced Computing Center). Luckily, my team will be in on the ground floor helping to build and manage this system if we get the monies. Honestly, I am very excited (who am I kidding, I get goosebumps just thinking about it) with the chance of working on a project like this. Here is Stallion at The University of Texas at Austin.
Sunday, January 11, 2009
EVE Online
Friday, January 9, 2009
Awesome is Awesome!
A co-worker showed me this window manager today for X11 and it freaking rules! I do have to warn you though, this thing is for people who like to seriously customize their systems. I loaded Awesome up on my Ubuntu machine this evening and had a lot of fun messing around with it.
Awesome Window Manager
Thursday, January 8, 2009
A Body for a Bot
I quickly realized that I was going to have to create a chassis for Junkbot. In the last Junkbot post, I described my first foray into learning to program microcontrollers such as the Atmel Atmega 8. I found the little processor was extremely capable of making LEDs blink. I had also learned enough AVR GCC to blink the LEDs at different rates. 20hz, 10hz, 1hz, etc... All very boring.
Since robot crafting is about more than just making things blink, I decided to move away from the electronics for a little bit and concentrate on the metal portions of the bot. First, I needed a platform to attach all the junk that Junkbot would be made of. The platform needed to support a camera, a couple of battery packs, two servos with wheels and a circuit board that contained the brains. Believe it or not, I found that an old license plate worked perfectly.
License plates are made of a soft metal alloy which is very easy to bend and drill. Since I had literally no experience in metal working, I decided to modify my old license plate as little as possible. I decided to cut the plate nearly in half and bend the sides down. You can see how it turned out.
The bent down sides allowed me to mount the servos on either side of the bot and a caster toward the back. Junkbot's motion would be a simple matter of driving the servos in the same direction for forward and backward and in opposite directions to turn. As I was to find out, however, this is a great configuration for slow moving vehicles that stop to turn, but not so great for little robots that want to go fast.
With the servos and caster mounted, I needed to come up with a way to mount the circuit board that would eventually be Junkbot's brains. You can see in the picture above that four small bolts with nylon washers turned out to be a perfect way to create mounting posts for the circuit board. All of the mounting hardware was purchased at Home Depot for less than $5.
With the chassis for Junkbot mostly complete, I turned my attention to the controller (pictured at the top of this article). I wanted it to have a 'junky' feel also, so back to Home Depot I went. I found some aluminum sheets for sale and picked one up for ~$10. From what I've seen on television, aluminum can be a notoriously difficult metal to deal with. I actually didn't have too much trouble building the case for the controller. I stuck to the basics and didn't attempt any brazing or welding. Fastening the controller case with bolts also gave it a good retro feel.
Bending the aluminum turned out to be an easy exercise. Measure twice and put the metal in a vice. Bend as needed. I used a pair of tin snips and a dremmel tool to cut out the hole for the LCD screen. All and all, I had a good time building the chassis and controller, though, next time I think I'm going to start picking the brains of folks who have experience with this stuff.
Now that I had created a mobile home for an electronic brain and something to control it with, I needed to build the brain. For me, this is the fun part. I love small electronic builds like this. Sure, it's super difficult to debug a microcontroller without expensive equipment but if you're interested in this kind of stuff, the payoff is well worth it. The feeling is fantastic when you get a piece of the bot working after hours and hours of debugging. I've been known to hunker down into a few 12 hour sessions myself. The next Junkbot post will deal with Junkbot's brain.
Monday, January 5, 2009
Trees are Stupid
Junkbot
I decided to embark upon building Junkbot as my first foray into the wild and woolly world of microcontroller programming. I had several goals that I wished to meet when Junkbot was complete.
- The robot needed a remote camera. Honestly, it didn't *need* a remote camera, but the thought of driving the robot around without being able to see it was pretty freaking appealing. Not to mention the coolness factor goes up ten fold.
- I also wanted to create an interface to the robot that was easy to use. Joysticks are fairly simple, but I wanted a digital interface with an LCD screen. (More coolness factor)
- I wanted Junkbot's range to be around 100ft or so. I ran into some noise issues with the wireless serial comm link I used with the system, but was able to fix them early on.
- Junkbot had to look like I built it out of a pile of junk (hence the imaginative name). I used an old license plate (which by the way, is wonderful project material) to create Junkbot's chassis. The license plate is from Ohio, where Sara and I hark from. Go Bucks!
- I also wanted to use my mad assembly language programming skillz to create the control interface. This turned out easier than I expected due to the excellent AVR Studio 4 programming suite provided by Atmel. The studio includes a strong debugger / simulator for their processors. This functionality is vital when your ability to debug with blinking LEDs hits a wall. :)
So, after looking at these goals and deciding how it was going to fit together, I promptly got frustrated and watched some mindless television (Stargate, w00t!). Seriously, this project was way bigger than I expected and I was not nearly prepared for it. So, I hit the internets to search for a proper introduction to microcontroller programming.
Ask the interweb and you shall receive. The goldmine for setting up an AVR microcroller with power and the proper (magic) oscillator crystals was on SparkFun. I was flabbergasted at how easy the was to read and comprehend.
(me discovering sparkfun electronics)
Seriously, I may have posed that shot for fun but that's exactly how it went down at the time (ask my wife). SparkFun is really that good.
Onward! After reading the embedded electronics tutorials straight through in one night, I had an epiphany. The building tools I owned were ehh... kinda scary for everyday usage. While I could certainly use the soldering irons I own to embed my initials into plastic or wooden stuff, going for broke on Junkbot's brains really seemed like a bad idea. (Look at 'em, just waiting to burn down my house...)
My first step was to gather the proper tools for the job. Screwdrivers, tin snips, tweezers (very important!), a grossly over-powered calculator, and some serious Mt. Dew supplies got me pretty far. However, in order to get into the neat stuff, I needed some specialty items.
First and formost, I got a solderless breadboard. These things are freaking great! They allow you to prototype a circuit without the hassle messing with solder. Check it out, here's a picture of my 3M solderless breadboard stuck in the middle of a project that uses an LCD.
As you can see, each component is connected via wires instead of solder. Solderless breadboards simple really. You only need to master one principle: wires go into holes. Easy, eh? Some holes are connected to other holes and allow you to interconnect components that sit in the holes waiting for power. Using the breadboard instead of actually soldering up a circuit makes life significantly easier during the debugging phases of your project. (And trust me, you will be doing a lot of debugging if you intend to take up this hobby.)
The information in the SparkFun tutorial was dead on and soon I found myself with an 8bit 16MHz AVR Atmega8 processor that was powered by a big 'ole stack of AA batteries (actually, just 4 of them since AA's are 1.5V apiece and I needed at least 6V for the 5V voltage regulator). This circuit is actually very boring. I had built the neato power circuit outlined in the SparkFun tutorial, but since I had no way of interacting with the processor, it just sat there. I needed software and a programming cable capable of speaking AVRese.
Luckily for me, there is tons and tons of information on how to build a cable for programming an AVR without spending too much money (good for me cause I'm cheap!) There is also excellent free software to program said AVR processors for Linux, Windows, and MacOS.
(cheap, cheap, cheap)
I decided to build a cheapo parallel programming cable. Now, had I realized what a pain it was going to be to debug this board, I probably would have flung frugal caution into the wind and bought the capable serial programmer from SparkFun for $12 (which, incidentally, I now use). I mean, geez, look at all those wires coming out of the parallel interface…
With the programmer built, I moved on to finding an application that would read my compiled code and send it on to the AVR to be run in realtime. I quickly stumbled across PonyProg. I had trouble getting the software to program my processor at first, but this was due to the cable and not the software (see the previous paragraph).
Now I was able to write programs in C, compile them using GCC for AVR processors and write the compiled program to the microcontroller. My next step was to find a way to interact with the processor. According to the SparkFun tutorial, the simplest way to interact with a microcontroller is to blink and LED. Not exactly an amazing feat, but I certainly got a good feeling once I got the LED to blink off and on at 20hz.
I will continue this post later this week with my crazy adventures in metal shaping and servo control.