How to Build a Basic Wheeled Robot Base

In this post, I’ll show you how to do build a motorized base for a basic wheeled robot.

Shout out to the late Gordon McComb for this project idea. He is the author of an excellent book that I recommend buying if you’re getting started with robotics: How to Make a Robot.

Requirements

Here are the requirements:

  • Build a motorized wheeled-robot base

You Will Need

wheeled-robot-base-1

The following components are used in this project. You will need:

Directions

First, grab the white foam board and cut it as follows:

  • Two pieces that are 4.5 inches by 3.75 inches in dimensions
  • Two pieces that are 3.75 inches by 1.25 inches in dimensions
wheeled-robot-base-2

Heat up the glue gun (I used the 100 Watt setting) and add a line of glue to one of the smaller boards. Then quickly (before the glue dries) attach one smaller board to the end of one of the larger boards so that the edges are lined up.

wheeled-robot-base-3

Do this again for the other smaller board/larger board set.

wheeled-robot-base-4
wheeled-robot-base-5

Now, glue a wooden hole plug to the middle of the top of one of the small boards using the hot glue gun. This board set is the lower base of the robot. The wooden plug will be in the rear on the underside of the lower base.

wheeled-robot-base-6
wheeled-robot-base-7
wheeled-robot-base-8

On the side opposite of the one with the wooden plug, glue two servo motors on either side. The two handles on either side of the servos need to be aligned with the sides and front of the base.

wheeled-robot-base-9

The shaft of the servo needs to be closest to the end of the base with the wooden plug.

wheeled-robot-base-10
wheeled-robot-base-11
wheeled-robot-base-12

Grab a 9V battery with barrel jack connector and place it between the two servos using a stick of Velcro. The bottom of the battery should NOT hang over the edge of the board. This 9V battery will eventually be used to power the Arduino.

wheeled-robot-base-13

Get another piece of Velcro and place it on the underside of the 4xAA battery holder. Attach a piece of Velcro to the middle of the board on the opposite end of the servos/9V battery.

wheeled-robot-base-14

Using Velcro, place the 4xAA battery holder in the rear (the end with the wooden plugs underneath) of the lower base behind the servos/9v battery. The edge of the battery holder should be even with the board, and the wires should hang out the back of the board.

wheeled-robot-base-15
wheeled-robot-base-16
wheeled-robot-base-17

Now, we need to attach the upper base (the white board set that has nothing attached to it) to the top of the servos. Get two pieces of Velcro and place them on top of the servos. Then lower the upper base down over the servos so that the boards are aligned.

wheeled-robot-base-18
wheeled-robot-base-19
wheeled-robot-base-20
wheeled-robot-base-21

Grab the solderless breadboard and remove one of the two power rails. You can use scissors to cut the adhesive that keeps the power rail stuck to the breadboard.

wheeled-robot-base-22
wheeled-robot-base-23

Peel off the backing on the underside of the solderless breadboard, and attach the breadboard to the top of the robot above the servos so that it is aligned with the edge of the white board. The power rail should be in the middle of the board.

wheeled-robot-base-24
wheeled-robot-base-25

Now Velcro the Arduino to the board, behind the solderless breadboard. Give about 1/8 inch of space between the Arduino and breadboard.

wheeled-robot-base-26
wheeled-robot-base-27

Place the rubber tires over each wheel. You will have to stretch the rubber a bit to get it over the wheel, but rest assured they will fit snugly.

wheeled-robot-base-28

Unscrew the screw in the middle of the servos, and then screw the wheels in to the axle of the servos. If you have one of the four-pronged stubs, just remove it. It pops right off if you give it enough of a tug.

wheeled-robot-base-31
wheeled-robot-base-29
wheeled-robot-base-30

Don’t screw the wheels in too tightly, just snugly.

wheeled-robot-base-32

That’s it! You now have assembled the body of the wheeled robot base. Now we need to connect all those dangling wires to something. We’ll do that in the next post (“How to Wire the Batteries and Motors of a Basic Wheeled Robot“).

How to Control the Speed and Direction of a Small DC Motor

