CHAPTER 1

image

Welcome Robot Inventor!

You’ve chosen a stimulating and rewarding hobby. It’s more expensive than insect collecting, but less expensive than stock-car racing.

Think of it: One day your hands will be giving birth to new life forms. Initially, they’ll be rudimentary, but like all handcrafted art, each piece will be unique. And like any great artist, your pieces will gradually become more complex and more wonderful.

Despite decades of public fascination with the concept of robots, helpful personal robots remain an unfulfilled dream. Other than industrial robots, most advancements in the field of robotics are actually due to somewhat unrelated consumer products, such as personal computers, toys, quadrocopter drones, and household appliances.

Disheartening? No. It’s exciting to be involved in a field that’s rife with world-changing potential. You can make a difference because there is still so much room for new inventions. So, welcome to robotics and let’s get started!

Four Disciplines

Robotics comprises at least four major branches of learning:

  • Electrical Engineering (circuits and sensors)
  • Mechanical Engineering and Machining (gears, motors, and body)
  • Computer Science (pseudo-intelligent behavior)
  • Arts (expression, style, and fun)

You don’t need to be an expert in each field in order to build a decent robot. However, if you happen to have a background in one field, your creations will naturally revolve around that strength. Along the way, robotics provides an exciting opportunity to learn new skills and find hidden talents.

Think of the Renaissance artist and scientist, Leonardo da Vinci. If he were around today, he’d be making robots.

Anatomy of a Homemade Robot

Robots come in a wide variety of shapes and sizes. The point at which an electronic or mechanical object becomes a robot is open to debate. Movement seems a basic requirement to be a robot, as do sensors and some form of intelligence.

Figure 1-1 shows a typical homemade robot. This robot is capable of finding opposition robots (or any objects) on a table and knocking them off. It does so without any human control. Would most people identify this as a robot?

9781484213605_Fig01-01.jpg

Figure 1-1. Multiple views of the battered champion sumo robot, Bugdozer

People are more likely to identify an object as a robot when it has the rudimentary sections of a living being. People look for eyes and a mouth (generally a face), legs, and a torso, as though they were examining an insect or exotic animal.

From an anatomical perspective, robot parts generally fit into one or more of the following categories:

  • Brains
  • Electrical Power
  • Sensors
  • Action and Feedback
  • Body/Aesthetics

As a robot doctor, you’ll become familiar with robot guts. The next sections of this chapter describe some common things you’ll find under a robot’s hood.

Brains

Robots can be built without a brain, such as those robots operated by a human via remote control or a joystick. Robots can also be built with distributed brains, where simpler chips handle individual parts (such as a leg or an arm) without knowing anything about what the rest of the body is doing. Or, robots can even be built with the brains located away from the body, such as on a laptop computer or smart phone.

But, all in all, the top choice for robot brains is the microcontroller chip (see Figure 1-2). Microcontrollers are very similar to microprocessors, which are found in personal computers. A microcontroller differs in that it is almost like an entire tiny computer merged into a single piece.

9781484213605_Fig01-02.jpg

Figure 1-2. An Atmel ATmega644 microcontroller

Microcontrollers have small amounts of memory and storage space built directly into the chip. Where the PC microprocessor dedicates its pins to high-speed memory, a microcontroller has a diverse variety of input and output pins. These pins can connect directly to sensors, buttons, and other odd devices.

Unsung heroes, microcontrollers surround us, yet few people know about them. Microcontrollers are in automobiles, household washers, dryers, DVRs, and other appliances. The multi-billion-dollar market for microcontrollers makes them inexpensive and plentiful.

That’s right, one day your robots are going to have the brains of a dishwasher! Put some wheels on a Maytag® and you’ve got a great robot.

To make things easy, the robot built in this book uses a simple comparator chip instead of a microcontroller. The follow-up book, Intermediate Robot Building by David Cook (Apress, 2010), includes a robot with a microcontroller brain.

Electrical Power

Although robots can be built with gasoline-powered engines and pneumatic actuators, at some level almost every robot contains electronic components. The electrical power supply consists of a raw power source, a regulating circuit to stabilize and process the source, and a switch to activate and deactivate.

Power Source

Except in extreme circumstances, hobby robots are supplied power from popular consumer batteries (see Figure 1-3). Consumer batteries are safe, inexpensive, readily available, reliable, and standardized. The main robot presented in this book uses a 9 V battery for those reasons.

9781484213605_Fig01-03.jpg

Figure 1-3. Common battery sizes

Rechargeable batteries are preferable. Although their initial cost is higher, they’ll save the experimenter a lot of money in the long run.

Solar power is also an option. Because light isn’t constantly available, rudimentary solar-powered robots operate in repeating charge and discharge cycles, powering off between bursts of activity. More sophisticated solar-powered robots recharge batteries during optimal lighting conditions, with the batteries maintaining power to the brains during dark conditions.

Power Regulation

Most robots have a small portion of their bodies dedicated to keeping a steady, specific level of power available to all of the electronics. This is called power regulation (see Figure 1-4).

