Androids: Build Your Own Lifelike Robots
By Bryan Bergeron and Thomas B. Talbot
()
About this ebook
Construct self-governing 'droids that display physiologically correct behaviors. Co-written by experts in the fields of robotics, artificial intelligence, and medicine, Androids: Build Your Own Lifelike Robots features low-cost DIY projects that translate human physiology into cybernetics. Teach your creations to maneuver with an arsenal of behaviors, respond to stimuli, talk, and listen. This practical, inventive guide even shows how to realistically simulate emotion and aging in your robots.
- Understand cybernetic and robotics principles
- Work with programmable microcontrollers
- Choose and wire sensors, actuators, and servos
- Program dazzling reflex arcs and behavior loops
- Enable your automatons to speak and hear
- Build beating hearts and limbs with flowing veins
- Create breathing patterns that respond to triggers
- Mimic humanoid feelings and facial expressions
- Use prototyping kits and testing devices
Read more from Bryan Bergeron
Teardowns: Learn How Electronics Work by Taking Them Apart Rating: 0 out of 5 stars0 ratingsBiotech Industry: A Global, Economic, and Financing Overview Rating: 4 out of 5 stars4/5The Eternal E-Customer: How Emotionally Intelligent Interfaces Can Create Long-Lasting Customer Relationship Rating: 0 out of 5 stars0 ratingsBusiness Expectations: Are You Using Technology to its Fullest? Rating: 0 out of 5 stars0 ratings
Related to Androids
Related ebooks
30 BeagleBone Black Projects for the Evil Genius Rating: 0 out of 5 stars0 ratings51 High-Tech Practical Jokes for the Evil Genius Rating: 0 out of 5 stars0 ratings101 Spy Gadgets for the Evil Genius 2/E Rating: 4 out of 5 stars4/5Build Your Own Quadcopter: Power Up Your Designs with the Parallax Elev-8 Rating: 0 out of 5 stars0 ratingsProgramming the Intel Edison: Getting Started with Processing and Python Rating: 1 out of 5 stars1/5Mind Performance Projects for the Evil Genius: 19 Brain-Bending Bio Hacks Rating: 0 out of 5 stars0 ratingsElectronic Circuits for the Evil Genius 2/E Rating: 0 out of 5 stars0 ratingsCreate, Share, and Save Money Using Open-Source Projects Rating: 0 out of 5 stars0 ratingsProgramming and Customizing the Multicore Propeller Microcontroller: The Official Guide Rating: 4 out of 5 stars4/5Intel Galileo Essentials Rating: 0 out of 5 stars0 ratingsRaspberry Pi For Dummies Rating: 0 out of 5 stars0 ratingsBuild Your Own Printed Circuit Board Rating: 2 out of 5 stars2/5Autodesk Fusion 360 PCB Black Book (V 2.0.18719) Rating: 0 out of 5 stars0 ratingsArduino meets MATLAB: Interfacing, Programs and Simulink Rating: 0 out of 5 stars0 ratingsMicrosoft .NET Gadgeteer: Electronics Projects for Hobbyists and Inventors Rating: 0 out of 5 stars0 ratingsCookbook for Mobile Robotic Platform Control: With Internet of Things And Ti Launch Pad Rating: 0 out of 5 stars0 ratingsSmart Home Automation with Linux and Raspberry Pi Rating: 3 out of 5 stars3/5Mastering the Raspberry Pi Rating: 3 out of 5 stars3/5Beginning Backbone.js Rating: 3 out of 5 stars3/5Get Started With Arduino: Robots, Musical Instruments, Smart Displays and More Rating: 0 out of 5 stars0 ratings50 Green Projects for the Evil Genius Rating: 0 out of 5 stars0 ratingsCNET Do-It-Yourself Home Networking Projects Rating: 0 out of 5 stars0 ratingsThe Coming Robot Revolution: Expectations and Fears About Emerging Intelligent, Humanlike Machines Rating: 0 out of 5 stars0 ratingsRaspberry Pi Projects For Dummies Rating: 5 out of 5 stars5/5Rust for the IoT: Building Internet of Things Apps with Rust and Raspberry Pi Rating: 0 out of 5 stars0 ratingsRetro Gaming with Raspberry Pi: Nearly 200 Pages of Video Game Projects Rating: 0 out of 5 stars0 ratingsVisual Studio Condensed: For Visual Studio 2013 Express, Professional, Premium and Ultimate Editions Rating: 0 out of 5 stars0 ratingsFlash Development for Android Cookbook Rating: 3 out of 5 stars3/5Build Your Own Car Dashboard with a Raspberry Pi: Practical Projects to Build Your Own Smart Car Rating: 0 out of 5 stars0 ratingsAndroid NDK Game Development Cookbook Rating: 0 out of 5 stars0 ratings
Technology & Engineering For You
The Art of War Rating: 4 out of 5 stars4/5A Night to Remember: The Sinking of the Titanic Rating: 4 out of 5 stars4/5The Art of War Rating: 4 out of 5 stars4/5Vanderbilt: The Rise and Fall of an American Dynasty Rating: 4 out of 5 stars4/5The Big Book of Hacks: 264 Amazing DIY Tech Projects Rating: 4 out of 5 stars4/580/20 Principle: The Secret to Working Less and Making More Rating: 5 out of 5 stars5/5Longitude: The True Story of a Lone Genius Who Solved the Greatest Scientific Problem of His Time Rating: 4 out of 5 stars4/5The 48 Laws of Power in Practice: The 3 Most Powerful Laws & The 4 Indispensable Power Principles Rating: 5 out of 5 stars5/5The Invisible Rainbow: A History of Electricity and Life Rating: 5 out of 5 stars5/5The Systems Thinker: Essential Thinking Skills For Solving Problems, Managing Chaos, Rating: 4 out of 5 stars4/5A History of the American People Rating: 4 out of 5 stars4/5The Homeowner's DIY Guide to Electrical Wiring Rating: 5 out of 5 stars5/5Logic Pro X For Dummies Rating: 0 out of 5 stars0 ratingsUltralearning: Master Hard Skills, Outsmart the Competition, and Accelerate Your Career Rating: 4 out of 5 stars4/5The Fast Track to Your Technician Class Ham Radio License: For Exams July 1, 2022 - June 30, 2026 Rating: 5 out of 5 stars5/5The Big Book of Maker Skills: Tools & Techniques for Building Great Tech Projects Rating: 4 out of 5 stars4/5Nuclear War: A Scenario Rating: 4 out of 5 stars4/5The Wuhan Cover-Up: And the Terrifying Bioweapons Arms Race Rating: 4 out of 5 stars4/5Ghost Rider: Travels on the Healing Road Rating: 4 out of 5 stars4/5Mother of God: An Extraordinary Journey into the Uncharted Tributaries of the Western Amazon Rating: 4 out of 5 stars4/5Summary of Nicolas Cole's The Art and Business of Online Writing Rating: 4 out of 5 stars4/5Lab 257: The Disturbing Story of the Government's Secret Germ Laboratory Rating: 3 out of 5 stars3/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 3 out of 5 stars3/5Selfie: How We Became So Self-Obsessed and What It's Doing to Us Rating: 4 out of 5 stars4/5Artificial Intelligence: A Guide for Thinking Humans Rating: 4 out of 5 stars4/5Broken Money: Why Our Financial System is Failing Us and How We Can Make it Better Rating: 5 out of 5 stars5/5Death in Mud Lick: A Coal Country Fight against the Drug Companies That Delivered the Opioid Epidemic Rating: 4 out of 5 stars4/5
Related categories
Reviews for Androids
0 ratings0 reviews
Book preview
Androids - Bryan Bergeron
Index
Introduction
Androids: Build Your Own Lifelike Robots takes a unique, fun approach to learning about embedded systems, robotics, and electronics by using the human body as the focus of discussion. Sure, robotic crawlers and carpet roamers are cool platforms for experimentation, but most are cold, lifeless creations that are hard for people to relate to. Humans, in contrast, have complex reflexes, from hearts that beat at different rates based on stress to pupils that adjust to ambient light levels. If you want to take the first step in making your robots closer to humans, then this book is for you.
The inspiration for this book stems in part from the vision of great science fiction writers and in part from our experience developing human cybernetic systems for saving real human lives. If you’ve seen Blade Runner, Battlestar Galactica, Alien, Terminator, Prometheus, or Doctor Who, then you know that the pinnacle of robotics isn’t simply a thinking tin can, regardless of intelligence. The androids featured in these and other sci-fi classics not only pass the Turing test, but they are also physiologically correct—they breathe, bleed, and sweat as we do. As a result, short of surgical exploration, these machines are indistinguishable from humans.
The second, more immediate and practical inspiration from this book reflects the need for lifelike human surrogates to train healthcare professionals on how to save lives and treat real patients. Our experience with available surrogates has taught us that we’re simply not there yet. Most of these systems are little more than storefront mannequins with a few sensors. What’s needed is a cohort of eager, enthusiastic engineers, experimentalists, and inventors to create the next generation of human surrogates. We hope that this book represents the first step in that journey for you. Even if your ultimate goal is to create an android companion worthy of Blade Runner, in the meantime, you’ll need a challenging day job to pay the bills. Designing human cybernetic systems that can help to save lives is a great place to start.
In developing this book, we’ve made a few assumptions about you, the reader. We assume that you:
• Have read at least a couple introductory books on electronics.
• Have programmed one of the popular microcontrollers, especially the Arduino.
• Have some experience in basic robotics construction, either from a kit or from following a Web/magazine article.
• Are aware of—and practice—basic electrical safety precautions.
• Have and use eye protection. (If you happen to launch a piece of wire into your eye with diagonal cutters, your vision could be permanently degraded—at least until bionic implants are available.)
• Have a natural and insatiable inquisitiveness.
Goals
We have done our best to ensure that after reading this book, you will
• Have a better understanding of cybernetics as applied to human systems. Each chapter should give you mental anchor points for understanding the physiologic mechanisms behind each project.
• Better understand how to apply microcontrollers, sensors, and actuators in the modeling and simulation of human systems.
• Be able to apply embedded systems to human cybernetic systems not covered in this book. The human body is a complex machine—with thousands of interconnected systems.
• Better understand the practical considerations that go into designing and constructing a cybernetic system. It’s possible to spend thousands of dollars on silicone props that are nearly indistinguishable from the real thing, but what really matters at this point in your journey is that you understand the underlying principles. We’re not building a Number 6 Cylon from Battlestar Galactica here—that’s the focus of a follow-up book.
Organization
Androids: Build Your Own Lifelike Robots is organized by system and arranged in order of increasing project complexity. Feel free to skip ahead to a project of interest, but consider at least skimming the preceding chapters. In some cases an earlier project will be repurposed to support a more advanced project.
Each chapter is organized along the following outline:
• Biological basis The biological underpinnings for the system(s) discussed in the chapter.
• Relevance to androids How the biology translates to androids.
• Experiments Hands-on experiments with circuits, Arduinos, source code, and sensors.
• Modifications How to get more out of the basic experiments.
• Gremlins Common problems and issues.
• Search terms Search terms for readers wanting to learn more.
Chapter 1: Reflex Arc
In Chapter 1, we’ll explore the basics of reflexes with the help of a pair of servos, a few sensors, and an Arduino microcontroller. After implementing a series of circuits patterned after the basic biological unit of the reflex, the reflex arc, you’ll have an arsenal of reflex templates that you can expand and apply to your android designs.
Chapter 2: Behavior Chains
Building on the basic reflex arc, Chapter 2 explores behavior chains and how they can be used to create cybernetic personalities. Using a 5-degree-of-freedom (DOF) robotic arm, heat and light sensors, and a few light-emitting diodes (LEDs), we’ll illustrate how to create a robot with autonomous, predictable behavior.
Chapter 3: Homeostasis
In Chapter 3, we explore thermal homeostasis and basic control theory using an Arduino, temperature sensors, and heat sources. We’ll leverage the proportional, integral, derivative (PID) library for the Arduino so that we can focus on the application of control theory as opposed to low-level implementation.
Chapter 4: Light and Vision
In Chapter 4, we explore light sensors that can give your android some degree of vision. We also create a pair of eyes that with variable pupils and gaze follows a light source. This will give your android the appearance of a living face for human interaction.
Chapter 5: All Ears
In Chapter 5, we explore sound localization and mimic the normal eye and head movements associated with sound tracking. We’ll work with directional and omnidirectional microphone sensors, silicone rubber ears,
a pair of passive infrared (PIR) sensors, a servo-controlled turret, an Arduino, and a high-performance ChipKit Arduino clone.
Chapter 6: A Heartbeat Away
In Chapter 6, we’ll explore the acoustic and tactile feedback we expect from a living human—heart and breath sounds. We’ll use an MP3 shield, an Arduino, a few Hall effect sensors, and a surface transducer to create realistic heat and breathing sounds. We’ll also explore how to make those sounds respond to behavior triggers in the internal and external environments.
Chapter 7: If It Bleeds, Can We Kill It?
In Chapter 7, you’ll learn how to give your android a circulatory system with a lifelike pulse. We’ll work with a fluid pump, pressure sensors, and a pulse-monitor shield for the Arduino to create pulsing pressure waves to provide appendages with lifelike pulses that respond to external and internal conditions. This chapter leverages the system developed in Chapter 3.
Chapter 8: Simply a Matter of Time
Ever notice how every otherwise perfect android is ultimately discovered because the creator neglected to simulate aging? Well, we’ll address that common fault in this chapter by exploring how biological systems age and, more important, how to mimic the appropriate behaviors in cybernetic systems. We’ll build on the systems developed in Chapters 2 and 6.
Chapter 9: Affect and Expression
In Chapter 9, we explore several affordable approaches to making an expressive android that is a joy to work with. We leverage an EMIC-2 text-to-speech module, a pair of 8 × 8 bicolor LED matrices, and a handful of multicolored LEDs to create an expressive android head that talks.
Resources
The resources section provides a list of resources for sensors, actuators, and Arduino-compatible hardware, as well as technical reference sites.
Downloadable Code
See www.mhprofessional.com/ Androids for fully documented code.
A Word about Hardware
We’ve made a conscious effort to keep the projects simple and affordable. And although most of these projects assume an Arduino Uno or equivalent, feel free to work with an Arduino Leonardo, Mega, or 80-MHz ChipKit Uno32, depending on what you have on hand. Similarly, although we may list a particular brand of shield, sensor, or output device, don’t feel compelled to buy the same if you have something equivalent in your inventory. For example, although we use a standard Lynxmotion robot arm in Chapter 2, you can get by with a servo and do-it-yourself (DIY) gripper.
The same goes for prototyping kits. If you’re teaching a class and build time is critical, then you really should consider the various prototyping kits and devices available. We’ve featured the Grove platform in a few of the projects, but several equivalent or superior products are available.
Finally, we haven’t received any support from a vendor in putting together these projects and have no financial interest in the suppliers or manufacturers mentioned. We purchased the products featured in this book at regular retail prices. The only exception is the android body featured in Chapter 9, which is borrowed courtesy of the U.S. Army’s Telemedicine and Advanced Technology Research Center (TATRC).
CHAPTER 1
Reflex Arc
You have the time and ability to focus on this page in part because you have reflexes—semiautonomous movements that you’re not consciously directing. And because most of your reflexes rely on neurons in your body and spinal chord, more of the neurons in your brain can be devoted to tasks such as reading as well as contemplating the answers to life, the universe, and everything. Androids and semiautonomous vehicles can and do benefit from reflexes as well to free up precious computational resources for higher tasks such as simultaneous localization and mapping (SLAM).
In this chapter we’ll explore the basics of reflexes with the help of a pair of servos, a few sensors, and an Arduino microcontroller. After implementing a series of circuits patterned after the basic biological unit of the reflex, the reflex arc, you’ll have an arsenal of reflex templates that you can expand and apply to your android designs.
Biological Basis
It can be difficult to appreciate the arsenal of reflexes you have at your disposal to respond to internal and environmental events because many reflexes aren’t activated until something goes awry. To illustrate, consider the following scenario.
Monkey Business
Imagine that you’re hiking among the eucalyptus trees in the Presidio in San Francisco, and suddenly, without warning, a 75-pound genetically enhanced monkey jumps on your back. If you’re in decent physical shape, you may manage to stay upright, grab the beast by the neck, and throw it to the ground before it pokes you in the eyes and gnaws off your ears. If, on the other hand, you buckle at the knees and find yourself on your back, blind, and having a hard time breathing because something has jumped on your chest, then things may not work out so well for you in the end.
Let’s assume the former case and examine what happens in your body in the first few milliseconds of the attack—before you’re even consciously aware that your legs and back are supporting an additional 75 pounds. As a result of the jolt, thousands of sensors throughout your body fire—in your joints, in the soles of your feet, in your muscles and tendons, and in your organs—resulting in thousands of reflexes. Some of these reflexes direct your leg muscles to absorb and dissipate the impact of the beast, enabling you to use your arms and upper body to fend off the monkey instead of having to consciously maintain balance.
The Reflex Arc
To better understand what’s happening in your body, we can model your reflexes at different levels and with different levels of granularity from minute changes in the folding of proteins in your muscles to gross changes in your behavior. For now, let’s consider how events unfold at the level of your nerves, muscles, and sensors. Specifically, let’s focus on a single muscle spindle sensor—a stretch sensor—embedded in one of your quadriceps muscles (or quads) in your right thigh. This muscle spindle sensor fires when your quad muscle is stretched, and the rate of firing increases with the velocity of stretch.
When the monkey lands on your back, your quad is suddenly and significantly stretched, causing the stretch receptor to fire rapidly, sending a stream of electrochemical pulses down a nerve fiber to your spinal chord. There the signal propagates across a gap to a second nerve fiber that connects, via yet another synapse, to muscle fibers in your quad. As a result, your quad contracts, counteracting the weight of the monkey. This same stretch reflex occurs with dozens of spindle fibers and thousands of muscle fibers in each of your quads and in other muscles throughout your body.
This arc or pathway from a sensor embedded in the muscle to the spinal chord, across a gap, and back to muscle fibers is referred to as a reflex arc. The components of a stretch reflex, an example of a simple reflex arc, are shown schematically in Figure 1-1. Note the reflex arc is a one-way connection from sensor to sensory fiber, across a space or synapse, to a motor fiber, across a neuromuscular junction, and terminating in a group of muscle fibers. The signal from the muscle spindle sensor changes with the contraction of the muscle, thereby providing a feedback loop for the stretch reflex.
FIGURE 1-1 Components of the stretch reflex, an example of a simple reflex arc.
Of course, this scenario is a simplified account of the complex cascade of events that occur within your body during the hypothetical attack. In addition to contracting your quads, there is a reflex relaxation of the muscles that oppose your quads—the hamstrings, the muscles on the backside of your thighs—so that your quads don’t have to work against your hamstrings to keep your leg extended. There is also a reflex, based on the stress on the tendons, that inhibits your quads from contracting so rapidly and violently that they rip the tendons anchoring your muscles to your skeleton. The bottom line is that, thanks to thousands of reflex arcs throughout your body, you’re able to die another day.
Sensors and their related reflex arcs have a threshold. Like digital electronic systems, once a sensor fires, it fires at full amplitude, with a pulse rate that reflects the degree of activation. For example, if you’re attacked by a 6-ounce flying squirrel instead of a 75-pound monkey, then fewer spindle fiber sensors will be activated, and those that are activated fire at a lower pulse rate. As a result, fewer muscle fibers in your quads are activated less frequently, resulting in a less forceful contraction overall.
Another property of reflexes is that they have an absolute refractory period, or period of time after firing during which they can’t be retriggered (Figure 1-2). Think of the absolute refractory period as the finite time required to reset the sensor.
FIGURE 1-2 Absolute and relative reflex refractory periods.
Reflexes also exhibit a relative refractory period, the period following the absolute refractory period during which the sensor is relatively insensitive to triggering. As shown in Figure 1-2, insensitivity falls off exponentially after the absolute refractory period.
Pain and Suffering
Consider a second scenario in which you’re at a workbench assembling a prototype leg for an android. As you reach for a linear actuator, you accidentally brush the back of your hand against the hot tip of a soldering iron. In response to the sudden, localized rise in skin temperature, thermal pain receptors (nociceptors) send streams of pulses along fibers to your spinal chord. Within milliseconds, signals travel through a reflex arc that includes a synapse in your spinal cord and a motor fiber to muscle fibers in your arm and hand. As a result, your hand recoils from the soldering iron tip. If your reflexes are fast enough, you might end up with only a minor skin irritation and continue on with your work, not giving the incident a thought. On the other hand, if you had to rely on the smell of roasting skin to alert you to consciously move your hand, you’d have a serious burn, a possible infection, and a nasty scar.
The point of this scenario is that in addition to enabling you to maintain conscious focus on the task at hand, an advantage of a reflex action over deliberate action is speed. Conscious control, which may involve signals traversing hundreds or thousands of connections, or neural synapses, in your brain, is simply slower than a reflex arc involving a pair of local neurons. If you had to consciously blink every time a bug or dirt touched your eyelashes, you’d probably be blind by now.
Consider the stylized schematic of the reflex arc shown in Figure 1-3, in which there is a thermal pain receptor in the skin of your forearm, an inbound fiber from the sensor to your spinal cord, and a connection within your spinal cord to a pair of outbound motor fibers that terminate in muscle fibers in your arm and hand. There is also a third neural fiber from the brain that, when active, inhibits the reflex arc. Although this conscious inhibition doesn’t have a place in the soldering-iron scenario—unless you have some serious psychological issues—it would hopefully prevent you from, say, involuntarily releasing a too-hot cup of cocoa onto your lap.
FIGURE 1-3 Schematic of a complex reflex arc with multiple synapses and an inhibitory connection from the brain.
Pain is an indicator that something is wrong and often that you need to take some action—or stop an action—to avoid injury. Some pain receptors respond as a function of stimulus intensity, whereas others switch from off to on as soon as some threshold is reached.
Triggers of pain receptors linked to reflex arcs include extremes of temperature, pressure, sound, and light. Because of the inhibitory connections from your brain, you may be able to override many of these reflex responses to pain—finishing a marathon with a sprint even though your muscles are aching, for example. You’ll probably find some reflexes stubbornly resistant to conscious control—such as inhibiting your blink reflex in response to a sudden puff of air or flash of light.
Chemical Supercharger
Your nervous system is an electrochemical signal processor mediated by hundreds of different chemicals. When it comes to reflexes, one chemical worth exploring is adrenaline (epinephrine), which is pumped into your bloodstream by your adrenal glands when you’re under stress. The action of adrenaline is complex and affects different tissues differently. However, one overall effect is to temporarily increase your muscular strength and endurance.
Adding to our stylized schematic of the reflex arc with multiple synapses and an inhibitory connection from your brain, we can model the overall effect of adrenaline as shown in Figure 1-4. Unlike electrochemical signals that travel on fibers from your brain or sensors, adrenaline doesn’t generate a signal along a sensory or muscle fiber. What it does is effectively lower the threshold for sensor activation and maximize potential muscle contraction once the reflex arc is triggered. Using the metaphor of a vacuum tube or metal-oxide semiconductor field-effect transistor (MOSFET), adrenaline acts on the control grid or gate, changing the effective gain (or loss) of the system.
FIGURE 1-4 Schematic of a complex reflex arc with potentiating effects from adrenaline.
To explore the effect of adrenaline on the reflex arc, let’s return to the monkey-on-your-back scenario. Imagine that as soon as you throw the monkey to the ground, you sprint 100 yards to a place that you feel safe from the primate. As you look back on the site of the attack, you realize that you covered the distance in a personal-best time of 12 seconds. Not bad, considering you’re wearing hiking boots.
You were able to accomplish this feat because the adrenaline essentially supercharged your nervous system, with effects ranging from increasing your heart rate and pressure to upping the flow of blood and nutrients to your muscles. While temporarily useful, you wouldn’t want to be jacked up on adrenaline long term. Not only would you expend energy more rapidly than normal, but you’d be at risk for stroke and heart attack. The same holds true for redlining an android—machines don’t last long when they’re operated at the edge of their design limits.
Personality
Perhaps you’re saying to yourself, Wait a minute, I wouldn’t run from a monkey, genetically engineered or otherwise; I’d stand and fight to the death.
And perhaps you would. The preference for fight versus flight reflects your overall personality. The boost from adrenaline can help one person run for the hills and give you the strength to stand and fight.
The point is that reflexes are generally consistent with personality. For example, if you’re a trained