Sunday, July 29, 2012

Project #1.3: Light-Tracking Robotic Arm. Clarification.



After finishing my last post, I realized that my explanation of the setup wasn't very detailed. So before pushing things along to the programming, here's a close-up of the breadboard, with the components and wires labeled.

And next... Onto the sketch.

Project #1.2: Light-Tracking Robotic Arm. Proof of Concept.



So - My initial assumption regarding the amount of C I'd have to learn was a bit overstated. If you're familiar with almost any C based language (Python is a great example), learning to control the Arduino shouldn't be more complicated than spending a couple hours looking over examples on the Arduino Foundations and Reference page. Though I do have to say, the Arduino Cookbook 2nd. Edition is a phenomenal reference. The book not only shows you how to do pretty much anything the Arduino is capable of, but it gives detailed explanations of each sketch (that's Arduino-speak for "program") to provide an understanding of why it's written the way it is.

Before diving in head-first, soldering up components and buying supplies for the arm, I'd like to do some testing. For now I'll focus only on a single axis, this will make life much easier should something not appear to be working properly.

The Setup:
Two Light-Dependent Resistors (LDR), also referred to as photo-resistors, each connected to analog-in pins.
A digital (standard) servo, connected to one of the digital PWM-capable pins.

That's it! I told you the Arduino was going to make this easy on us. Now comes the fun part - writing a sketch to tell the Arduino to compare the voltages of the two LDRs, and sending the servo in one direction or the other, accordingly. The idea is that when light is shining on one side of the "face," the servo will rotate toward the light until the light hitting both LDRs is equal.

Monday, July 23, 2012

Project #1.1: Light-Tracking Robotic Arm. Planning the Project.

My first big project... I got the inspiration for this project while browsing videos on YouTube of ME/CpE thesis projects involving computer vision and autonomous robotics. My project isn't going to be anywhere near the scale of those, but the idea is to build my way up to that level eventually. As this will be my first project using an Arduino, and I'll be constructing the arm myself, I figure I'll start small. I'll be building a robotic "arm" which can rotate 180 degrees horizontally and vertically to follow a beam of light.

My initial plan was to build everything from scratch, and have no software involved at all. I would build a PWM (pulse-width modulator) to control the servo position using a 555 timer chip, and use a 339N IC as a comparitor. The 339N IC would compare the voltages of either the right/left, or up/down photo-resistors mounted on the "face" of the robot, and send a signal to the PWM accordingly. A little aggressive for the first go-round... While some day this may be a project to take on, once I started looking at the details of what it would take to get something like this built and functioning properly, I decided to enlist the help of my new best friend, the Arduino.

Using an Arduino for a project like this will cut the time to completion exponentially. If you haven't heard of, or don't know much about, Arduino, I highly suggest you check out the Arduino website. With analog inputs, and digital outputs (that can also function as a PWM) already built in, most of the grunt work is already done. This did, however, add one more project to my list... Learn to program in C. While it's not necessary to be well versed in C to get started experimenting with the Arduino, it certainly will make life easier going into this with some background knowledge.

Saturday, July 21, 2012

Hello, World!


Hello, and welcome!
Before jumping into any projects or tutorials, I thought it may be a good idea to give you some background information on myself. I'm a 25 year old Helpdesk technician living in the Washington, DC area with my wife and 1 year old son. I've recently gotten very into the fun-filled world of robotics and programming. Now that I've learned enough to start venturing off into projects of my own, I figured it was time to stop trolling forums and give something back. Hopefully you'll find the projects on here at least fun, if not informative. Feel free to post comments, and I'll update as frequently as possible. Don't forget to bookmark this site so you can check back when new content starts flowing!