In this post, I’ll show you how to control the speed and direction of a small 3-6V DC motor.

Requirements

Here are the requirements:

  • Change the direction a motor is spinning
  • Change the speed a motor is spinning

You Will Need

speed_direction_of_dc_motor 1

The following components are used in this project:

Directions

Making the Motor Move

In order to make a motor move, it needs a power source. Start by, putting one AA battery into the battery holder.

speed_direction_of_dc_motor 2

Place the black lead of the motor into the negative rail of the solderless breadboard. Then place the positive red lead into the positive rail of the solderless breadboard. Also add the propeller to the end of the motor.

Now we need to give the motor some power, so we place the red lead of the battery holder into the positive red rail of the solderless breadboard. Before you place the black lead of the battery holder into the negative rail of the solderless breadboard, pick up your motor in your hand because as soon as you place the black lead of the battery holder into the negative rail of the solderless breadboard, the propeller will begin to spin.

speed_direction_of_dc_motor 5

Now place the black lead of the battery holder into the negative rail of the solderless breadboard. The propeller should be spinning right now. Congrats! That is how you make a motor move.

speed_direction_of_dc_motor 4
speed_direction_of_dc_motor 3

Changing the Direction of the Motor

Now let’s change the direction of the motor. To do that, just switch the positions of the leads of the battery holder. That is, place the black lead of the battery holder into the positive rail of the solderless breadboard. Place the red lead of the battery holder into the negative rail of the solderless breadboard. That’s all there is to it.

speed_direction_of_dc_motor 7

Increasing the Speed of the Motor

In order to increase the speed of the motor, we need to add more voltage. A standard AA battery is 1.5 volts. How do we make the motor spin four times as fast? We need to use four AA batteries in series instead of one. Four batteries have a voltage of 6 volts, which is four times the voltage a single AA battery.

speed_direction_of_dc_motor 6
speed_direction_of_dc_motor 9

So let’s do this. Add four batteries to the 4xAA battery holder. Place the black lead of the battery holder to the negative rail of the solderless breadboard. Place the red lead of the battery holder to the positive rail of the solderless breadboard.

speed_direction_of_dc_motor 10

You should see the motor spinning four times as fast as it was previously. That’s it!

Benefits of Cross Compiling from a Host Computer to the Raspberry Pi

Having just developed a number of applications for the Raspberry Pi by building and executing the code directly on the Raspberry Pi, I can tell you that this will soon become impractical for larger projects.

The benefits of cross compiling from a host computer to the Raspberry Pi are numerous. Here are six benefits that come to mind:

VNC Viewer Lag

vnc_viewer

You don’t have to deal with the lag created on the VNC viewer session on your host machine. Sometimes I would type in some text on to my keyboard, and it would take five to ten seconds to appear on the Raspberry Pi. This could become annoying for large projects when I have hundreds of lines of code.

Compile Time

compile_time

The processor in a host machine, such as my HP Omen laptop, is way more powerful than the Raspberry Pi’s processor. This leads to much faster compile times and increased responsiveness.

If you are creating a large program, you’ll need to compile that program numerous times over the course of development. Those precious seconds that you will need to spend waiting for the Raspberry Pi to finish compiling and responding add up over time, resulting in reduced productivity.

Graphical User Interface

graphical_user_interface

A host machine typically has a more advanced and user-friendly graphical user interface.

Multitasking

multitasking

A host machine, such as a Windows 10 machine, is built for heavy-duty multitasking. A Raspberry Pi is not built for such a level of multitasking. I am for example unable to search the web for code examples, check my email, and code all at the same time. Doing all of this on the Raspberry Pi presents significant challenges because of the lack of power compared to my host machine.

Debugging Capabilities

debugging_capabilities

An IDE such as the Eclipse IDE, that could be downloaded on the host machine, has a number of advanced development capabilities, including remote debugging.

Screen Resolution

screen_resolution

Even though I was able to increase the font size on the Raspberry Pi, using my own laptop resulted in a much crisper image. This is very important when I am staring at a screen and looking at code for long hours during the day.