DEV Community

Cover image for That time I built a robot.
Kim Arnett 
Kim Arnett 

Posted on

That time I built a robot.

I was always kind of curious about robotics. As a mobile developer, I realize how fast technology changes & understand I might not be working on iPhones in 10 years. I may be working on some kind of software-hardware-Alexa-human-body combination. Who knows.

Robots. The wheels started turning back in college. I had a professor who created programs for robots and I was memorized. His robots were built out of humor more so than practicality, but the basis of them was still impressive. A small robot to jerk around quickly and sporadically with the sole purpose of cat entertainment, or a computer hacked into a power wheels to drive around the campus sidewalks. We watched the webcam's live stream while it cruised around.. entertaining to say the least.

At some point, I came across this book: Robotics: A Project Based Approach. The one flaw I encountered was it isn't 100% complete. Parts were missing, instructions were missing, there was some guessing involved. Hoping to blog both here and on my personal site as I work through the book to fill in some of the gaps. I still recommend it though. There were a lot of great code samples. I will also be posting how I built this, so you can build your own too.


What I built (& soon you can too):

Project 1 is a Prototype Roomba. Proto-roomba roams around the room aimlessly avoiding walls. That's all.

The brains of the robot is all through the Arduino Uno. The Uno is the computer orchestrating which ports get power and when. (I will spell this out better in the next post) The Uno is sandwiched on the back half of the robot between the battery pack (bottom) and Ardumoto Shield (top).

The Ardumoto Shield will plug into the Uno via the stackable headers you'll need to solder into place. (Only soldering required for project 1). Ardumoto is what controls the motors of the chassis.. on, off, clock-wise or counter clockwise.

Other important piece is the blue & black eyes in the front. This is the Ultrasonic Sensor, which tells the Uno when a wall or object is getting close. Based off this value, your code will tell the motors to turn.


Here's the supplies you will need to get started in robotics.

  1. Arduino Uno R3 - Newegg $4.09

  2. Ardumoto Board - Amazon $6.99

  3. Stackable Headers (Recommend at least 2) - Sparkfun $1.50

  4. Magician Chassis - Amazon $29.95

  5. Breadboard (need 1) - Amazon $9.00 for 3 pack

  6. Ultrasonic Sensor (need 1) - Amazon 2 pack $6.38 or Sparkfun $3.95

  7. Solderless Jumper Wires - Amazon $7.20

  8. Soldering Iron / Solder ** I picked up a "Learn to Solder Kit" From my local computer store. I strongly suggest similar practice before you try soldering the Uno (If you are new).

  9. Computer screwdriver set - Amazon $13.29

Immediate Lessons Learned:

  • Debugging hardware and debugging software are complete opposites. And you will be doing both simultaneously.

  • Test hardware before & after soldering.
    I was lucky to not have any problems, but I saw others discover their boards weren't working. If you discover this before soldering, its easy to contact the company and swap out a bad part. If you discover this after soldering, it could very well be the soldering & the company won't be replacing it. (I did have to buy another ardumoto board because I soldered the wrong part. So check everything twice, but if you buy what I suggested above, you should be good).

  • Code / Build / Test frequently & in small iterations.
    It could be a bad connection.
    It could be lower power.
    It could be your code.
    It could be any combination of things.
    You will get frustrated, so keeping iterations small helps with process of elimination. It's much easier to get something working that you last tested 10 minutes ago, than something you haven't tested since yesterday.

  • Realize everything you learn can be applied to other projects.
    If you're not into my proto-roomba, there's a thousand other nifty robots out there. Spark fun has a million components, you can literally go wild over. Have fun. :)

Stay tuned for a full tutorial on Proto-roomba! Feel free to leave any thoughts or questions down below in the mean time.

Top comments (7)

gregorybodnar profile image
Greg Bodnar

How well do you feel the short iteration times works with hardware development? This is an issue we have at work all the time, where hardware spins can be weeks between custom boards. Breadboarding and breakout modules works for quick prototypes, but the process slows down drastically at a board layout phase.

kaydacode profile image
Kim Arnett 

For me, the short iterations helped me troubleshoot why X,Y,Z wasn't working. Easier to backtrack 10 minutes then an hour. This was my first hardware project, and since I used the UNO I didn't need to worry about board layout or construction. I'm interested in the process though. Good luck!

mortoray profile image
edA‑qa mort‑ora‑y

I can't wait for a full tutorial. I've always wanted to build a simple robot but been too lazy to invest the effort to do the upfront planning and research.

kaydacode profile image
Kim Arnett 

For sure! Getting started is always the hardest part. Also, for me finding the time. :P
There was a lot of trial and error when I built this, so I'm currently skimming out the necessary parts. Should have it done next weekend. :)

Hoping to get a hello-world AKA "Blinky" version out as an intro to the uno sooner.

ben profile image
Ben Halpern

That is exactly how I feel. Kim, show us the way!

s3artis profile image
Matt Weingaertner

Great Article. Thanks

But you missed a scrunchy under Supplies. ;)

kaydacode profile image
Kim Arnett 

lolol. The bread boards have stickers underneath, but I have commitment issues, so hair tie it is. :P