• ### Electricity is Almost, but not Quite, Unlike Vodka

Or what are voltage and current exactly?

I have seen this explained with water, but that doesn't make any sense. Water doesn't have any volts!

Let's start with a simple case. You have a battery, and you have a light-bulb that you connect to it.

That is like a bottle of vodka and a drunkard. The voltage stored in the battery is like the strength of the booze in the bottle -- it's given by the chemistry of the particular kind of battery. The current, on the other hand, is given by how fast the drunkard drinks it. He can sip it slowly, and thus get only a little bit druk, while the bottle lasts long, or he can guzzle it straight from the bottle, which is the equivalent of making a short. Of course, the more he drinks, the hotter he gets. To get to the same level of inebriation with a lower voltage, you need to drink more of it, so if you want to do it in the same time, you need higher current. The slowness of drinking is the resistance.

The bottle has its own resistance too. The bottleneck is the bottle neck. You can only pour so fast from it. However, if you connect two or more bottles in parallel, you can get much more current from them. (Connecting bottles in series gives you higher voltage, which is where this metaphor breaks, but bear with me.)

Of course, if you have several drinkers in parallel, you will need higher current. (Again, the metaphor breaks when you connect them them in series, but let's not dwell on that.)

Now, what happens when the drunkard tries to drink faster than what the bottle can manage? In fact, a bottle is more like a capacitor than like a battery. It holds a certain amount of electricity at a certain voltage, and lets you draw all of it from it. (But not quite, to make it exactly like a capacitor, you have to top it up with water after every pouring, so that voltage drops.) A battery is more like a distillery. It produces as much vodka as needed (at a certain voltage), but when you try and demand more than it can produce, it will start topping it up with water, and thus you get a voltage drop. If you do it too much, the distillery will break.

Now, if you connect two distilleries in parallel, they will double the voltage of the resulting booze. If you connect them in parallel, you can draw more current.

That's pretty much it. The important thing to remember is that the voltage is determined by the distillery, but the current is determined by the drinkers (and limited by the distillery by voltage drops).

• ### SG-90 Hobby Servo

SG90 is one of the cheapest and most common hobby servos available. That is probably because it's also the most commonly cloned hobby servo. If you bought one of these very cheap. there is a very good chance that it wasn't actually produced by Tower Pro, but it was manufactured in one of the hundreds small factories in China based on designs that have been passed from person to person.

As you can expect, the parameters of this servo, including its quality, but also exact dimensions, speed, torque, accuracy, dead band, maximum and minimum voltage, size of the shaft, etc. – will vary wildly depending where it is sourced from, and even when. It is common, for example, for the servo horn from a servo from one batch to not fit the shaft on a servo from a different batch. That means that any designs using those servos have to either have large tolerances, or be adjusted for the particular batch of servos.

Those servo typically come in a plastic bag, with a smaller plastic bag inside containing additional elements: a horn screw, two mounting screws, and three servo horns: a single arm, a double arm and an asymmetrical cross. The holes in the horns are spaced 2mm apart.

The brown, red and yellow wires are typically a little over 15cm long, and end with a standard JR female plug with 2.54mm pitch. That plug is a little thicker than 2.54mm near the top, so when a lot of them are put together, there have to be some additional space between them.

They have shape of the typical 9g microservos: 23mm long, 12.2mm wide and 29mm high. They have two "ears" with mounting holes, but the sizes of the ears and the holes vary greatly. They are held together with 4 long screws. When those are removed, they will break into three parts – the bottom with the wires and electronics, the middle with the motor and the pot, and the top with the gearbox and the shaft.

The gearbox is composed of four nylon double gears, mounted on two shafts – the potentiometer's and an auxiliary shaft. There is a fifth small gear on the motor's shaft. The last gear is connected with the main shaft, which has a piece of plastic preventing the servo from rotating all the way. There is no bearing – the plastic case of the servo holds the top of the shaft, and the brass bushing of the potentiometer holds the bottom. The gears can be very delicate, and it's quite easy to strip their teeth by trying to force the servo's movement by hand.

The electronics used in this servo vary, but are usually analog.The servo expects a PWM signal at around 50Hz, with the pulse width between around 400 and 2400µs, with 1500µs being the middle position. The maximum and minimum pulse widths vary between individual servos, even in the same batch. The exact amount of motion corresponding to a particular change in the pulse width also varies. The total range is usually a little over 180°.

The torque and speed of this servo also vary from batch to batch, but are somewhere around 1.8kg×cm and 0.12s/60° at 4.8V. This is affected both by the power voltage and by the frequency of the control signal – the higher the frequency and voltage, the stronger and faster the servo. However, this also affects its lifetime.

It is possible to modify this servo for continuous rotation, by cutting the limiters on the shaft, drilling the shaft to make it move freely on the potentiometer, and gluing the potentiometer in its center position.

It is also possible to add a wire to the center of the potentiometer to read the servo's position, and to one end of the motor's leads to read the servo's force – both signals will be between 0 and the power voltage.

• ### Flywheel and Ratchet

When you have a lot of different projects and not enough motivation, energy and time to work on all of them all the time, it's very important to organize them in such a way, that you can work on them in small increments. There are two patterns that help with that, the Flywheel and the Ratchet.

A flywheel accumulates energy. You can make it spin, and leave for some time, and it will keep on spinning, at least until friction makes it stop. You can store energy in a flywheel, when you have it, and then use it later, when you need it. You could also call it a battery, I suppose.

I always try to organize my projects so that they have a kind of psychological flywheel in them. When I have a lot of motivation and energy, I can "store" it in them, and later draw upon it when it gets low. How do I store the energy? There are many ways. I might link to some inspiring materials, I might write down the ideas, I might create a "done list" (it's like a "todo list", only the other way around, more motivating), I might post some questions online, I might order some cool parts, design a PCB, write a proof of concept program, etc. There are all sorts of small activities I can do while I'm motivated. The point is to always make them leave some kind of trace, so that they can motivate me later on. This may be serendipitous, like finding an old picture or prototype, this can be on-demand, like going through my "done list" or reference links, or it may be timed, like receiving the ordered parts. The point is to always store away energy when I have it.

A ratchet is a mechanism that makes sure that you only move forward, and not backwards. If you use psychological ratchets, you can work on your projects in small increments, and still have them all progressing. The ratchet will prevent them from dissolving over time.

Again, there are many ways to introduce a ratchet. Using version control repositories for your code is one such example. Saving snippets of articles you write, even if they don't make much sense yet. Saving sketches. Keeping photos of the things you are disassembling or assembling. Using bolts instead of glue, and plugs and sockets instead of soldering everything. Having room for keeping all the prototypes. Having enough stock parts to not cannibalize old projects. Putting labels on the PCBs, so that you can figure out what goes where even after you forgot. Commenting your code.

Both of those mechanism also work very well with collaboration. In fact, they let you collaborate "asynchronously", without even having to actively cooperate with your collaborators. They can pick up your flywheels and your ratchets years after you created them, and develop them further independently. All you have to do is to make them public, though that is not always possible with physical things.

• ### Crawling and Walking

04/03/2016 at 11:21 1 comment

Ever wondered why I build those super-expensive 4-legged robots with 12 servos, three servo per leg, when all you need to have a "walking" quadruped robot is two servos and a piece of wire bent just the right way, and three servos for a hexapod? My answer is simple: those robots are not really walking. They are crawling. What's the difference?

When you are walking, you make steps -- your feet move, relative to the ground, only when they are in the air. Once you put a foot on the ground, it stays pretty much in the same spot. You don't drag your feet.

When you are crawling, most of your body stays in contact with the ground, and you use your arms and legs to push it forward. It's similar to rowing. You never completely raise from the ground, some parts are always touching it, you just drag them.

But what is the practical difference? First of all, crawling usually requires much more energy. How much exactly depends on the kind of surface you are crawling on -- which is another down side. You can walk as well on a puffy carpet as on a smooth floor, but crawling on the carpet is much harder. Then, crawling doesn't require much balancing. Since most of your contact surface stays the same, there are no complex movements you need to do to shift your center of gravity to keep from falling down. For all you care, you are already down. And finally, most importantly to me, crawling is not nearly as interesting.

What about those single-motor mechanisms that use intricate systems of levers or gears to move their many legs in a walking fashion? In theory they lift their feet for movement, and they don't drag them on the floor much, so that counts as walking. However, in practice, this walking doesn't give them any advantage over normal wheeled locomotion. In fact, if you look carefully, they simply move on wheels, just the wheels touch the floor through the system of levers, instead of directly. This of course looks cool and all that, but it doesn't let you move more efficiently over uneven terrain, climb stairs, etc. -- so most advantages of walking are gone. They still make nice toys, though.

• ### Humanoid Robots are Impractical

Whenever someone attempts to build a humanoid robot (an android), whether it's Boston Dynamics or a hacker in a garage, they usually have one or several justifications for it. I'm going to list the common justifications here and explain why I think they don't make sense, except for one of them.

Perfection. Humans are the pinnacle of evolution and our bodies are the most perfectly matched to operate in this environment. Bullshit. Our bodies were optimized for many tasks that robots simply don't do, such as growing, giving birth, running very long distances, resting, mating, raising young, etc. They were also optimized around constraints that are simply not there for the robots, such as limited material strength, high cost of precise sensors, limitations of energy distribution, need for regeneration, inherited overall structure of mammals, etc.

If you reconsider the needs of the environment and the possibilities the technique gives you, you will come up with a construction that is smaller, lighter, faster, has much more reach and more flexibility, has eyes and other sensors practically everywhere, and doesn't look anything like a human.

Teleoperation. This is what many giant robot movies claim -- you build a robot, and make it repeat all the moves of a human pilot, only with greater force and often in larger scale. There are two reasons why this doesn't work. First, if you really make the robot considerably larger, you are going to have completely different dynamics. Even if you make the robot's actuators super-strong and fast, so that you can compensate for the dynamics in software (you can basically simulate any dynamics, as long as you have enough torque), this is going to be very inefficient and awkward.

Second, there is no reason for that robot to still have human proportions. The pilot would need to learn to operate the robot anyways, there is no getting around that, and our brains are very flexible -- we could easily operate a body that has completely different proportions -- much better suited for the task at hand. For instance, a chimpanzee can run much faster than a human.

Man-made environments. If it's going to be used in environments made for humans, and use human tools, it has to look like a human. Again, not true. Technology can do much better. It doesn't have to have the same size, strength and reach as humans do -- it just needs to be smaller, have greater reach and be stronger. It doesn't need to be humanoid. In fact, if you have a dog, you can already see that it can operate in human environments just fine, even though it's much smaller and less agile. Something like RoboSimian is going to operate in human environments much better than humans. As soon as it has good enough control, that is.

Blend in. It will be easier to interact with and get used to it if it looks like a human. That's actually exactly the opposite. You see, we appeared on this planet together with several other species of hominids, and we have evolved to exterminate them with extreme prejudice. Whenever we see something that looks like a human, but not quite, we find it extremely creepy and disgusting. This is called "uncanny valley" and it's a big problem. The easiest way to avoid it is to not make robots look like humans.

It's cool. This is the only reason I can accept. Yes, it's insanely difficult, it requires a lot of research and it's expensive. All the more impressive! It totally makes sense to make humanoids for entertainment purposes, to put them in shopping windows, TV shows, live performances and what not.

And that's pretty much it.

• ### Make Everything Replaceable

I think this is the most important thing that I learned in all my years making things.

You see, things break. Sometimes they wear off or become obsolete, and sometimes they arrive already broken. And from time to time you make a mistake and release the blue smoke from them. But it's not just that. Often you just want to remove a part to see how things work without it, or temporarily switch it for another part. Or scrap an old project and recover parts from it.

Whatever the reason is, it's all much easier when you can simply unplug and/or unbolt it. Therefore:

• Use nuts and bolts, screws or other reusable fasteners. Avoid gluing things together as much as possible, unless it's some weak glue like adhesive tape or hot glue, which you can easily remove. Even then, bolts are much better.
You can use nylon or acrylic bolts if you care about the weight.
• Use plugs, preferably on both ends of the wires. Avoid soldering wires directly to the boards, or soldering boards together.
• If possible, make parts individually removable. Avoid situations where you have to remove one thing to get access to another thing.
• Use off-the-shelf parts as much as possible, and avoid customization. Any modifications you make will need to be repeated when you are replacing the part, and may make the part unusable in other projects.
• Design in modular way, so that you can disconnect and test subsystems individually.
• Try to follow existing standards and established practices when designing your plugs and mount points. Try to use as few different kinds of plugs and fasteners as possible, so that you can later swap elements. Also follow this across different projects.
• However, don't use standard connectors in non-standard ways. Do not use an audio jack to provide power, or an USB plug for I²C. If you absolutely have to, make sure that connecting something there by mistake won't result in a catastrophe.
• Try to anticipate alternate uses. Use footprints that can accommodate several versions of the component, place headers so that you can use either straight or angled ones, include additional mounting holes, etc.

This will not only let you fix your projects when they break, it will also allow you to diagnose the problems in the first place, and will make your projects easier to reproduce by other people or yourself.

1. ### My Thoughts About Pi Zero

So I just received the Pi Zero, and I had some fun playing with it already. I wanted to share some of my comments about the technical aspects of the new board.

# The Good

• price
• small size
• mounting holes
• all components are one one side of the board, the other side is flat and clean
• all sockets are on one edge (plus SD card slot on another edge, but that's just two edges)
• all LEDs are together on the edge
• video out and reset on separate unpopulated header
• lots of test points and unpopulated socket footprint on the underside
• 700Mhz by default, with an option to overclock to 1000Mhz
• SD card images compatible with other Pis

• the two USB ports are too close together, making it hard to fit two plugs
• the USB ports are not exposed as pin headers or any other kind of socket that could be used by a "USB hub shield"
• no version with unpopulated usb and hdmi
• no audio circuit, although one can hack one
• the additional GPIO pins that are freed by having less hardware on the board are not exposed

# The Ugly

• I would prefer it to be a little bit more short and square -- but I understand that then the standard GPIO header wouldn't fit.
• micro-USB and micro-HDMI requiring additional adapters -- that's not such a big deal for me, but it's an inconvenience
• no on-board bluetooth or wifi — that would be useful for me personally
2. ### Walking Robots Design Mistakes

We don't really see too many walking robots around us, but everyone knows how they should look like. After all, we've seen a lot of them in the movies, comic books, and computer games. There is a slight problem with that. You see, those robots were conceived by artists, not engineers, and their only goal is to evoke a certain set of associations, such as swiftness or clumsiness, slowness or speed, friendliness or danger, sturdiness or fragility, cuteness or awesomeness, fantasy or realism, etc. Most of them couldn't be built with today's technology, and some of them with any technology, assuming today's understanding of physics is not completely wrong. Even if they could be built, they would be hopelessly impractical and inefficient.

There is nothing wrong with that, of course. Those robots do the job they were created for. They are an element of plot. Only rarely the designer is so incompetent, as to completely destroy the experience, as in the Interstellar movie. Unless, just like me, you want to build a walking robot, and you unconsciously try to make it look like those fantasy robots, because that's the only robot you've seen.

I want to list here the most common differences between those "artistic" robots and the robots that would actually make sense in the Real World™.

# The Design Process

## Robo Cat

I think the most common approach to designing a cool robot for a comic, movie or game is to just take an existing animal, paint it in a metallic color and add some gears, radiators or antennas here and there. Or take a human actor, make some parts of her body transparent with computer special effects, and add blinking lights. This doesn't work on several levels.

First of all, if you didn't pick a crab or insect, your animal has most likely an internal skeleton, and your robot has a metal shell, which pretty much amounts to exoskeleton. The two approaches have radically different strong points and require radically different mechanical design. Unless, of course, your robo-animal has both internal skeleton and external armor, which is just wastefully stupid.

Second, muscles have completely different characteristics than servomotors or hydraulics, which most likely move your robot. Not only the power density is completely different, but you also attach them in different places and they have best efficiency in different situations.

Lastly, the constructions that nature arrived at are not very optimal from the point of view of technology. Nature has completely different constraints -- the animal must be able to build itself in the womb, then grow, heal itself, find food and digest it, reproduce, etc. The animals also had to evolve from existing earlier animals, and at each step they had to survive -- so they couldn't suddenly just sprout an extra set of limbs, rearrange its organs, etc. The nature also works with tissues, which are limited in many ways. For instance, you can't have wheels or other rotating parts, but it's easy to have soft or flexible elements.

## Robo Car

Second approach is to take an existing machine or vehicle, and, um, transform it into a robot, usually by making it sprout hands and legs (and a head). Of course the transformation is purely visual. This is an easy solution for artists, because the machine already looks mechanical, so they don't need to think about all those parts they are drawing and what sense they make. Different elements of the machine get transformed into parts of the robot based exclusively on their visual appearance. And so, anything round may become a joint, anything oblong can be part of a hand or leg, and anything that has two holes in it can be the head. Any notion of structural consistency, fitting the actuators in there or powering them is completely ignored. You basically get a junk sculpture.

Note that this mistake is often made in a smaller degree when designing parts of the robot. The artists will often look for photos of machinery, and incorporate patterns they saw in them in their robot designs. And since it's all purely visual, it will rarely make any sense.

## Robo Tank

There is a whole category of military mecha, called "smart tanks", which is basically a tank on legs. Sometimes spider-like, sometimes more humanoid or mammal-like, they are supposed to replace the modern tanks giving more mobility, speed, all-terrain capability and awesomeness. In an attempt to make them look realistic, they often use elements borrowed from modern-day combat vehicles and hardware, and they are painted brown (brown is more realistic). That's where their realism ends, though.

You see, the armored vehicles have this particular shape and armor to make them fast and well protected while they travel on wheels or tracks. Just replacing the tracks with spider legs is not going to do much good. First of all, the legs are incredibly vulnerable. Any hit in there is going to immobilize the vehicle, and immobilized tank on the battlefield quickly turns into a pile of scrap metal, no matter how much armor it has on all its other parts. And no, you can't really properly armor thin, long legs protruding from the tank in all directions. There are more problems. The tanks have this particular flat shape to make their profile as low as possible, and all surfaces angled, so that they are harder to hit directly. Taking that and putting it several meters up in the air on legs kinda cancels the whole design, and makes it useless. Lastly, there is the problem of the crew having to survive large accelerations while the vehicle runs in leaps and bounds across the battlefield to avoid being hit. The stresses are much worse, because the mechas are so large and heavy.

If we will have walking robots in the army, they won't look like huge spiders with tanks for bodies. They will probably be small, lightly armored and most likely remote controlled or autonomous.

## Robo Washer

We already have robots in our homes, in a sense. Take the washing machine -- it automates a large part of the process of doing the laundry. But whether it's a washing machine, roomba, electric shaver, sewing machine or food processor, one thing among them is common -- they do the equivalent of common human jobs, but they do them completely differently than humans. The washing machine looks and works completely different than a washerwoman. The sewing machine uses two strings, not one, and makes completely different stitches. Optimal ways to do things with a machine may be completely different from the optimal ways to do them by hand.

The same applies to the many menial jobs done by robots in science fiction. Robot-guards patrolling around, instead of a fixed sensor network and an alarm system. Robot-repairers, instead of replaceable modules. Robot-window-washers, instead of a washing system built into them. You know how a reasonable robot-soldier looks like? It's oblong, with fins at one end, has explosives inside and you shoot it from a ship or plane at the target.

## Robo Robot

Of course the best approach to the problem is to actually sit down with the engineers, think about what the robot is supposed to do in the fictional world (not just as a plot device) and design a machine for doing that. Then build a prototype and test it, working around any technology differences between the fantasy world and reality. Rinse and repeat until satisfied. Of course that's horribly costly and inevitably produces very dull designs...

Interestingly, some of the robots from Star Wars were designed that way. You get much better grounding in reality when you have to build actual physical props, and not rely on computer graphics.

# Individual Aspects

## Degrees of Freedom

Simplifying a little, the number of degrees of freedom is basically the number of ways the robot can bend its limbs. Each degree of freedom means another actuator and another complication in the control code, so you usually want as few degrees of freedom as possible. On the other hand, you want to have enough of them to have the robot move properly and be able to reach into all the necessary places.

For instance, for a properly walking robot you will need at least three degrees of freedom per leg. One or two more if you need to control the angles at which the feet touch the ground. A robot with fewer degrees of freedom will have its legs slip when walking or when turning, damaging the legs and the ground -- a little bit how a tank damages the ground when it turns on the tracks. Its movements will also be much more imprecise because of that.

On the other hand, especially when you are mimicking an animal, you might be tempted to give the robot much more degrees of freedom than needed. Animals have an insane number of degrees of freedom in their bodies, 80 and more depending how you count (Did you know that each individual hair in the fur has a muscle that raises it? That means each hair adds a degree of freedom...). That's because evolution is wasteful in the short term, and it likes to keep options for further evolution. So unless you have exceptionally light and strong actuators, infinite power supply and control programs orders of magnitude better than what we have today, you want to limit the ways in which your robots can move.

## Stride Length

Believe it or not, but the shape of your robot's legs has a direct impact on how fast and over what terrain it can move. The longer the steps it can make, the faster it will be, assuming a constant rate of steps. On the other hand, the higher it raises its legs, the rougher terrain it can negotiate. However, since raising the leg also takes time, you don't want to do it unnecessarily, so it's best to have appropriate sensors for that. Now, the longer the leg, the heavier it is and the longer is the lever on which the whole robot has to be carried -- so the stronger actuators are required. It means that longer legs tend to move slower...

All in all, it's an exercise in trade-offs. And to decide on the trade-offs, you have to know what is actually needed -- how fast and over what terrain your robot is going to move. But there are also combinations that are to be avoided, because they are ridiculous. If your robot has one segment of its legs very long, but other segments very short, it gets the penalty for long legs, but no bonus for stride length -- because it can still only make very small movements with that leg in straight lines. Same goes for the allowed angle of movement -- if it's very constrained, it doesn't make much sense.

## Leg Strength

How strong should each segment of the leg be? Obviously, it needs to be able to at least support its part of the weight of the robot, and whatever additional cargo it carries. Plus it needs to withstand, and possibly even absorb, the shocks from the legs hitting the ground or starting/stopping suddenly. That means that the legs would probably have to be made from materials as strong and thick as the main body, or better. And they would need to be pretty much the same thickness throughout, no silly large bulky feet at the ends of scrawny thin legs or the opposite — insect legs ending with a spike.

How about the thickness of the joints? Obviously this depends on what kind of actuators you have, how strong they need to be, and where you want to put them for each of the joint, but generally they would be about the same size as the rest of the leg, perhaps a little bit smaller, if made of solid material.

For animals, eyes are very complex, very delicate and very precious parts. Large animals only have one pair of them, so they need to be carefully placed to make the best use of them. They also need to be protected both passively (eyebrows) and actively (blinking).

Not so much for robots. Cameras are pretty cheap to make, and other kinds of visual sensors (reflective or even time-of-flight) are even cheaper. Lidars are a bit obnoxious, with their need to rotate and to be unobscured, but I can imagine that technology improving rapidly as it gets more common. Unless you require a high-quality high-precision or otherwise specialized image data, there is no reason for your robot to even have a head. You can just put the cameras all over it, especially on the hands.

There is also no reason, unless it is being tele-operated by a human, for a robot to have a normal human-like RGB vision. Sensors sensitive to a wider spectrum of light are actually cheaper (no need for filters) and more sensitive. And if it's an expensive robot, why not give it full-spectrum, light-field cameras that are also sensitive to polarization? One look at a surface would tell it what it is made of! It's similar with hearing. No need to have a pair of ears on the sides of the head. An array of directional microphones, together with vibration sensors on the feet and fingers would work so much better. There are also active sensors: sonar, radar, lidar, metal detector, etc. And the senses we don't have or have in a very poor way: electric, magnetic, radiation, chemicals, temperature, atmospheric pressure, etc.

Of course, a robot will only have the senses that it actually needs to do its work. An exploration or combat robot would probably have every single sensor they can cram in it, and more, but a more specialized one would only have the necessary subset.

While the sensors themselves are relatively cheap, both in terms of monetary cost and design trade-offs, the bandwidth and computing power necessary to process them are not. There will probably be significant progress in this area by the time we actually have usable walking robots, but I don't expect miracles. So while the robot will probably have "eyes" all over its body, it will still probably mostly focus on a few of them at a time.

## Size

Movie robots basically have four sizes: pet, man, car, giant.

It doesn't make much sense to have a robot smaller than, say, a cat in a movie, unless you are doing some macro-photography shots, because it simply wouldn't be visible on the screen. At this size it will also often need to fly, jump or climb vertical surfaces — so that it can navigate the same environment as humans do.

Man-sized robots vary from a child to an overgrown thug, but are generally designed to act the roles that a human would do if only the settings was less high-tech.

Car-sized mecha are perceived more like vehicles, whether autonomous or manned, and will therefore be mostly used for transportation, exploration and maybe combat.

Finally Japanese giant robots are a category of their own.

Real world is not nearly as well classified. We have (or can conceive of) robots as small as a few molecules, through insect and mouse sizes, to cat, dog, and child. Man-sized robots are already difficult, but exist, despite their poor usefulness, mostly as research or entertainment pieces. There are a few walking vehicles out there, mostly as extreme terrain solutions. No practical giant robots in the foreseeable future, apart from some publicity stunts.

As a rule of thumb, you want the robot to be as small as possible, while still containing all the components it needs, and having enough reach to freely move in the environment for which it is designed. Anything larger, and you start paying for this because of the cube law. Anything smaller will have problems executing its tasks.

For interaction with humans, you probably need the cat size to be noticed at all, and the child size to actually have face-to-face interactions. For merely using human equipment, probably something the size of an orangutan is sufficient.

## Weight

Ideally, you also want your robots to weight as little as possible. When walking, you have to spend energy on carrying all of that weight. So no thick metal armor, even for the military robots — you want to use modern, strong and light materials. The bulk of the robot will probably be its power source, then the actuators, the skeleton, and all the rest.

Since biological muscles have such a great energy density compared to the actuators we have, a robot as strong (or stronger) as a human will probably be considerably heavier than an average man, even without any armor — weighting easily 2x or 3x times more. An armored robot could be even heavier. On the other hand, we can better distribute the strength in our designs, so the robots probably won't need to be as strong as humans to perform the same tasks — and conversely, not as heavy.

## Shape

Unless it's an entertainment piece, or a teleoperated servo, there is no reason why such a robot should have exactly two legs, two arms and be human-shaped. Even for operating in human environments and using human tools, something like the robo-simian might make more sense.

We have two long legs, because that turns out to be the most efficient energetically, and we evolved to pursue our prey until it dies of exhaustion. However, if you need a robot that can move around with maximum energetic efficiency, you simply give it wheels. Or a hybrid leg/wheel solution, if it also needs to be all-terrain. So two legs don't make much sense when four give much better stability and versatility. Six legs might make sense in some use cases, both for increased stability and speed, and for redundancy. More than six probably doesn't improve things much.

The simplest robots won't need hands at all. They might have a gripper attached directly to their body. More complex robots would probably have one or two universal arms, and possibly additional specialized arms with tools and sensors. This is generally highly dependent on the robot's purpose.

As we already saw before, no head is necessary, as well as no tail. Specialized arms can fill those roles better.

## Clothes

Intuitively, why should a robot need clothes? In the movies robots are naked to show off their mechanical nature. In reality, some forms of clothing is actually useful for machines.

Military robots will need armor. We already noted that metal armor is probably too heavy for them — they will probably be armored with something similar to the bulletproof jacket.

Even robots that don't need armor will need some environmental protection. They don't need to keep themselves warm, probably, but they need to have their joints protected from dust and sand, their sensors protected from scratches and their inside protected from water. Textiles are lighter and easier to maintain than a rigid shell.

The utility robots will also probably need to be marked in some ways, so that we know which is which.

3. ### Small Robots

In which we learn why it's much easier to build small robots than large ones.

# The Cube Law

A lot of reasons for making your robots small comes from the cube law. This law gives you the relation between the size of an object and its volume (there is also the square law, that gives you the relation between the size and the area). It says that as your robot grows in size, its volume will grow proportionally to the third power of that size (also called cube, hence the law's name). Consider the following example:

(I'm assuming that in both cases the average density of the robot doesn't change, that is, that it's not almost empty in the second case. As we will see later, that's quite accurate, or even optimistic.)

# Actuator Strength

"Actuator" is a fancy name for whatever makes your robot move: servo, motor, artificial muscle, memory metal, hydraulics, pneumatics, etc. As the size and weight of your robot grows, so has to the strength of the actuators it uses.

For instance, consider a servo. Its strength (in this case called torque) is usually expressed in kilograms (of force) times centimeters, or newton meters. If a servo has 1kg×cm of torque, it means it can lift 1kg of weight on a 1cm long lever. Since the levers scale linearly, it means it could also lift 0.5kg on 2cm long lever, or 2kg on 0.5cm long lever, etc. You can see already that if you make the robot's legs twice as long, you will need twice as much torque. But that's assuming that the weight remains the same. From the cube law you know, that the weight is going to grow fast, so in reality larger robots will need a lot more torque.

But there is another thing. The smaller the servos, the lighter and cheaper they are. Sure, the torque also gets smaller, but not nearly as fast. Consider those two example servos:

As you can see, the smaller servo can raise itself on a lever half a meter long! The larger one, almost 10 times heavier and over 20 times stronger, can only do 125cm. And it will be similar with any other parameter: price, speed, amount of current needed, etc. At some point the parameters will be so bad, that you will have to switch to hydraulics.

# Material Strength

It's not just the actuators that need to be stronger. They are connected to the structural elements, that have to bear all that force too. And thanks to the cube law, it doesn't suffice for them to be just longer and thicker -- they actually have to be made from stronger and lighter materials.

Stronger materials are harder to machine and generally work with. You can no longer get away with hot-gluing parts together: you will need nuts and bolts, and possibly also special mechanical design. And you will need specialized tools.

And when you finally get your robot together, it will be very fragile. Why do you think all those large robots in laboratories always operate with a safety line hanging from the ceiling over them? That's because if they fall down, they will smash into pieces. The materials they use are strong enough to hold them together, but not strong enough to survive a fall.

On the other hand, my smallest robots survived repeated falls from my desk to the floor without even a scratch. If you make a robot the size of a cockroach, you can drop it from the roof of a building. It will simply not gain enough speed falling through the air to damage it on impacting the floor.

# Inertia

So you finished your large robot, and now you are programming it. For a start, you just make the limbs move straight to their destinations and stopping once they get there. Your robot falls, the limbs break off, the servos strip gears and there are huge spikes of current drawn from the battery. What happens?

Well, you cannot just move a heavy object with high speed and then have it stop instantly. Inertia will make it keep on moving, and the servomechanisms will need to do a lot of extra work (and endure great forces of stress) to stop it and move it back where it belongs. That also applies when moving the whole body of the robot while walking -- your effective Zero Movement Point no longer coincides with the center of mass of your robot. You have to start taking the speed and acceleration into consideration in your motion planning, and thus all your movement equations become second degree differential equations without a closed-form solution. Yay!

On the other hand, if you keep the robot small, all its elements light and the servos have abundance of power, you can pretty much ignore inertia and get away with writing much simpler code that only takes into account the current positions of the limbs.

# Safety

So you think you have the budget, you have the materials and tools, you have the programming expertise and strong servos to handle the inertia, what could possibly happen.

Just watch this video by Trossen Robotics:

Strong servos, larger batteries, high currents, long reach of the limbs, high movement speeds -- it all means trouble. You will need safety measures. Force stop buttons, one on the robot itself (hardware, brutally cutting the power), and one remote (so that you don't have to chase your robot through a hole in made in the wall). Suspensions mechanisms. Safety gear for you to wear. Fire extinguisher capable of containing a LiPo battery fire. Circuit breakers. Someone to check periodically if you are trapped under your robot's weight...

It's all extra work, extra cost and extra risk. Why take it, if you can instead have a robot the size of a hamster that behaves funny when something goes wrong, and tickles instead of crushing your bones?

# Convenience

I left the most important reason for the end. Small robots are convenient.

You can work with them directly on your desktop, connect them to your computer, adjust easily with just a screwdriver. You can store them in your drawer. You can recharge them from your phone charger. You can take them with you to conferences and workshops. You can fly with them in your carry-on baggage (as long as they don't have anything that looks like a clock on them). When something goes wrong or breaks, you can simply pick them up and fix.

Not so easy with larger robots. You will need to test them on the floor, in a garage or even outside. You will need a complete suite of tools to work on them, and a dedicated storage space to keep them. Special battery charger. Taking them anywhere involves careful packaging or even loading onto a car. For flight, you have to remove anything that is sensitive to low temperature and pressure, as it's going to go in the check-in baggage. Also be prepared to have to re-fasten all the screws on it that came loose due to vibrations. When something goes wrong or breaks, you have to call the mason to fix your house...

# Conclusion

Make your robots as small, as practically possible.