9781484213605_Fig01-04.jpg

Figure 1-4. Power regulating circuit based on a Microchip MCP1826S, which is a modern equivilant to the classic 7805

As batteries are used up, they provide less and less power. Unless stabilized, this would result in a robot that moves at different speeds and has different light brightness and sensor readings based on battery freshness.

Another reason for power regulation is that some parts of the robot need more power than other parts. For example, motors require more power than logic chips or blinking lights. The power regulation module steps down (or, conversely, boosts) the battery power to the range needed by each major part. To reduce the complexity of the robot presented in this book, all of its parts can operate at the varying voltages of the battery. As such, no voltage regulator is necessary.

The aforementioned follow-up to this book, Intermediate Robot Building, compares several voltage regulating technologies, and provides recommendations for complete power supplies.

On/Off Switch

Most robots have power switches (see Figure 1-5). This allows the robot to be disabled for maintenance or storage.

9781484213605_Fig01-05.jpg

Figure 1-5. A heavy-duty power switch

Interestingly, solar-powered robots usually don’t have a power switch. Those robots wake up in the morning sunshine and dance all day.

Sensors

There are more sensors in a single crease of your brow than there are in any robot ever built. With the exception of the pixel elements of a vision module, most homemade robots end up with fewer than a dozen sensors of four or five major types.

A complicated homemade robot might have infrared object detection, touch switches, brightness sensors (see Figure 1-6), a battery tester, tilt switches, and perhaps a temperature probe. Even with so few inputs, the robot can do really interesting things.

9781484213605_Fig01-06.jpg

Figure 1-6. Cadmium-sulfide sensor for light detection

Pushbuttons

Switches and pushbuttons (see Figure 1-7) are a subset of sensors. They “sense” a push.

9781484213605_Fig01-07.jpg

Figure 1-7. (left) A tiny pushbutton mounted to a circuit board etched in my basement. (right) A selection of pushbuttons in various shapes, sizes, colors, and firmness

On most robots, a couple of pushbuttons are usually dedicated for human input. Buttons can trigger a change in modes or the beginning of an experimental sequence. Alternatively, crafty engineers can discard dedicated buttons and instead wave a hand in front of various sensors to indicate a desired action.

Action and Feedback

Robots perform actions coordinated with the processing of sensor information. Most often the action is in the form of movement. However, sounds, displays, indicator lights, and other forms of feedback are also actions, which are usually intended to provoke humans to act.

Movement

Most homemade robots move around with only a pair of wheels (see Figure 1-8). Unlike an automobile’s four wheels and one motor, a robot’s two wheels and two motors provide agile turning and sufficient force without the additional weight of elaborate drive trains.

9781484213605_Fig01-08.jpg

Figure 1-8. Pair of tiny pager motors attached to wheels via belts

Mechanical legs are a blast to see in action, but are more complicated to actually build. There are some simple wire-feet and six-legged variations that are easier to implement, although with less dexterity.

Motor Controller

Like the power regulator, a motor controller section (see Figure 1-9) is required on most robots. The sudden starting and stopping (and stalling) of motors involves bursts of power; much more power than the brains can supply by itself. So, a portion of the robot is dedicated to managing the enabling of the motors and is responsible for protecting the rest of the electronics from backlashes and surges.

9781484213605_Fig01-09.jpg

Figure 1-9. Motor control circuit with MOSFET chips and Schottky diodes

Indicator Lights

Lots of tiny lights adorn most robots. LEDs (light-emitting diodes) indicate power status, motors engaging, sensor detection (see Figure 1-10), and decision-making. This display of the robot’s state makes error correction and design improvements a lot easier. Of course, the lights also make a robot look more fascinating.

9781484213605_Fig01-10.jpg

Figure 1-10. A row of LEDs for target detection

LEDs are simple to use. They’re inexpensive, lightweight, cool to the touch, and are being produced in an increasing variety of colors.

Miscellaneous Components

You’d be amazed at how quickly the connections to the brains can get used up. A few support chips are commonly used to gather connections together before reaching a microcontroller. Support chips can also preprocess signals (such as from sensors and buttons) to decrease the workload of the brains.

A lot of other stuff is needed, too! Wires, connectors, capacitors, resistors, diodes, and other components (see Figure 1-11) play important roles in bringing circuits together.

9781484213605_Fig01-11.jpg

Figure 1-11. Wires, connectors, capacitors, diodes, and resistors—oh my!

Body

Unless you’re building a jellyfish or paper-bag robot, all of the parts must be attached to a primary frame. Surprisingly, many designers fail to pay enough attention to the robot’s body. They end up with a mess that either collapses under its own weight or limps around in an awkward way.

Not only does a good body hold the pieces together, but it also protects them against injury. An unfortunate number of homemade robots turn out to be too delicate, with wires hanging out and circuit boards exposed.

Aesthetics

The other important aspect of a body is visual appeal (see Figure 1-12). No matter how technically amazing your robot, the finishing touches in appearance greatly affect how onlookers perceive the robot. Never underestimate showmanship.

