The Walking Bot: a machine that crosses the table on legs, not wheels. It has one motor, at the front. A set of linked bars turns the motor’s spin into steps.
It only does two things: forward and backward. It cannot steer. That is fine. It is meant to be that way. All the motor’s power goes on the hard part. It must lift the machine up and put it down, again and again.
You have used a Large Motor before, with the Driving Base and the Folding Fan. Nobody told you why it had to be that one. Today you find out. You will even feel the answer. With the wrong motor, this robot does not go slowly. It stops dead.
In the real world 5 min
Where you have seen it
People hardly ever build machines that walk. We use wheels, because wheels are simple and roads are flat. Legs are for bumpy ground. Rescue robots climb over broken buildings. Some machines walk across sand. And animals had legs long before us!
One of Theo Jansen’s Strandbeesten. It is a walking machine made of plastic tubes. One turning rod drives rows of linked legs, just like your model. Photo: Axel Hindemith / Wikimedia Commons (Public domain).
Why it is built that way
A wheel holds the robot up all the time it turns. A leg does not. It has to lift the machine, swing it forward and put it down. So at every step, one motor lifts the whole robot.
That job needs force, not speed. Jansen’s beach beasts are pushed along by the wind. Wind is not very strong. So he gave them long legs and gears. A slow, steady turn becomes a strong step. Here, slow is not a problem. Slow is the plan.
What would go wrong without it
Put a fast, weak motor on a machine with legs. It does something that puzzles people. It makes a noise and goes nowhere. The motor pushes as hard as it can, but the robot will not move.
It looks like a flat battery, a stuck gear or a bug in the program. It is none of those. It is the wrong motor.
A motor that whines but does not move is not broken. It is being asked to push harder than it can.
The main concept — force, not speed 6 min
The EV3 has two kinds of motor. One is fast and one is strong. You cannot have both in one motor.
Large Motor — strong
Medium Motor — fast
The two motors side by side, at the same size. The Large Motor is longer and heavier. It has more gears inside, and the gears make it strong.
Motor
Turning force
Top speed
Use it for
Large Motor
High
Lower
Driving wheels, walking legs, lifting. Anything that moves the whole robot.
Medium Motor
Lower
High
Arms, gates, jaws, launchers. Light things that must move quickly.
The word for turning force is torque. Torque is not the same as speed. Speed is how fast the motor turns. Torque is how hard it can push while it turns. The Large Motor has more gears inside. The gears swap some speed for more torque. You saw this swap with the Gear Bot and the EV3 Fan. This time, it is built inside the motor.
when program starts
A run clockwise for 1rotations
and on the Large Motor, only the port changes
B run clockwise for 1rotations
0%medium lifted0%large liftednoneload
Medium: not enough forceLarge: slower, but it lifts
) : clock.step === 1 ? (
With nothing to lift, the Medium Motor is quicker
The same program, the same arm, one on each motor. Nothing to lift yet.No load: the Medium Motor is clearly the quicker of the two.Now hang a heavy weight on both arms and run exactly the same program.The Medium Motor stalls a third of the way up. The Large Motor keeps lifting.Same program, same weight — the motor was the difference.Finished — it will run again in a moment.
at rest
Turning the speed up would not rescue the Medium Motor here — a stalled motor needs more force, which means gearing it down or using the Large Motor.
Pick the motor for the job, not the bigger one. For heavy and slow, use the Large Motor. For light and quick, use the Medium Motor.
▶The Large Motor, and copying animalsAll about this motor, and about biomimetics. That means copying living things, like the animals many of our models look like.Show meHide
ComponentMotion4 min
The Large Motor
The Large Motor is the bigger of the two EV3 motors. It turns more slowly than the Medium Motor but pushes far harder, which is why it drives wheels and lifts loads. If a mechanism struggles or stalls with a Medium Motor, this is usually the answer.
Large Motor
Medium Motor
The two motors at the same scale. The Large Motor is visibly bigger and heavier — that extra size is what gives it more turning force and less speed.
Blocks reference
Block
What it does
[B v] run [clockwise v] for (3) [rotations v] :: motors
Turns the motor a measured amount, then stops.
[B v] run [clockwise v] for (2) [seconds v] :: motors
Turns it for a length of time rather than a distance, then stops — however far the shaft actually got.
[B v] set speed to (40) % :: motors
Sets how fast the next movement will be.
[B v] start motor [clockwise v] :: motors
Starts it turning and carries straight on.
Watch them race, then watch them lift
Give both motors the same program and the same arm. With nothing on the arm the Medium Motor wins easily — which is why it is tempting to treat it as simply the better motor. Then the demo hangs a weight on both arms and runs it again.
when program starts
A run clockwise for 1rotations
and on the Large Motor, only the port changes
B run clockwise for 1rotations
0%medium lifted0%large liftednoneload
Medium: not enough forceLarge: slower, but it lifts
) : clock.step === 1 ? (
With nothing to lift, the Medium Motor is quicker
The same program, the same arm, one on each motor. Nothing to lift yet.No load: the Medium Motor is clearly the quicker of the two.Now hang a heavy weight on both arms and run exactly the same program.The Medium Motor stalls a third of the way up. The Large Motor keeps lifting.Same program, same weight — the motor was the difference.Finished — it will run again in a moment.
at rest
Turning the speed up would not rescue the Medium Motor here — a stalled motor needs more force, which means gearing it down or using the Large Motor.
That is the whole difference. The Medium Motor is quicker; the Large Motor is stronger. A motor that cannot produce enough force does not move slowly — it stops altogether and strains, which is the buzzing, going-nowhere failure almost every LEGO builder meets sooner or later.
A stalled Large Motor hangs the program too
Being stronger buys the Large Motor a bigger load, not an infinite one. Every winch runs out of cable and every lift reaches the top of its rails, and when a motor arrives at a limit it stalls: the shaft stops turning and the motor sits there straining.
That is a problem for the program, not just the mechanism. run for (3) rotations does not finish when three rotations’ worth of time has gone by — it finishes when the shaft has actually turned three times. A winch that reaches the top after two and a half will never report three, so the block waits, and every block after it is unreachable. Nothing crashes. The motor keeps pushing and the rest of the program simply never happens.
The third setting in that dropdown is the way out. for () seconds drives the motor for a duration and then stops regardless, so it always finishes and the program always moves on. Drive into a limit slowly, for a comfortably long time, and then call that position zero:
when program starts :: events hat
[B v] set speed to (30) % :: motors
[B v] run [counterclockwise v] for (3) [seconds v] :: motors
[B v] reset degrees counted :: motors
The lift ends up against its own stop, the encoder is zeroed there, and every measured move afterwards starts from a place you know. The rule is the same for both motors: if the movement ends against something solid, run for seconds; if it ends somewhere in the middle, measure it. The Medium Motor module has the animation for it — see The Medium Motor, which is where this bites hardest, because a Medium Motor is usually the one doing the lifting.
Which motor for which job
Large Motor — wheels, winches, anything lifting weight. Strong, slower. Normally ports B and C.
Medium Motor — arms, gates, jaws, pointers. Quick, lighter. Normally ports A and D.
The blocks are identical apart from the port letter, so swapping one motor for the other is a build change, not a programming change.
Why it matters
Real machines match the motor to the load. A lift uses a powerful, slow motor; the button panel beside it uses tiny ones. Choosing the wrong size is the most common reason a LEGO mechanism whines but does not move.
ComponentMechanics5 min
Biomimetic mechanisms
Biomimetics is copying a solution from nature. Not the look of an animal — the mechanism. Wheels are a human invention and a very good one, but nothing in nature has them, and there are places a walking machine goes that a wheeled one cannot.
The idea that has to land first
Nothing in a walking robot walks. There is a motor going round and round at a perfectly steady rate — the same motion that drives a car — and a linkage: a set of bars pinned together whose shape turns that circle into a footstep.
Push down, lift, swing forward, put down. No sensor decides when to do each part, and no block in the program says step. The bars do it, because of how long they are and where they are pinned.
1motor, turning one waydownnear foot½turn between the legs
rotation ina stride outno sensors, no code
One motor, turning steadily — the same motion that drives a wheel. Nothing here speeds up, slows down or reverses.Watch the foot rather than the crank. It is flat and slow along the ground, then lifts and swings quickly over the top.The two legs are half a turn apart, so one foot is always down. That is what stops the body dropping between steps.Finished. A steady circle in, a stride out — and not one part of it was told to walk.
still
The faint circle is the crank pin. The green outline is where the foot goes. They are driven by the same axle and they are not remotely the same shape — that difference is the linkage.
The two paths on that stage are the whole module. The crank pin travels a perfect circle. The foot travels something flat along the bottom and arched over the top — and they are driven by the same axle at the same speed. Everything between them is link lengths.
Why the foot path matters
Flat along the bottom. While the foot is on the ground it must travel in a straight line at a steady rate, or the body bounces and the robot shuffles instead of walking.
Lifted on the return. High enough to clear the ground and whatever is on it. A higher arch climbs better and wastes more effort.
Legs out of phase. With legs half a turn apart there is always a foot down, so the body never drops. Four or six legs in pairs is steadier still — which is why insects keep three feet down at a time and are almost impossible to knock over.
The famous designs are worth looking up by name: Jansen linkages (the strandbeest walkers), Klann linkages, and the four-bar “Chebyshev” walker. All of them are the same trick with different numbers.
Other things worth copying
In nature
As a mechanism
A caterpillar or inchworm
Anchor one end, contract, anchor the other, extend. Slow, and it climbs anything.
A fish tail or a snake
A chain of segments swung out of phase — a travelling wave that pushes backwards.
A bird wing
A four-bar linkage that flaps and feathers at once, from one rotation.
A hand or a claw
Linked fingers driven from a single input, so they close around a shape rather than onto a fixed position — a lever chain that adapts by itself.
Walking versus wheels
Be honest about the trade, because it is the engineering content of the whole topic. Wheels are far more efficient, far simpler and far faster on anything flat. Legs are worth their complexity when the ground is not flat: steps, rubble, soft sand, gaps. A walking machine chooses where to put its feet; a wheel has to roll over everything in between.
Building one out of LEGO
Link lengths are everything, and a stud out is a broken gait. Build one leg, get its foot path right, and only then copy it.
Legs need to be built in mirrored pairs on a common axle, half a turn apart. Getting that phase wrong is the usual reason a walker rocks in place.
Walking is hard work — expect to gear down heavily, and expect it to be slow.
A tall walker tips easily. Keep the Brick low and the stance wide — see Centre of gravity.
Why it matters
Robots that copy animals are how machines reach places wheels cannot: search and rescue in collapsed buildings, inspection inside pipes, planetary rovers over loose ground. Studying the mechanism instead of the appearance is what turns an interesting animal into a working machine.
Say this back before moving on: “Torque is how hard a motor can push. The Large Motor has more of it, but less speed.”
What’s in this build 4 min
There are two electronic parts again. Now you know enough to say why it is this motor, not the other one.
Part
What it is doing here
EV3 Intelligent Brick
Runs the program. It is also most of the weight the legs must carry. This machine mostly carries its own battery around!
Large Motor
Drives the front legs through the linked bars. It lifts the whole model at every step. That is the hardest job a motor has had so far.
The parts that do the walking have no cables
Look at the back of your model. The back legs are fixed and joined to nothing. They end in a small wheel. Only the front legs are moved by the motor.
Turn the round end of the motor slowly by hand. Watch one front leg. Does it go round in a circle? Or does it lift, reach forward, press down and pull back?
Keep turning and count. How many turns make one whole step?
Now watch the back. The back legs never lift. They slide along on their wheel. The front legs do all the work.
Those linked bars are the clever part of this model. They have no electronics at all. One turning rod and a few bars of different lengths turn a circle into a step.
Ports — and the rule 4 min
Sensors go in ports 1, 2, 3, 4. Motors go in ports A, B, C, D. You cannot swap them. If you do, nothing warns you. The robot just will not work.
Part
Port
Why this one
Large Motor (drives the front legs)
A
One motor doing its own job goes in A. It is not B or C. Those two are for a robot with two driving wheels. This machine has no wheels like that.
Sensors
none
The Walking Bot cannot see, feel or steer. It walks the way you point it.
Check your own build now:
Motor cable in port A. That is a letter, not a number.
Turn the motor one full circle by hand. It should feel stiff but smooth. If it gets stuck, a leg is hitting the frame. Fix that before you switch on. If not, the motor will try to force it.
Route the cable over the top of the model. A cable hanging between the legs will trip it. Then you will spend the lesson blaming the program!
Stand the model on a flat table, not on carpet. Legs need grip, but carpet grabs them too much.
Connect the Brick 4 min
Two routes, and either is fine. USB is the reliable one and the one to fall back on when a room’s Bluetooth is busy; Bluetooth leaves the robot free to move, which some models need.
▶How to connect the BrickUSB and Bluetooth, step by step, with a photograph of every screen. Open it if you have not done this before — or if pairing is not working.Show meHide
USB — the reliable one
Switch the Brick on with the dark grey centre button.
Cable into the Brick’s PC port — the small square socket beside the numbered ports, not one of the numbered ones.
Other end into the computer.
Bluetooth — name it first
Do these in order. Naming the Brick after you go looking for it in the list is how groups end up driving each other’s robots.
Name your Brick. On the Brick: Settings (the spanner) → Brick Name. Type something nobody else will pick, then press the tick. Every Brick is called EV3 until somebody changes it.
Turn Bluetooth on. Settings → Bluetooth. Tick Bluetooth and Visibility. Leave iPhone/iPad/iPod unticked.
Connect from EV3 Classroom. Click the Brick icon at the top of the programming area, find your Brick by name, and click Connect.
Say yes on the Brick. It asks “Connect?” with the computer’s name — choose the tick, then accept the passkey, which is already 1234.
Where to read it. The name sits in the bar across the very top of the screen, on every screen — so you can check which Brick you are holding at any moment without going into a menu. This one is EV3VE. A Brick nobody has renamed says EV3.Step 3, and the reason step 1 exists. Three Bricks in range — read the name before you click Connect. Pairing with the wrong one is not an error: it works perfectly, on somebody else’s robot.
Step 2.Bluetooth switches the radio on; Visibility is what lets the computer find you. With Visibility off your Brick works perfectly and simply never appears in the list.Step 4. Look at the Brick. It asks whether to accept and names the computer. Choose the tick.Then the passkey, already 1234. Press the tick again and you are connected.
The two failures, every class, every time. The Brick has gone to sleep while you were building — press the centre button to wake it. Or you have paired with the group at the next table, which is why the name matters.
The long version, including Port View and how to read the port tiles, is in the Brick & Bluetooth guide.
Bluetooth is worth the trouble today. This machine walks away from you. A USB cable acts like a dog lead. After about twenty centimetres, it pulls the robot off course. If you must use USB, leave the cable loose. If a walk looks crooked, test it again.
Confirm the connection 2 min
Check the Brick icon: is it connected or not?
Check the port tiles. One motor on A, and nothing anywhere else.
Read what kind of motor the tile says it is. This is today’s big check. The software can tell a Large Motor from a Medium one. Today, it should say Large.
Turn the motor by hand and watch the degrees counted change.
If the tile says Medium Motor, you have the wrong motor. Swap it now. No program can fix it later.
Change it and test 8 min
Make one change at a time, and guess what will happen before each run. Put a piece of tape where it starts. Then you can measure how far it really goes.
Set the speed to 15 %. Will six rotations still take it just as far? Guess first. It should! The rotations decide how far it goes. The speed only decides how long it takes.
Now 100 %. Guess again, then measure. Most groups find it goes less far. The feet start to slip instead of grip.
Change both rotation numbers to 3. That is half the walk, out and back. Does it still come back to the tape?
Put something heavy on it: a spare Brick, a pencil case or a book. Run the first program again at 40 %. Does it still walk?
Keep adding weight until it stops walking. That is the most your motor can carry. You found it out by testing, not by being told.
Step 2 is the surprise. Faster does not mean further. Somewhere between 40 % and 100 %, the feet stop gripping. Any more speed is wasted on slipping. Real walking robots have the very same problem.
This is what you are building: the Walking Bot.
Make it move 10 min
Five blocks: walk out, stop, walk back. Use rotations, not degrees. The motor goes round and round, so we count whole turns.
when program starts :: events hat
[A v] set speed to (40) % :: motors
[A v] run [clockwise v] for (6) [rotations v] :: motors
wait (1) seconds
[A v] run [counterclockwise v] for (6) [rotations v] :: motors
Six turns forward. A short stop, so you can see how far it got. Then six turns back.
Go through it in the order the Brick runs it:
set speed to 40 % — low, on purpose. At full speed, a robot with legs slips about instead of stepping.
run clockwise for 6 rotations — six turns of the motor. That makes a few steps. The program waits here until the walking is done.
wait 1 second — nothing moves. Now you can see where the walk out ended.
run counterclockwise for 6 rotations — the same six turns the other way. It should end up near where it started.
What success looks like: a slow, careful walk in a fairly straight line. The body rocks a little with each step. The walk back ends near the start. We say "near" because legs slip. A walking robot never ends in exactly the same place twice.
If it buzzes but does not walk, do not turn the speed up. That makes it worse. Lift the model up. Do the legs move freely in the air? If they do, the legs are fine. The robot is too heavy to move. Check that nothing is catching. Check that the tile really says Large Motor.
Build it 15 min
Build the model before you read any further. Everything after this is about making it do something, and none of it will make much sense with nothing on the table in front of you.
One page at a time — use Next and Previous, or the ← → keys. Fullscreen makes it big enough to build from.
Check the finished build against the picture before you switch anything on. A motor mounted the wrong way round is far easier to spot now than it is to debug later, when it looks like a program fault.
Challenges 27 min
Work through them in order — each is harder than the last. The extra challenge comes after all three, and it is meant to make you plan before you build.
Challenge 1
Walk to a mark and stop there. Put a piece of tape on the table one metre from the start line. Find the number of rotations that gets your bot to it. You may run it as many times as you like to find the number. But the last three runs must all reach the tape. You may not change anything between them.
Challenge 2
Out and back to the same place. Your bot must walk away, pause, and come back. It must end on the start line, not just near it. Legs slip, so this is harder than it looks. Choose your speed from what you tested, not from habit. Say which speed you chose and why.
Challenge 3
Find your motor's limit and prove it. Load the bot with more and more weight until it stops walking. Test at three different speeds. Write down the load that stopped it at each speed. Then use your numbers to answer this. Does a slower speed let it carry more, or less?
Extra challenge
Give the bot a real job: a delivery walk.
Your Walking Bot must carry a load. The load must weigh at least as much as a spare Brick. It walks from a start line to a target you set. The target must be at least a metre away. It must not put the load down, and it must reach the target still walking. Then it must walk back by its own program. No one may move it.
Plan on paper before you build. A bot with a load does not walk like an empty one. It takes shorter steps and slips more. So how will you find the right number of rotations with the load? Do not just use the number from the empty bot.
You will be asked two questions when you show it. Why is a Large Motor the right choice here? Say it in your own words, and use something you measured. And what happened to your distance per rotation when you added the load? Why?