We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
2,812 Tutorials

How to build and program a robot

Getting started with robotics

If you thought that building a robot would set you back a small fortune, we have news for you. While robots can be hugely complicated and expensive, taking your first steps in robotics needn’t be difficult or costly.

The best way to learn about robotics is to build and program your own robot. This can involve buying many different parts from a range of suppliers, or you could take a simpler route with a DIY kit.

We’ve used the £75 Deluxe junkBot from RobotBits. A £65 Basic junkBot is also available, but this model requires you to do some soldering work on the motherboard and supply your own wheels and castor.

Here, we describe how to fit together the various components in the kit. Even those with no engineering experience will be able to follow our instructions, using only a set of screwdrivers and a drill. It should take little more than an hour or two to build your own junkBot robot.

Left to its own devices, your junkBot isn’t capable of much. Just like a PC, it needs to be programmed using software in order to do anything useful. Unlike PC software, though, which mostly writes information to the computer’s screen, the junkBot’s software drives the motors that are connected to its wheels and uses an infrared sensor to detect nearby obstructions.

To complete our introduction to robotics, we’ll show you how to download a sample program to your completed junkBot. This can be modified to alter the robot’s behaviour.

This is just the start, though: the sophistication of your junkBot’s behaviour is limited only by your imagination and how much time you’re prepared to take in honing your programming skills and developing the necessary software. Persevere, and you’ll be amazed at how much you can achieve with such a simple, low-cost kit.

Step 1. The junkBot kit doesn’t include a chassis. You don’t want something that’s so heavy it’ll overload the motors, nor so flimsy it’ll collapse during use. We suggest a plastic box that’s large enough to house the parts and long enough to be stable. We bought a 1.5-litre tub for £1.25 at our local supermarket.

Robot 1

Step 2. Attach a wheel to the axle of each servo motor (black boxes with black/white/red leads). The wheels should push in easily if they’re the right way round; secure them with the small black screws. Attach each motor to the bottom of the chassis using the double-sided sticky pads provided. Fix the castor to the back, too.

Robot 2

Step 3. Plug the Mini-IO Shield circuit board into the Arduino Uno circuit board and secure it using the plastic spacer and screw. The Arduino Uno board will form the brains of your robot. The Mini-IO Shield provides an interface between the Arduino Uno and the junkBot’s motors and sensor.

Robot 3

Step 4. Fix the Arduino Uno/Mini-IO Shield assembly to the inside of the chassis using the three metal stand-off pillars and the six screws provided. Position it near the front, leaving space for the battery holder behind. You’ll need to make three small holes in the base of the chassis. If you don’t have a drill, use the point of a pair of scissors (carefully).

Robot 4

Step 5. Attach the distance sensor to the front of the chassis (the wheel end). The two black shiny spheres (an infrared LED and an infrared detector) should point forwards. Since there’s no space for adhesive pads, you’ll need to use nuts and bolts. Make sure it’s not pointing downwards, packing it out if necessary. Plug in its lead.

Robot 5

Step 6. Insert six AA batteries into the battery holder. Connect the battery lead to the battery holder and use the two pairs of self-adhesive Velcro strip to attach the battery holder to the inside of the chassis. Position the battery holder near the back of the chassis to keep the weight balanced.

Robot 6

>> Continues

IDG UK Sites

Google Fit vs Apple Health Kit: What's the difference?

IDG UK Sites

How to join Apple's OS X Beta Seed Program: Get OS X Yosemite on your Mac before public release

IDG UK Sites

Introducing generation tech

IDG UK Sites

Government kills £50 million 'Silicon Roundabout' regeneration fund