I decided that I wanted to build a robot, and build one with my daughter who is about to turn 9. I have plans in my head for the most amazing robot ever, but I figured we should start with something a little simpler and smaller.
First up, what to build? After a bit of research, I decided that a 2 wheel drive and a caster for a third wheel was the way to go for our first robot. Next, I needed a frame. I read a bit about building my own with metal, or wood, or cardboard, or coroplast, but I thought that I wanted to go with a purchased frame. I figured that a plastic frame would be sturdy enough, more durable than cardboard, and would not scare off my daughter. They can really be pricey. What I settled on, due to price was the ‘old’ frame that Sparkfun used to base their basic robot off of. I found it at the Robot Shop.
This kit came with a two tier frame, two motors, two wheels, the caster, and a battery holder for $15. My kinda deal. This is what the kit looks like, putting the motors on the bottom.
The motors sit under the lower deck.
This chassis is a two tier design. Their design places the battery pack in the middle. Note: for this phase of the project, with the robot connected via USB cable, the battery pack is not needed. But, if we didn’t put it in now, it would be really hard later.
The battery pack sits on the top of the lower deck.
The whole thing goes together pretty easily. There are screws and standoffs included with some ok but not great instructions. Still, Lily managed to put most of it together with some guidance.
Assembling the upper deck
Next up was the brains. I didn’t want to buy an entire kit. For example the RedBot Basic Kit that SparkFun sells is $84. Two issues for me. First was that the kit relies on a single purpose built board for everything. I wanted more flexibility. I didn’t want a micro-controller and the motor controller, and the sensors all contained in the same silicon. I wanted more reuse. Second, I wanted more input into this. I didn’t just want a step by step kit. I wanted to still keep things simple, but with some stuff that I purchased separately. This also allows us to build it in separate stages. After the chassis was built, I said to Lily, “now what?” We decided that it needed a brain. She thought that one just like we were already using (an Arduino Red Board) would be a good idea. Instead of using the one we had, I placed an order for another of these $20 boards.
Arduino Red Board Blinking (default sketch)
It took us awhile to figure out a good way to mount it to the top. We couldn’t find a pattern of holes that fit exactly. We did have some extra short standoffs from the chassis kit, and were able to use these. We managed to attach the screws to the Red Board and the chassis at 3 points of contact. The one at the top near the headers is just connected to the board.
I also ordered a motor controller shield. I thought quite awhile on what to get here. In the end, I decided that a shield would make this much simpler and have less wires going all over. I purchased a Ludus Prototype Shield from SparkFun. At a whopping $25 this was the most expensive part. It does have an interesting trick. This version of the board supports plugging in an XBee. I think that taking this robot wireless eventually will be a big draw for my daughter in the near future.
Ludus Motor Controller shield plugged into the top of the Red Board
It then took some deft maneuvering of the motor wires from the bottom of the chassis to the top so they could get plugged into the Ludus controller. (You can see a servo in this image. I had one lying around and plugged it into the controller as well, but it is not necessary)
Wiring up the motors
In this next image, you can see that I pushed the wires up from the bottom, and plugged them in. Actually we plugged them in wrong. If you look closely you can see that the + and – signs aren’t lined up with the black and red wires properly. We got our first chance to debug our hardware once the software had been loaded. 😉 But that’s it. Just a few wires to connect the motors, and we have the first iteration of our robot. Now for some brains.
Connecting the wires to the controller
To start with, to get it running quickly so Lily could see some progress, we used a sketch that SparkFun wrote. They have a whole tutorial on the Ludus Controller. This is one reason that I purchase from companies like SparkFun and Adafruit in the United States. There are often cheaper places to source some of these parts, but I like to support the companies that are creating tutorials, and supporting their customers on their forums /rant. Anyway….
Using the Arduino IDE, I copied the sketch from SparkFun (I grabbed the entire thing from GitHub) and pasted it into a new sketch. After setting the correct board type (Arduino Uno) and a baud rate of 9600, I uploaded the sketch with no problems. This particular sketch uses the serial monitor built into the IDE to send command to the robot over the USB cable.
Arduino Sketch and Serial Monitor
What’s cool is that we can just type in a few letters into the console and send these commands to the robot over a USB cable, and the robot moves. That was pretty exciting. Here is Lily entering some commands to move the robot on the table.
Lily sending commands
Phase one complete. Chassis built, check. A micro-controller with a motor shield, check. A program to move the robot across the table, check. 8 year old excited to be a maker, check.
Lily doesn’t like the USB cable. She wants it to move on the floor. I think that might be the next step.