Chapter 5: Building Block of Robot
At a school science exhibition in Jodhpur, a small wheeled robot rolls slowly across a table. When it reaches the edge, it stops, turns, and rolls back. A crowd of students watches it do this again and again. Someone asks the boy standing next to it, “How does it know where the edge is?”
He turns the robot over. Underneath, there is no single magic part. There is a plastic base with two wheels and two small motors. There is a tiny board with a black chip on it, held down by four screws. There is a small sensor pointing downwards, with two wires running to the board. A battery holder is taped to one side. Everything is joined by coloured wires.
Nothing there is clever by itself. The sensor cannot move the wheels. The motors cannot see the edge. The board cannot do either. The robot works only because these parts are connected in the right order, and each one does one job.
That is what this chapter is about (see Fig. 5.0-1).
Diagram
Fig. 5.0-1 – a small wheeled school robot shown upside down on a table, with plain labels pointing to the base, two wheels with motors, a small circuit board, a downward-facing sensor, a battery holder and the connecting wires
By the end of this chapter, you will be able to answer each of these questions yourself.
5.1 A Robot as a System
Look at a cycle standing in the school yard. It has a frame, two wheels, a chain, pedals and brakes. Take away the chain and the pedals turn uselessly. Take away the brakes and you cannot stop safely. No single part is a cycle. The cycle is what you get when all the parts are joined in the right way.
A robot is like that too, only with more kinds of parts. It has metal or plastic bodywork, wires, motors, a battery, a small computer board and some sensing parts. On its own, each part is quite ordinary. A motor only spins. A battery only stores charge. Joined properly, they become a machine that can move around a room without bumping into the wall.
When parts are joined like this so that they work with one another, we call the whole thing a system.
Why we study a robot block by block
A robot may have hundreds of small parts. Nobody learns a robot screw by screw. Instead, we group parts that share the same job into a block, and then study what each block does and how the blocks pass work to one another. This is much easier, and it also matches how robots are actually built. An engineer designing a delivery robot does not begin by choosing a screw. She begins by deciding what the robot must sense, what it must decide, and how it must move.
There are three broad groups of parts in any robot, and the whole chapter is built around them.
The mechanical components are the parts you can hold — the body, the wheels, the arm, the joints. They give the robot its shape and let it move and push against the world.
The electronic components are the parts that carry and handle electrical signals — the sensing parts, the circuit board, the motor drivers, the battery and the wiring. They are what the robot senses and acts with.
The computational components are the parts that are not objects at all, but instructions — the program stored inside the board, and the steps it follows to work out what to do next. See Fig. 5.1-1.
Diagram
Fig. 5.1-1 – three labelled boxes side by side under the heading “A robot”, labelled Mechanical components, Electronic components and Computational components, with two or three example items listed inside each box (body and wheels; sensor, board and battery; the stored program), and a two-headed arrow between each pair of boxes to show they work together
One block cannot work alone
Because the blocks depend on one another, a robot fails as a whole. If the battery runs low, the motors turn weakly and the robot looks slow and clumsy, even though nothing is wrong with the motors or the program. If a sensing part comes loose, the program keeps running perfectly but takes decisions on wrong information.
This is an honest limitation of building anything as a system: a fault in one block often shows up as strange behaviour somewhere else. When a robot misbehaves, a good builder checks each block in turn instead of blaming the part that looks guilty.
5.2 The Block Diagram of a Robot
Suppose someone hands you a photograph of a robot. You can see its shape and its wheels, but you cannot see what happens inside it when it is switched on. Which part gets the information first? Which part acts last? A photograph cannot tell you.
So engineers draw the robot a second way. They draw one box for each block, write the block’s name inside it, and join the boxes with arrows to show which way information travels. A drawing like this is called a block diagram.
Filling a bucket, without thinking about it
Before reading the diagram, think about filling a bucket from a tap up to a mark near the rim. You know where you want the water to reach. You keep glancing at the actual level. Your eyes tell you how far the water still is from the mark, and that gap is what makes you keep the tap open. When the gap becomes zero, you close the tap.
Three things are going on there. You have a target. You measure what is really happening. You act on the difference between the two. A robot works in exactly the same way, and the block diagram is simply that idea drawn out.
Reading the diagram
The complete diagram is shown in Fig. 5.2-1. Follow it from left to right first, then follow the lower path back.
Diagram
Fig. 5.2-1 – block diagram of a robot drawn left to right: an arrow labelled “Given task” enters a box “Robot model”; its output goes to a small circle marked with a cross (the comparison point); from the circle an arrow labelled “Error signals” goes to “Controller”, then to “Actuators”, then to “Manipulator”, and out to the right as “Task done”. Below, an arrow from the manipulator’s output feeds back into a box “Sensors”, whose output goes to a box “Information processing unit”, whose output returns to the comparison circle
A task is given to the robot, such as “move the arm to this position”. The robot model is the robot’s own stored description of itself — how long its arm is, how its joints turn — and it uses this to work out what the given task means in terms the machine can use, such as how far each joint must turn.
That target then reaches the comparison point, drawn as a small circle with a cross. Here the target is compared with what the robot is actually doing at this moment. The difference between the two is the error signal.
The error signal goes to the controller, the block that decides what must be done to reduce that difference and sends out the electrical control signals.
Those signals reach the actuators, the blocks that convert electrical signals into movement, such as motors.
The actuators drive the manipulator, the mechanical arm or limb that actually touches the world and carries out the task.
Now follow the lower path. The sensors measure what is really happening — where the arm has reached, whether an object is in the way. Their readings go to the information processing unit, which cleans up the readings and works out the robot’s present state. That result is carried back to the comparison point, where it is compared with the target once more.
This return path is called feedback.
What the diagram does not show
A block diagram shows which way information flows. It does not show where the parts sit inside the robot, how big they are, or how they are wired. Two robots with the same block diagram can look completely different.
The diagram also hides time. Every trip round the loop takes a small amount of time — reading the sensors, working out the error, driving the motor. So correction is never instant, and a robot moving quickly will always overshoot a little before it settles.
5.3 The Working Blocks of a Robot
You have now seen the whole loop at a glance. The next step is to open up each box in Fig. 5.2-1 and ask what it really does, and what it is made of.
It helps to compare the blocks with parts of your own body, as long as you remember that the comparison is only a way of remembering. Your skin, eyes and ears take in information about the world; the robot’s sensors do that job. Your muscles pull your bones; the robot’s actuators do that job. Your arm and hand reach out and hold things; the robot’s manipulator does that job. Your brain does two rather different things — it makes sense of what your senses report, and it decides what to do about it — and in a robot these two jobs are drawn as two separate blocks, the information processing unit and the controller.
Five working blocks make up the loop, and the four sub-sections that follow take them one at a time, in the order in which a robot uses them: the controller, the actuators, the manipulator, the sensing devices and the information processing unit.
5.3.1 The Controller
A sensing part can report that there is a wall 10 cm ahead. A motor can spin when current is sent to it. But the sensing part cannot start the motor, and the motor has no idea that a wall exists. Something must sit between them, take in the reading, apply a rule, and send out the right electrical signal.
That something is the controller. It is often called the brain of the robot, though it is better to say plainly what it does: it holds the robot’s instructions and turns incoming readings into outgoing signals.
What the controller does
The same block handles several jobs, one after another, many times a second.
- It takes in sensory data from the robot’s sensors — a camera, a proximity sensor, a sensor that measures tilt — and reads them as numbers it can work with.
- It builds up a picture of the surroundings from those numbers: how far the nearest object is, whether the path ahead is clear, how warm the air is. This is called environmental perception.
- It chooses what to do next, by comparing those numbers against the rules written into its program.
- It plans the path and the motion — which way to turn, how fast to run each motor — and sends the matching control signals out to the actuators.
- It keeps checking the result through feedback, and adjusts the signals when the robot is not doing what was asked.
- It handles safety and faults: stopping the motors when an emergency stop button is pressed, or when a reading shows something has gone wrong.
- In robots that work near people, it also manages the interaction with the human operator — reading a button press, sending back a message on a screen.
In a robot meant to work without a person guiding it, all of this must happen without anyone stepping in. The controller is what makes that possible, because every rule it needs has already been written into it.
The board that holds the controller
In a school robot, the controller is a small board with a microcontroller on it — a single chip that contains a tiny processor, memory to store the program, memory to hold working data, and pins to connect to the outside world. One popular board of this kind is the Arduino Uno, shown in Fig. 5.3-1.
Diagram
Fig. 5.3-1 – photo of an Arduino Uno board seen from above, with the USB socket, the power socket, the rows of pin headers along both long edges, and the main rectangular microcontroller chip clearly visible
An honest limit
A controller can only handle situations someone has already thought about. If a robot’s program has a rule for a wall in front but no rule for a wall on the side, the robot will drive into the side wall without hesitating. It is not confused — there is simply nothing in its program for that case.
5.3.2 The Actuators
The controller’s output is only a signal — a small voltage on a pin. A voltage cannot lift a box or turn a wheel. Something must take that electrical signal and turn it into a push, a pull or a spin.
That is the job of the actuators. In a robot, they are the parts that do the actual physical work.
What actuators are used for
Actuators do four kinds of work in a robot.
They provide movement from place to place. Motors turn the wheels of a mobile robot, or drive the legs of a walking one, and also steer it.
They provide manipulation and grasping. In a robotic arm, actuators drive the joints, and a gripper at the end opens and closes to pick up, hold and release objects.
They set orientation and position. A camera that must tilt down to look at a table, or a sensor that must point in a chosen direction, is moved into place by a small actuator.
They also produce controlled, expressive movement in robots built to work near people — a nod of the head, a wave of the arm — so that a person can tell what the robot is about to do.
Common actuators in robots
The most common actuator by far is the electric motor. A direct current (DC) motor spins as long as current flows through it, and spins the other way when the connections are reversed. It is simple, cheap and easy to control, which is why school robots use it for wheels.
A plain DC motor has one weakness: it can spin, but it cannot be told to stop at a chosen angle. For that we use a servo motor, which is a DC motor packed together with gears and a built-in feedback part that keeps track of the shaft’s position. Tell a servo to go to a certain angle, and its own internal loop holds it there. Fig. 5.3-2 shows both types.
Diagram
Fig. 5.3-2 – photo showing a small geared DC motor with a rubber wheel fitted on its shaft, placed beside a hobby servo motor with a white plastic horn attached to its output shaft
Not every actuator is electric. A pneumatic actuator uses compressed air pushed into a cylinder to slide a piston in and out. Air-driven actuators are fast and give a strong push, so factory robots use them for gripping and lifting. A hydraulic actuator works the same way but uses pressurised oil instead of air. Oil does not squash, so hydraulic actuators give very large forces under close control, which is why they are found in heavy machines such as excavators and large industrial robots.
Working out how far a wheel takes the robot
Once you know which motor is turning a wheel, you can work out how far one turn of that wheel carries the robot. Every full turn moves the robot forward by the distance around the rim of the wheel:
\[d = \pi D\]
Here \(d\) is the distance covered in one full turn and \(D\) is the diameter of the wheel.
An honest limit
This calculation assumes the wheel grips the floor perfectly. On a dusty or polished floor the wheel slips, so it turns more than the robot actually moves. The robot has no way of knowing this from the motor alone — which is exactly why robots also carry sensors, as the next sections show.
5.3.3 The Manipulator
Wheels can carry a robot across a room. They cannot pick up a bottle from a table. For that, a robot needs something that reaches out from its body — something that can be extended, bent, turned and closed around an object.
Your own arm does this. Your shoulder swings, your elbow bends, your wrist turns, and your fingers close. The rigid parts in between — upper arm, forearm, hand — do not bend themselves; all the movement happens at the joints. A robot’s arm is built on exactly the same plan.
How a manipulator is put together
A manipulator is a chain. Each rigid part is a link, and each place where two links meet and move is a joint. Fixed at the far end of the chain is the tool that actually touches the object, called the end-effector. Fig. 5.3-3 shows a common industrial arm with its parts named.
Diagram
Fig. 5.3-3 – side view of an industrial robotic arm standing on a base, labelled from the bottom upwards: base joint, shoulder joint, lower link, elbow joint, upper link, wrist joints, and end-effector at the tip
The joints are what give the arm its freedom. A joint near the base swings the whole arm left and right. Joints further up bend it and raise it. Small joints at the wrist tilt and twist the end-effector, so the tool can be brought to an object at whatever angle the job needs. The more joints an arm has, the more separate ways it can move — and the more awkward positions it can reach around.
What manipulators are used for
The main use is handling objects. A manipulator can grasp an object, lift it, turn it to face a new direction, place it and let it go — and repeat that sequence identically, thousands of times, without getting bored or careless. This is why factory arms are used for tightening bolts, spraying paint and packing cartons.
The second use is reaching where a person should not go. A manipulator carrying a camera and sensors can be sent along a pipeline, under a bridge girder, or into the tail section of an aircraft, so that an inspection can be done without a person crawling into a cramped or dangerous space.
An honest limit
An arm can only work inside the space it can reach, and that space is fixed by the length of its links. It is also weakest when stretched out straight, in the same way that you can hold a full water bottle easily near your chest but find it heavy at arm’s length. A manipulator that lifts a load close in may not manage the same load at full stretch.
5.3.4 The Sensing Devices
A controller can hold the finest set of rules ever written, and still be useless. A rule such as “stop if a wall is 10 cm ahead” is worth nothing unless something actually measures how far the wall is. Rules need facts to work on, and those facts have to come from the real world.
Sensing devices supply them. A sensor is the robot’s way of noticing something and turning it into a number the controller can use.
What sensing gives a robot
Sensors are used for several different jobs inside one robot.
They let the robot perceive its surroundings — how far away things are, how bright it is, how warm or damp the air is.
They let it detect and recognise objects. A camera collects an image, and the program looks through that image for the shape it has been trained to find, which is how a robot picks the right part off a moving belt.
They let it know about itself. An encoder fitted to a motor counts how far the shaft has turned, so the robot can work out how far it has travelled. An accelerometer measures how quickly its speed is changing, and a gyroscope measures how fast it is turning, so a two-wheeled robot can tell that it is tipping over and correct itself.
They warn it about nearby objects. A proximity sensor reports that something is close, without needing to touch it, which is what keeps a robot from driving into a wall.
They give it a sense of touch. A tactile sensor responds to contact or pressure, so a gripper can tell that it has actually caught hold of the object, and can stop squeezing before the object is crushed.
Finally, they close the feedback loop of Fig. 5.2-1. Every reading that goes back to the comparison point comes from a sensor. Without sensors there is no feedback at all, only guessing.
A sensor you can measure with: the ultrasonic sensor
The commonest proximity sensor in school robotics is the ultrasonic sensor, shown in Fig. 5.3-4. It works the way a bat finds its way in the dark: send out a sound, wait for it to bounce back, and use the waiting time to judge the distance.
Diagram
Fig. 5.3-4 – photo of an ultrasonic sensor module with its two round transmitter and receiver “eyes” facing forward and its four pins along the lower edge
Turning time into distance
Sound travels through air at a speed of about 343 metres per second at ordinary room temperature. The sound the sensor sends out has to travel to the object and then all the way back, so it covers the distance twice. That is why the calculation has a 2 in it:
\[\text{distance} = \frac{v \times t}{2}\]
Here \(v\) is the speed of sound in air, \(t\) is the total time from sending the burst to receiving the echo, and the answer is the distance from the sensor to the object.
An honest limit
No sensor measures the world directly; it measures one physical effect and reports a number. An ultrasonic sensor does not detect a wall, it detects a returning sound. A light sensor does not detect a black line, it detects less reflected light. Whenever that effect is missing or misleading — a soft curtain, a shiny floor, a dark room — the number is wrong, and the robot acts confidently on a wrong number. This is why serious robots carry more than one kind of sensor.
5.3.5 The Information Processing Unit
A sensor does not hand the robot a neat sentence such as “there is a wall 25 cm ahead”. It hands over a stream of numbers, dozens of them every second, and some of those numbers are wrong. A stray echo, a loose wire or a passing shadow can produce a reading that belongs to nothing real.
You handle this yourself without noticing. If a shopkeeper’s weighing scale flickers between two figures, you wait a moment and take the value it settles on. You do not believe the flicker.
The block that does this for a robot is the information processing unit. It stands between the sensors and the decision, and its job is to turn raw readings into a clear, usable description of the situation.
Cleaning up the readings
Unwanted, meaningless variation in a set of readings is called noise. Noise is not a mistake by the person who built the robot; every real sensor has some. The information processing unit’s first job is to reduce its effect.
Suppose an ultrasonic sensor pointing at a wall sends in the five readings shown in Table 5.2, all taken within half a second while the robot stands still.
The robot has not moved, so the wall cannot have jumped away and come back. Reading 4 is noise. There are two simple ways to deal with such a set, and they do not give the same answer.
The average has been dragged more than a centimetre away from the wall’s real position by a single bad reading. The middle reading ignores that odd value completely, because it only cares which value sits in the centre when they are lined up in order. This is why processing units often use the middle value rather than the average when a sensor throws out occasional wild readings.
Working out what it all means
Cleaned readings are still only numbers. The next job is to combine them into a description of the situation: an encoder count becomes a distance travelled, a tilt reading becomes an angle, several distance readings together become a picture of where the free space is.
From that picture the unit works out the route the robot should take. Choosing a route from where the robot is to where it must go, while keeping clear of obstacles, is called path planning. Fig. 5.3-5 shows the idea for a robot crossing a room.
Diagram
Fig. 5.3-5 – plan view of a room seen from above, with a small robot at the bottom left, a goal marked at the top right, a table drawn as an obstacle in the middle, a straight dashed line from robot to goal passing through the table marked as blocked, and a curved solid line going around the table marked as the planned path
The straight line is shortest but goes through the table, so it is not usable. The curved line is longer and clear, so that is the one the robot is given. Planning also decides the timing — how fast to move along each part of the route, slowing down before a turn.
The result of all this goes back into the loop of Fig. 5.2-1, where it is compared with the target and turned into an error signal.
An honest limit
All this work takes time. The more readings the unit collects before deciding, and the more carefully it filters them, the steadier its answer — and the later that answer arrives. A robot that averages a hundred readings before reacting will be very sure about an obstacle it has already hit. Every real design is a balance between being certain and being quick.
5.4 The Supporting Blocks of a Robot
The five blocks of Fig. 5.2-1 describe what a robot does. They do not, by themselves, make a robot that can stand on a table and work for an hour. Something has to supply energy. Something has to hold the parts in place. Something has to let a person start and stop it. And something has to stop it safely when things go wrong.
These are the supporting blocks, and Fig. 5.4-1 shows how they sit around the working loop.
Diagram
Fig. 5.4-1 – the working loop of Fig. 5.2-1 drawn small inside a large rounded rectangle, with five labelled boxes attached around the outside of the rectangle: Power supply, Mechanical structure, Communication interface, Software, and Safety systems
The power supply
Every block above runs on electricity. The power supply provides it — usually a rechargeable battery pack on a robot that moves about, a mains adapter on a robot that stays in one place, or both, with the adapter charging the battery.
Different parts want different voltages. A microcontroller board may run at 5 volts while the motors want 12 volts, so the power supply is often split into more than one line from the same battery.
The size of the battery decides how long the robot can work before it must be charged. Battery packs are marked with a capacity in milliampere-hours, written mAh, which tells you roughly how much current the pack can supply for how long.
The real figure is always less than this. Motors draw extra current each time they start, and a battery’s voltage falls as it empties, so a robot that this sum says will run for 4 hours may in practice run for three or less.
The mechanical structure
The mechanical structure is the body of the robot: the base plate, the frame, the brackets and the covers. It carries every other block and decides where each one sits.
This block does more than hold things. It keeps the sensor pointing where the program assumes it points, keeps the wheels parallel so the robot drives straight, and keeps the whole machine from toppling when the arm reaches out. A well-planned structure also protects the electronics from dust and from knocks.
The communication interface
A robot has to be told when to start, and often has to report back. The communication interface is whatever lets that happen. It may be physical — a switch, a set of buttons, a small screen. It may be wireless, over Wi-Fi or Bluetooth, so that the robot can be driven from a phone or send its readings to a computer in another room. Robots that work in teams use the same kind of link to tell one another where they are.
The software
The firmware is the program stored inside the microcontroller, which runs every time the board is powered. Above it there may be larger control software running on a bigger computer, and in advanced robots, programs that recognise objects or speech.
Software is the block you cannot touch, and the block that matters most. Two robots built from identical parts do completely different jobs if different programs are loaded into them. Changing what a robot does usually means changing its software, not its hardware.
The safety systems
The last supporting block exists for the times when everything else fails. Safety systems include an emergency stop button that cuts power to the motors at once, sensors that detect a collision and halt the machine, and limits built into the program so that a motor can never push harder than a set amount.
On a factory floor these systems are what allow people to work near a machine at all. On a school robot they are simpler — often just a switch within easy reach — but the reason for them is the same. A robot that cannot be stopped quickly should not be switched on.
An honest limit
Supporting blocks are the ones most often left until last, and that is where many school projects come apart. A neat program will still fail if the battery is half charged, if the sensor bracket is held on with tape, or if there is no easy way to switch the robot off once it starts running across the table.
5.5 Mechanical Components
You have seen the blocks. From here to the end of the chapter we look at the actual parts those blocks are built from, group by group, starting with the ones you can hold in your hand.
The mechanical components are the parts that give a robot a shape, keep it standing, and let it move. It is easy to think of them as the boring half of robotics. In practice they decide whether the robot can climb a doorstep, whether the camera stays pointed where the program thinks it is pointed, and whether the machine survives a fall from a table.
Rather than learn a list by heart, it helps to ask what problem each part solves.
Parts that give shape and support
The chassis is the base of the robot — the plate or frame everything else is bolted to. It gives the machine its rigidity, so that the wheels stay parallel and the arm does not twist the body when it lifts something. Fig. 5.5-1 shows a simple two-wheeled chassis from above.
Diagram
Fig. 5.5-1 – plan view of a small robot chassis plate, labelled with two driven wheels with their motors on either side, a caster wheel at the front, a battery holder in the middle, rows of mounting holes along the plate, and a bracket at the front edge holding a sensor
Frames and mounting points are the brackets, pillars and rows of holes that fix each part in its place. They matter more than they look. A sensor that shifts by a few degrees reports about a different part of the room, and the program has no way of knowing it has moved.
Enclosures and covers close the robot in. They keep dust and stray drops away from the electronics, and they keep fingers away from moving parts, which is a safety job as much as a mechanical one.
Parts that move the robot along the ground
Wheels are the simplest answer. Two wheels, each driven by its own motor, can carry a robot forward and turn it by running one wheel faster than the other. Most robots of this kind add a caster — a small free-turning wheel that carries no drive at all and simply holds the third corner of the robot up, the way the small wheels under a hospital trolley do.
Tracks are the endless rubber or plastic belts that run around a set of wheels, as on an excavator. They spread the robot’s weight over a longer strip of ground.
Legs are the third choice. A robot with legs can step over a broken kerb or climb stairs, which neither wheels nor tracks manage well. The price is complication: every leg needs several actuators and constant balancing, so legged robots are far harder to build and use much more power.
For rough ground, a suspension system is added: springs, or sprung arms, between the wheels and the body. It lets a wheel ride up over a stone while the body stays fairly level, so the electronics are not shaken and the wheels keep touching the ground.
Parts that let sections move relative to each other
Joints and links, which you met in the manipulator, belong to this group. So do hinges, which allow one part to swing about a fixed line — a lid that opens, a panel that folds down, a flap that closes over a stored tool.
A pan and tilt mechanism is a pair of small joints stacked one on the other, usually driven by two servo motors. One turns the mounted part left and right, the other tips it up and down. A camera or a distance sensor on such a mount can sweep a whole room without the robot moving at all, as in Fig. 5.5-2.
Diagram
Fig. 5.5-2 – photo of a small pan and tilt bracket assembled from two servo motors, with a camera module fitted on the upper bracket
Parts that soften movement
Springs store energy when squeezed and push back when released; they absorb sudden shocks. A damper does the opposite job — it resists quick movement and lets it happen slowly, the way the closer at the top of a school door lets it swing shut gently instead of banging.
Used together, they smooth out motion. Without them, an arm that stops suddenly would wobble for a while before settling, and every wobble is a small error the sensors have to report and the controller has to correct.
An honest limit
Mechanical parts are the ones that change with use. Screws loosen, plastic brackets bend in the heat, wheels collect dust and lose grip, and a bearing that has been running for months develops play. None of this shows up in the program. A robot that was accurate when it was assembled will drift away from that accuracy unless the mechanical parts are checked and tightened from time to time.
5.6 Electronic Components
The electronic components are the parts that carry electrical signals around the robot and change them into a form the next part can use. If the mechanical components are the bones, these are the nerves — thin, unimpressive to look at, and completely necessary.
You have already met the two most important groups: the microcontroller board that holds the controller, and the sensors that supply readings. This section deals with the parts that sit between them and everything else.
The board that carries the parts
Electronic parts have to be joined to one another, and joining hundreds of them with loose wires would be impossible to build and worse to repair. So they are soldered onto a flat board with thin copper lines printed on it, called a printed circuit board (PCB). The copper lines take the place of wires. A PCB is designed to keep signal paths short and neat, which saves space and keeps signals clean.
Diagram
Fig. 5.6-1 – photo of a green printed circuit board seen from above, showing the thin copper tracks running between the soldered components
The part that lets a small signal control a big one
A microcontroller pin is designed to send information, not power. A pin on a typical school board can safely supply only about 20 milliamperes. A small geared motor of the kind used on a robot wheel draws a few hundred milliamperes while running, and more at the moment it starts.
That is why every motor on a robot is driven through a motor driver — a small circuit that takes the weak signal from the controller and uses it to switch a much larger current from the battery through to the motor. It also lets the controller reverse a motor, by switching the battery’s connections around inside the driver. Fig. 5.6-2 shows how the pieces connect.
Diagram
Fig. 5.6-2 – block sketch showing a microcontroller board on the left with a thin arrow labelled “control signal, small current” going to a motor driver in the middle; a battery below the driver with a thick arrow labelled “battery current” going into it; and a thick arrow from the driver going to a motor on the right
A relay does a similar job in a different way. It is an electrically operated switch: a small current through a coil pulls a metal contact across and closes a separate circuit that may be carrying a much larger current. Relays are used where a robot has to switch a heavy load on and off, and where the two circuits must be kept completely separate from each other.
The parts that hold information
The program has to be stored somewhere that survives a power cut. That is the job of flash memory inside the microcontroller, which keeps its contents when the power is off. While the program runs it needs scratch space for the values it is working with, and that comes from random access memory, which is fast but forgets everything the moment power is removed. Robots that record readings over a long period add storage such as an SD card.
The parts that carry signals about
Cables and wiring connect everything that is not on the same board — sensors at the front, motors at the sides, battery underneath. On a working robot they are the commonest cause of trouble, because a wire that is pulled tight each time an arm swings will eventually break inside its insulation, where the damage cannot be seen.
Where a signal has to travel a set path between two circuits, named links are used: serial communication over a UART for short connections between boards, Ethernet for a wired network link, and CAN in vehicles and industrial machines where many parts must share one line.
Finally, a sensor’s raw output is often too weak, too noisy, or at the wrong voltage for the microcontroller to read. Signal conditioning circuits sit in between and fix this — strengthening a weak signal, smoothing out unwanted variation, or bringing a voltage down into the range the board expects.
The parts a person touches
Buttons, switches, keypads, small screens and indicator LEDs make up the part of the electronics a user actually deals with. They matter more than their cost suggests. A robot with a clearly marked stop switch and a light that shows whether it is armed is far safer to work near than one with a single unlabelled button.
An honest limit
Electronic parts fail quietly. A cracked solder joint, a wire broken inside its insulation or a slightly loose connector produces a fault that comes and goes as the robot moves, and nothing on the outside looks wrong. When a robot behaves oddly only sometimes, the wiring is the first place to look, not the program.
5.7 Computational Components
You can weigh a chassis and hold a motor driver in your hand. The third group of components cannot be picked up at all. The computational components of a robot are the instructions it follows and the methods it uses — the part of the machine that exists only as stored steps.
A clear set of steps for doing something is called an algorithm.
You already know several without calling them that. Long division is an algorithm. So is the method a shopkeeper uses to work out change. So is the loop shown earlier in Section 5.2, which describes how a robot corrects itself over and over until the error is gone.
The part that carries the steps out
At the centre of the computational side is the processor inside the microcontroller. It does one thing, extremely quickly: fetch the next instruction, carry it out, move on. There is no cleverness in the chip itself. Everything the robot appears to work out has been written as instructions and handed to a part that follows them exactly, millions of times a second, without ever varying.
Managing many jobs at once
A small robot runs one program that does one job. A larger robot may have to read a camera, keep its balance, follow a route, watch a battery and listen for a stop command, all at the same time. Deciding which job gets the processor’s attention next, and how memory is shared between them, is the work of an operating system.
For robots, the timing of those decisions matters in a way it does not on a school computer. If a balancing robot’s correction runs a fraction of a second late, the robot has already fallen over. So many robots use a real-time operating system (RTOS), which is built to guarantee that important jobs run within a fixed time, rather than simply running everything as fast as it can on average.
Knowing where it is, and what is around it
Suppose you are sent into an unfamiliar market to find a particular shop. As you walk, you build up a rough map in your head — this turning, that landmark — and at the same time you keep track of where you are on the map you are building. The two go together: you cannot place a landmark without knowing where you were standing when you saw it.
A robot faces exactly the same problem, and the two halves have names. Working out where the robot is at this moment is called localisation. Building up a description of the surroundings is called mapping. Doing both at once, in a place the robot has never been, is called simultaneous localisation and mapping, usually written SLAM. Fig. 5.7-1 shows a robot part way through the job.
Diagram
Fig. 5.7-1 – plan view of a room being mapped: a robot in the lower half with dashed sensor lines fanning out from it, the walls it has already detected drawn as solid lines, the walls it has not yet reached drawn as faint dotted lines, and the far corner of the room shaded and marked “not yet explored”
Once the robot knows where it is and where the free space lies, it can plan a route through that space, and then convert the route into motor commands — how fast to turn each wheel at each moment. This last step is motion control, and it is what finally reaches the actuators.
An honest limit
An algorithm only works while its assumptions hold. A stored map is correct until someone moves the furniture; a route is safe until a chair is left in the corridor. The robot has no way of noticing that its assumptions have quietly stopped being true, so it will follow the plan into the chair with complete confidence. Sensors are what allow it to catch such changes — which is why the computational side can never be separated from the sensing side.
5.8 Design Aspects of Different Robots
Every robot in this chapter has been described with the same set of blocks. Yet robots do not look alike at all. A machine that crawls along the floor of a warehouse, one that walks on two legs, one that flies, and one that works far below the sea share almost nothing in appearance.
Designing a robot means choosing, for each block, the particular part that suits the job — and those choices are driven by two questions. Where will the robot work, and what must it do there? The surroundings decide how the robot moves, how it is protected and how it communicates. The task decides what it senses and what it carries at the end of its arm.
Fig. 5.8-1 shows the four kinds compared in the sub-sections that follow.
Diagram
Fig. 5.8-1 – four simple side-view outlines in a row, labelled Mobile robot (a low box on wheels), Humanoid robot (a two-legged figure with arms and a head), Aerial robot (a four-rotor drone) and Underwater robot (a sealed torpedo-shaped body with thrusters)
A mechanical body, then, can take any form at all. Wheels, legs, propellers and thrusters are not four different ideas about what a robot is — they are four answers to the same question of how to move through a particular place.
5.8.1 Mobile Robots
A mobile robot is one that travels about on a surface — a warehouse floor, a hospital corridor, a field. Its whole design follows from one fact: it must carry everything it needs with it, including its own energy.
Start with the structure. A mobile robot is usually built low and wide, on a flat chassis, with the battery — the heaviest single item — mounted near the bottom. Anything tall and top-heavy tips over when it starts, stops or turns quickly. Fig. 5.8-2 shows the usual shape.
Diagram
Fig. 5.8-2 – photo of a small wheeled mobile robot standing on a floor, seen from the front, low and flat, with an ultrasonic sensor mounted at the front edge of its chassis
For movement, two driven wheels and a caster are the usual choice indoors, because they are simple and turn on the spot. Outdoors, on loose ground, tracks or larger wheels with suspension are chosen instead. The motors are almost always fitted with gearboxes, which trade speed for turning force so that the robot can start moving with a load on it.
The sensing is chosen around one main danger: hitting something. Proximity sensors at the front report obstacles in time to stop. Encoders on the wheels count how far each wheel has turned, so the robot can estimate how far it has come. A robot that follows a painted line adds a downward-facing sensor that watches the reflected light from the floor.
The controller runs the same short loop over and over — read the sensors, decide, drive the motors — and the software holds the rules for what to do at an obstacle, at a junction and at the goal. Communication is usually wireless, so that a person or a central computer can send it a new destination without stopping it.
Mobile robots of this kind are already ordinary. Warehouses use fleets of low, flat robots that drive under a shelving unit, lift it, and carry the whole shelf to a packing station. Hospitals use taller versions with lockable trays to move linen and medicines between floors. The floor-cleaning robot sold for homes is the same design made small.
An honest limit
Counting wheel turns tells a robot how far its wheels have gone, not how far it has gone. On a wet or dusty floor the wheels slip, and the small errors add up over a long run until the robot’s idea of its position is well away from the truth. This is why a mobile robot that has to work for hours needs something outside itself to check against — a line on the floor, a marker on a wall, or a map built from what its sensors can see.
5.8.2 Humanoid Robots
A humanoid robot is built roughly to the plan of a human body: a torso, two arms, two legs and a head. This is a hard shape to build and an inefficient way to move, so it is worth asking why anyone chooses it.
The answer is that the world is already built for that shape. Stairs, doorways, handles, switches and tools are all sized for people. A machine with the same reach and the same joints can use them without anything being rebuilt. The second reason is that people find a human-shaped machine easier to read — you can tell at a glance which way it is facing and what it is about to pick up.
Fig. 5.8-3 shows where the main blocks sit in such a robot.
Diagram
Fig. 5.8-3 – front view sketch of a small humanoid robot with labels pointing to a camera and microphone in the head, shoulder, elbow and wrist joints in the arms, hip, knee and ankle joints in the legs, a tilt-measuring sensor and the controller board in the torso, and the battery low in the torso
The actuator count is what sets a humanoid apart. Every joint needs its own actuator, and there are many joints — several in each arm, several in each leg, one or two in the neck. Small humanoid robots of the kind used in schools and competitions typically use around fifteen to twenty servo motors, each holding its own commanded angle.
Balance is the central design problem, and it is a sensing and computation problem rather than a mechanical one. A tilt-measuring sensor in the torso reports how the body is leaning, sensors in the feet report where the weight is pressing, and the controller adjusts several joints together, many times a second, to keep the robot’s weight over the foot that is on the ground.
The structure has to be light, because every gram must be lifted by the leg actuators at each step, and stiff, because a bending link makes the balance calculation wrong. The power supply is under heavy demand, since a dozen or more motors are working continuously even when the robot is standing still.
Humanoid robots are used where the interaction matters as much as the work: greeting visitors at an exhibition counter, guiding people at a public information desk, and in research on how machines might one day work in buildings meant for people.
An honest limit
For nearly every practical job on a flat floor, a wheeled robot does better — it is cheaper, steadier, faster and uses far less power. Humanoids remain expensive, slow and fragile; a fall that a person would shrug off can break several joints at once. The shape is chosen for the places and the tasks where being human-shaped is the whole point, not because it is the better machine.
5.8.3 Aerial Robots
An aerial robot works in the air. That single fact changes every design choice, because nothing holds the machine up. A wheeled robot that loses power simply stops; an aerial robot that loses power falls. Its motors must keep working every second it is in the air.
The commonest design is the four-rotor type shown in Fig. 5.8-4. Four motors, each with a propeller, are fixed at the ends of four arms, with the control board and battery in the middle.
Diagram
Fig. 5.8-4 – top view of a four-rotor aerial robot: a central square body containing the control board and battery, four arms reaching out to four motors with propellers, curved arrows showing that the two propellers on one diagonal spin one way and the two on the other diagonal spin the opposite way
There are no steering flaps or rudders. The machine is steered entirely by changing the speeds of the four motors relative to one another. Running the two motors on one side a little faster tips the machine towards the other side, and it slides that way. Because the propellers on one diagonal spin one way and those on the other diagonal spin the opposite way, their twisting effects cancel; speed up one diagonal pair and the whole machine turns on the spot.
Weight rules the structure. Every gram has to be lifted continuously, so frames are made of thin plastic or carbon fibre, and nothing is carried that is not needed. This is the opposite of the mobile robot, where a heavy battery low down was an advantage.
Sensing is dominated by keeping level. A gyroscope and an accelerometer report how the machine is tilting and turning, and the controller adjusts the four motor speeds hundreds of times a second in response. A pressure sensor measures height by the fall in air pressure, and outdoors a satellite positioning receiver reports the machine’s position over the ground. Indoors, where satellite signals are weak, a downward-facing camera or distance sensor is used to hold position instead.
The communication link is a safety item, not a convenience. If the radio link to the operator is lost, a well-designed aerial robot does not simply carry on; its software brings it down or returns it to where it took off.
Aerial robots are used for photography and surveying, for inspecting power lines, bridges and tall towers without putting a person on a rope, for spraying crops, and for carrying small loads to places that are hard to reach by road.
An honest limit
Flight time is short. A small machine of this kind typically stays up for something like twenty to thirty minutes on a charge, because lifting itself uses far more energy than rolling would. Adding a bigger battery adds weight, which uses more energy again, so there is a limit to how far that trade can be pushed. Wind, rain and cold all cut the time further.
5.8.4 Underwater Robots
An underwater robot works in a place that is actively hostile to electronics. Water gets into any opening, presses harder the deeper you go, blocks radio signals within a short distance, and swallows light so that visibility is poor even in daytime. Every design choice is an answer to one of those four problems. Fig. 5.8-5 shows the usual arrangement.
Diagram
Fig. 5.8-5 – side view of an underwater robot: a sealed cylindrical body containing the controller and battery, thrusters mounted at the rear and on top, a camera with a lamp beside it at the front, a depth sensor on the underside, and a tether cable running up from the body to a boat drawn at the water surface
The structure begins with a sealed housing. Every joint, window and cable entry is fitted with a rubber seal, and the housing is made strong enough for the depth the robot must reach, because water presses in harder the further down it goes.
The robot must also be balanced against floating and sinking. Designers add foam blocks to make it more buoyant and weights to make it less, until it is close to neutral — it neither rises nor sinks on its own. That way the thrusters only have to move it, not hold it up, which saves a great deal of energy.
For movement it uses thrusters — small propellers in sealed housings, pointed in different directions. One pair drives it forward and turns it; another, mounted to push up or down, controls depth. There are no wheels and nothing to push against but water itself.
The sensing is chosen to suit water rather than air. A pressure sensor gives the depth directly, since pressure rises steadily with depth. Sound is used for looking around, because it travels well through water where light does not: a sonar sends out a pulse and times the echo, which is the same method as the ultrasonic sensor in Section 5.3.4, working over a much greater distance. Cameras are carried too, but they are useless without a lamp beside them.
Underwater robots are used to inspect ship hulls, undersea pipelines and the walls of dams, to survey the sea floor, to study marine life without a diver disturbing it, and to search in water too deep or too dangerous for people.
An honest limit
Position is the hard problem underwater. Satellite positioning does not work below the surface, so the robot has to estimate where it is from its own speed and heading, and those estimates drift further from the truth the longer it stays down. A cable solves the communication problem but limits how far the robot can travel, and can snag on wreckage or rock. Sending messages by sound frees the robot from the cable, but sound carries far less information than a cable does, so the robot must be able to work for long stretches without being told anything.
5.9 All the Blocks Working Together
Everything in this chapter has been described one block at a time. The only way to see that the blocks really do work as a system is to build the smallest possible robot system and watch it run.
The job we will give it is simple: warn when something comes too close. It is the first half of what an obstacle-avoiding robot does, and it uses every block you have met, in miniature. The sensing device is an ultrasonic sensor. The controller and the information processing unit are both the microcontroller board. The actuator is a small buzzer, which converts an electrical signal into sound instead of motion. The power supply is the computer’s USB cable. The structure is whatever the parts are mounted on. The software is the program we are about to write.
The method, before the program
Always settle the method in words first. Writing code before you know what the code must do is how most projects go wrong.
Notice that this is the feedback loop of Fig. 5.2-1 in its simplest form. There is a target, taken from a rule we choose; there is a measurement; and there is an action that depends on the difference between the two.
Connecting the parts
The circuit uses an Arduino Uno board, an ultrasonic sensor module and a small active buzzer, wired as in Fig. 5.9-1. The sensor’s power pins go to the board’s 5 V and GND pins. Its trigger pin goes to digital pin 9 and its echo pin to digital pin 10. The buzzer’s positive lead goes to digital pin 8 and its other lead to GND. Unplug the USB cable from the board before making or changing any of these connections.
Diagram
Fig. 5.9-1 – wiring diagram showing an Arduino Uno board, an ultrasonic sensor module with its four pins joined to 5V, GND, pin 9 and pin 10, and a small buzzer joined to pin 8 and GND, with each wire labelled
The program
The distance is worked out with the same rule as in Section 5.3.4, written in units that suit a microcontroller. Sound travels about 343 metres per second, which is 0.0343 centimetres in every microsecond, and the time measured covers the trip there and back — so the time is multiplied by 0.0343 and then halved.
Reading the program block by block
The three lines at the top give names to the pins, so that the rest of the program never has to mention a bare number. If you rewire the buzzer to another pin, one line changes instead of several.
setup() runs once when the board is powered. It opens the link to the computer and tells the board which pins are outputs and which is an input. Getting this wrong is the commonest reason a working circuit does nothing at all.
loop() runs over and over, for as long as the board has power. That endless repetition is the feedback loop, and it is why the robot keeps up with a moving hand.
pulseIn() does the timing. It waits for the echo pin to go high, times how long it stays high, and hands back that time in microseconds. Everything after it is arithmetic and a decision.
An honest limit
This system reports and warns, but it cannot get out of the way, because it has no actuator that moves anything. Replace the buzzer with two motors and a motor driver, and the same six steps become an obstacle-avoiding robot. That is the point of thinking in blocks: the method stays, and only the part filling one block is exchanged.
5.10 Summary
- A robot is a system: a set of parts joined so that each does one job and the whole does something no single part could do alone.
- The parts of any robot fall into three groups — mechanical components, electronic components and computational components.
- A block diagram shows each block as a labelled box, with arrows for the direction in which information travels. It shows the flow of information, not the physical layout.
- A task is turned into a target using the robot model. The target is compared with what the robot is actually doing, and the difference is the error signal.
- Feedback means sending information about what the robot has actually done back to the part that decides what it should do next. Without feedback a robot acts blindly.
- The controller holds the robot’s rules, takes in sensor data, chooses what to do, and sends control signals to the actuators. It can only handle situations someone has already written a rule for.
- Actuators convert electrical signals into movement. DC motors are used for wheels; servo motors hold a commanded angle and are used for joints and grippers; pneumatic and hydraulic actuators use compressed air and pressurised oil for greater force.
- The manipulator is the robot’s arm, made of rigid links joined at movable joints, with an end-effector such as a gripper or suction cup at its tip.
- Sensors measure a physical quantity and turn it into a number. Proximity, tactile, position and vision sensors each report a different kind of fact, and every sensor measures an effect rather than the object itself.
- An ultrasonic sensor times the echo of a sound burst. Because the sound travels there and back, the measured time must be halved before it becomes a distance.
- The information processing unit cleans up noisy readings, works out what they mean, and plans the robot’s path. More filtering gives a steadier answer but a later one.
- Supporting blocks keep the robot working: the power supply, the mechanical structure, the communication interface, the software and the safety systems.
- Mechanical components give shape and support, move the robot along the ground, allow parts to move relative to one another, and soften sudden motion.
- Electronic components carry and change signals. A motor driver lets a weak control signal switch a large battery current; a relay switches a separate circuit; signal conditioning makes a sensor’s output fit for the controller to read.
- Computational components are the stored instructions and methods. An algorithm is a finite set of clear, ordered steps producing a required result from some input.
- A real-time operating system is used where a job must run within a fixed time, such as keeping a robot balanced.
- Localisation means working out where the robot is; mapping means building a description of the surroundings; doing both at once in an unknown place is simultaneous localisation and mapping.
- Robots of very different shapes are built from the same blocks. Wheels, legs, propellers and thrusters are four answers to the question of how to move through a particular place.
- A mobile robot is kept low and stable and worries about grip; a humanoid worries about balance; an aerial robot worries about weight; an underwater robot worries about sealing and pressure.
- A complete working system can be as small as one sensor, one board and one buzzer, running a loop that measures, decides and acts, over and over.
5.11 Key Terms
- Accelerometer: A sensor that measures how quickly the speed of a body is changing, used to detect movement and tilt.
- Actuator: A part that converts an electrical signal into mechanical motion.
- Algorithm: A finite set of clear, ordered steps that takes some input and produces the required result.
- Arduino Uno: An open-source microcontroller board built around the ATmega328P chip, widely used in school robotics.
- Block: A group of parts that share one job, treated as a single unit when a system is studied.
- Block diagram: A drawing in which each block is a labelled box and arrows show the direction in which information travels.
- Caster: A small free-turning wheel that carries no drive and simply supports part of a robot’s weight.
- Chassis: The base plate or frame of a robot, to which all other parts are fixed.
- Communication interface: The block through which a robot receives instructions and sends information out, by wire or wirelessly.
- Computational components: The stored instructions and methods a robot follows, which have no physical form.
- Controller: The block that applies the rules stored in its program and sends control signals to the actuators.
- Damper: A part that resists quick movement so that motion happens slowly and smoothly.
- Direct current (DC) motor: A motor that spins while direct current flows through it, and spins the other way when the connections are reversed.
- Electronic components: The parts that carry electrical signals around a robot and change them into a usable form.
- Encoder: A sensor fitted to a motor that counts how far its shaft has turned.
- End-effector: The tool fitted at the tip of a manipulator, such as a gripper or a suction cup.
- Error signal: The difference between what a robot has been asked to do and what it is actually doing.
- Feedback: Sending information about what a system has actually done back to the part that decides what it should do next.
- Firmware: The program stored inside a microcontroller, which runs every time the board is powered.
- Flash memory: Memory that keeps its contents when the power is switched off, used to store a robot’s program.
- Gyroscope: A sensor that measures how fast a body is turning.
- Hydraulic actuator: An actuator that uses pressurised oil to produce large, closely controlled forces.
- Information processing unit: The block that cleans up raw sensor readings, works out what they mean, and plans the robot’s path.
- Localisation: Working out where a robot is at the present moment.
- Manipulator: The mechanical arm or limb of a robot, made of rigid links joined at movable joints.
- Mapping: Building up a description of a robot’s surroundings from its sensor readings.
- Mechanical components: The parts that give a robot its shape, hold it together and let it move.
- Mechanical structure: The block made up of a robot’s body, frame, brackets and covers, which carries every other block.
- Microcontroller: A single chip containing a small processor, memory and input/output pins, which runs a robot’s program.
- Motor driver: A circuit that uses a weak control signal to switch a much larger battery current through to a motor.
- Noise: Unwanted, meaningless variation in a set of sensor readings.
- Operating system: Software that decides which job gets the processor’s attention next and how memory is shared between jobs.
- Pan and tilt mechanism: A pair of small joints that together turn a mounted part left and right and tip it up and down.
- Path planning: Choosing a route from where a robot is to where it must go, while keeping clear of obstacles.
- Pneumatic actuator: An actuator that uses compressed air to push a piston, giving fast straight-line movement.
- Power supply: The block that provides electrical energy to every other block of a robot.
- Printed circuit board (PCB): A flat board with thin copper lines printed on it, which joins soldered electronic parts together.
- Proximity sensor: A sensor that reports that an object is close without needing to touch it.
- Real-time operating system (RTOS): An operating system built to guarantee that important jobs run within a fixed time.
- Relay: An electrically operated switch in which a small current through a coil closes a separate, larger circuit.
- Robot model: A robot’s stored description of itself, used to turn a given task into targets the machine can work with.
- Safety systems: The parts and rules that stop a robot quickly and limit what it can do when something goes wrong.
- Sensor: A device that measures a physical quantity and converts it into an electrical signal a controller can read as a number.
- Servo motor: A motor packed together with gears and a position-measuring part, which turns to a commanded angle and holds it.
- Signal conditioning: Circuits that strengthen, smooth or shift a sensor’s output so that a controller can read it correctly.
- Suspension system: Springs or sprung arms between a robot’s wheels and its body, which absorb shocks on rough ground.
- System: A set of parts joined together, each doing one job, which together do something no single part could do alone.
- Tactile sensor: A sensor that responds to contact or pressure, giving a robot a sense of touch.
- Tracks: Endless belts running around a set of wheels, which spread a robot’s weight over a longer strip of ground.
- Ultrasonic sensor: A sensor that measures distance by sending out a burst of sound above the range of human hearing and timing its echo.
5.12 Objective Questions
Choose the correct option. The block of a robot that converts an electrical signal into mechanical motion is the
- sensor
- actuator
- controller
- printed circuit board
Choose the correct option. A caster fitted to a small wheeled robot is used to
- drive the robot forward
- steer the robot round corners
- support the robot’s weight while turning freely
- measure how far the robot has travelled
Fill in the blanks.
- The difference between the target given to a robot and what it is actually doing is called the ________ .
- Unwanted, meaningless variation in a set of sensor readings is called ________ .
State whether each statement is true or false.
- A block diagram of a robot shows where each part is physically placed inside it.
- A servo motor can be told to turn to a chosen angle and hold that position.
- Radio signals travel well through water, which is why underwater robots are controlled by radio.
Match each part in Column A with the job it does in Column B.
Column A Column B a. Encoder i. Switches a large battery current using a weak control signal b. Motor driver ii. Slows down quick movement so that motion is smooth c. End-effector iii. Counts how far a motor shaft has turned d. Damper iv. Touches and holds the object a manipulator works on An ultrasonic sensor measures an echo time of 1.0 millisecond. Taking the speed of sound in air as 343 m/s, write the distance from the sensor to the object, in centimetres.
In an Arduino program, state in one line what the instruction
pinMode(echoPin, INPUT);tells the board to do.
5.13 Concept Questions
Define feedback, and give one example of feedback from a robot described in this chapter.
Give two differences between a DC motor and a servo motor, and state which of the two you would choose for the elbow joint of a robotic arm, with a reason.
A student connects a small geared motor directly to a digital output pin of a microcontroller board and finds that the motor barely turns. Explain what is wrong and what should be used instead.
A robot stands still and its distance sensor sends in five readings, one of which is far larger than the rest. Explain why using the middle reading may be safer than using the average of all five.
What would happen to a robotic arm if the feedback path in its block diagram were broken, while every other block kept working? Explain with an example.
The warning program in this chapter sounds a buzzer when an object is nearer than 20 cm. Write the changed part of that program so that it instead warns when the object is nearer than 15 cm, and also prints the word Warning on the Serial Monitor each time the buzzer is switched on.
5.14 Case-Based Questions
A school library wants a small robot to carry returned books from the issue counter along a straight aisle to the shelving area. The floor is smooth, the aisle is narrow, and students walk through it all day.
- Name two kinds of sensor the robot should carry, and say what each one is for in this situation.
- Explain why the chassis should be kept low and the battery mounted near the bottom of the robot.
- Suggest one safety feature the robot must have, and give the reason for it.
A dairy farm fits an ultrasonic sensor above a cattle water trough, pointing down at the water. The distance from the sensor to the water surface tells the farmer how full the trough is. Five readings taken within one second, while nothing was moving, are given below.
Reading number Distance (cm) 1 12.4 2 12.6 3 12.5 4 19.8 5 12.5 - Work out the average of the five readings and also the middle reading, and state which of the two you would use as the trough’s real level, with a reason.
- Name the block of the robot system that does this cleaning up of readings before any decision is taken.
- The trough is later covered with a floating layer of straw. Explain why the sensor’s readings may become unreliable.