So You Want To Build A Robot

Lisa R Dean
DigitalCrafts
Published in
5 min readOct 30, 2018

Okay, the title was a trick. I’m not going to talk about the kind of robot you probably pictured when reading that, but this article will introduce you to some of the tools a beginner should know about when they start down the path to building their own robot butler/dog/toaster.

At some point in your programming life, or maybe before you know you’re about to have a programming life, you’ll see some cool robot video on the internet, see BattleBots on TV or hear obscure names like Arduino or Raspberry Pi. At first, you might think that you have to be an engineer or genius to build one of these robots, but you’d be wrong. It’s become more accessible than ever before to build cool things that blink, move, and beep.

BattleBots — robots, but with extra fire!

I’ve been interested in electronics and robotics for some time but first believed that it was something I could tackle while attending the DigitalCrafts coding boot camp. I heard my instructor talk about side projects he’d done, like a temperature monitor for his smoker and a “big red button” that mutes his TV and stereo quickly, and talked to a previous student who had used a robot car for his capstone project. I began to think that this was something I might want to look into for my capstone project.

I researched what hardware I would need and what knowledge I’d need to pick up. It quickly became apparent that, for a hardware newbie, the two technologies I’d want to concentrate on were the Arduino platform and little computers called Raspberry Pi.

Ardu-what?

A lot is hiding behind that one word — Arduino.

Arduino is an open source computer hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world.¹

Since the term covers so much territory, an Arduino can take many forms. Many starter kits will include an Arduino Uno or a comparable generic version but there are many other models such as the Mega, Nano, Leonardo or LilyPad. If a project requires wifi, the ESP8266 NodeMCU board with built-in wifi will often be used.

Arduino Uno and ESP8266

The boards are programmed with the Arduino IDE using a variant of the C programming language. Once the program is uploaded to the board via a USB cable, a computer is no longer required for the board to operate.

Arduino Code

I got my feet wet with the Circuit Playground Express. It’s a little round board with a ton of different sensors and LEDs. It can be programmed with the Arduino IDE but also with MakeCode, CircuitPython, or code.org CS Discoveries.

Later I used a DIY car kit off of Amazon that allowed me to put together a functioning car without having to figure out which motors, Bluetooth modules, and other electronic components would work together. The kit also provided the code to make all that run.

Circuit Playground Express and the Adeept Smart Car Kit

Raspberry Pi

The Raspberry Pi is a full computer packaged in tiny form on a single circuit board. It won’t have the processing power or storage of your personal computer but its small size and power requirements allow it to be used in places a bigger, more power hungry computer couldn’t be.

Unlike an Arduino, when a person talks about a Raspberry Pi, you can be assured that they are talking about one or two models. The most recent models are the Raspberry Pi 3 Model B+ and Raspberry Pi Zero. Both offer Bluetooth and wifi, and interfaces for plugging in a keyboard, monitor and mouse, other USB devices and SD card storage. The Model 3 B+ also has an ethernet port

Raspberry Pi 3 Model B+ and Raspberry Pi Zero

Most people will run Raspbian, a Linux distribution, as the operating system on their Raspberry Pi but there also many others including a stripped down version of Windows called Windows 10 IoT Core.

With the addition of its GPIO pins, it can also do many of the things that an Arduino can. You can connect almost anything to the Pi that you can connect to an Arduino.

When To Use What

So, when do you use an Arduino, a Raspberry Pi or both? Space and power requirements are a factor. The Pi will usually require more of both. If you have a few simple tasks to do, like measure temperature or humidity and report on it, maybe through wifi, you can use an Arduino. If you need to do something more complex like scanning an image, processing it through a computer vision library and sending that information somewhere else, you’re going to need to use a Raspberry Pi.

You might want to use both if you already have a project working with an Arduino (like a robot car you built from a kit) and you need to send or receive some data from it. It can be easier to send the data to a Pi over a USB cable and have it handle the communication than to add Wifi to the Arduino.

Where Now?

This article barely scratches the surface of what is possible with hardware. If this topic interests you, I highly suggest checking out Adafruit.com, specifically the Learn section of the site. Adafruit sells electronic components and supplies but is also a very good resource for learning how to use them or getting ideas about what projects to build. Make is another good website for project ideas and walkthroughs. In addition, they have a quarterly magazine and run Maker Faires all over the world.

And I can’t possibly end an article about robots without recommending Simone Giertz, aka the Sh*#ty Robot Queen. Her YouTube channel full of ridiculously useless robots has been an inspiration for many. Not everything you build has to be useful, sometimes it can just be fun.

--

--

Lisa R Dean
DigitalCrafts

Imposter Programmer. Former sysadmin. Still on the impossible childhood quest to know everything.