9781484213605_Fig01-12.jpg

Figure 1-12. Line-following robot made from a candy container

Building Up

Because robots are complete entities, a lot of work must be invested before the creature begins functioning. There are a few techniques that you may find useful to extend your patience and increase your enjoyment.

Taking Small Bites

Even a small robot is a large project. It is easy to become overwhelmed.

After coming home from work or school, or when the weekend comes around, focus on a small piece that interests you. Perhaps get a motor to spin backwards and forwards. Perhaps attach a wheel to that motor. Simply pick out and buy a few parts from a catalog.

At the end of day, hold up the piece that you worked on and spend some time admiring it. If it didn’t turn out so well, think about all the things you learned.

Recognize your steady accomplishments and reward yourself for gradual progress. Don’t be a visionary, be a builder.

Making Modules

Avoid the temptation to build an entire robot in one sitting or one piece. Instead, build individual modules (see Figure 1-13) that become a robot when connected together. That way, if a module turns out well, you can use the module’s design over and over again for subsequent robots. If a module turns out to be ineffective or becomes damaged, only that portion needs to be replaced.

9781484213605_Fig01-13.jpg

Figure 1-13. A reusable keyboard interface module

Because the time investment in a single module is small and manageable, it’s easier to finish something substantial. Some people claim they built their robot in a weekend. Well, not really. They aren’t counting the time spent purchasing, learning, designing, altering, or creating the subunits.

Keeping It Fun and Keeping It Light

If you find yourself frustrated and about to stomp on a stubborn contraption, simply set it aside. This is a hobby, right?

Draw a cartoon bubble saying “I’m too wily for you, human!” and tape it to the robot. Prove your greater intelligence by challenging the inert blob to a game of chess.

On the other hand, let’s say the robot is finished and working well. Before the grand unveiling, take a careful look to see if anything is missing. Any empty spots? Maybe it needs a smiley face and googly eyes (see Figure 1-14). Stickers, paint, flags, and blinking lights are also attractive finishing touches.

9781484213605_Fig01-14.jpg

Figure 1-14. A face to reckon with

Be sure to name your robot something clever or thought provoking. Avoid numbers, movie monikers, and clown names (“M1734,” “R2-D2®,” “Fuzooo”). Instead, how about “Graham Cracker,” “Conqueror,” or “Neighborhood Menace”?

At the premiere ceremony, consider playing some music. Are celebratory beers in order? Mood lighting?

Finding Camaraderie and Support

The World Wide Web has ushered in a new era of information sharing.Datasheets that describe a component in complete detail can be obtained instantly from the web sites of manufacturers and resellers. A quick search results in a plethora of robot-related material. Posted pictures and movies can be very informative and inspiring.

Local robot clubs and hacker spaces are even better resources. For the social aspect, you get to meet new friends, both humans and robots. More importantly, informal discussions often provide insight or help with problem solving. Many clubs hold monthly or annual contests. If you have a competitive personality, these opportunities can be highly motivational. Although prize values are still relatively low, you might receive cool items you might not have purchased for yourself.

The physical locations of clubs can be found on the Web. Keyword searches work well. Most of the larger associations provide lists of links to other clubs. So, finding one organization, even if it’s out of your area, can possibly lead to a club in your area.

If you can’t find a local club, consider forming one. It’s easy to do—just have people meet at a public library, museum, or community center.

Involve your family in your hobby. Not only will they be more genuinely appreciative of your accomplishments, but their presence can also make the whole experience more deeply enjoyable. When I went to my first robot contest in Illinois, I was struck by the family-friendly atmosphere. There were children of all ages, husbands and wives, grandfathers, grandmothers, and friends.

Onward and Upward

The next few chapters cover some important basics such as catalogs, safety, obtaining a multimeter, and numbering.

The heart of this book is dedicated to each component, tool, and step of building a line-following robot. It begins with a description of line-following track requirements and an inspection of the completely assembled line-following robot. Then, each chapter revolves around a piece or stage of designing and building the robot. You’ll be instructed on the exact purpose and alternatives to each component.

If you complete each experiment, you’ll have built your own copy of the line-following robot by the end of the book. You hold in your hand the complete blueprints and set of instructions to actually build the robot from scratch, without any prior knowledge of electronics, mechanics, or programming.

I chose a line-following robot as the primary subject for this book due to the overwhelming number of requests I’ve received from beginners on that topic. By focusing on a single design, the book covers every related detail and subject in depth. There are a number of robot books that provide an enormous range of robot projects, but without the details necessary for a beginner to actually build any of them.

The line-following robot won’t be zooming around the track until the final chapters. However, there are modularized circuits and milestones to provide you with accomplishments along the way. Even if you choose not to build the line-following robot, it’s actually a perfect base model that you can rearrange to build a robot with a completely different purpose.

The final chapters include ideas and suggestions for where to proceed from here in the wonderful world of robotics.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.21.175