The Toddle Bot: a robot with no wheels. It walks by rocking. Two Large Motors rock its body from side to side. Each rock moves it a little further forward.
It is a LEGO Official model. It is one of the cleverest walkers in the set. It has no real legs. Its body just leans left, then leans right. Somehow, it ends up across the table!
On this model, a program that looks fine can break the robot. Not fail. Not fall over. Break. The two motors are joined by one axle, like on the Castle Gate in Lesson 24. Say your program tells them to turn opposite ways. Then they fight each other. They keep pushing until something snaps.
Read section 4 before you add a single block.
In the real world 5 min
Where you have seen it
A penguin. Penguins have short legs. They cannot take big steps. So they rock their whole body from one foot to the other. It works well! A king penguin can walk for kilometres across the ice like that.
King penguins walking by the water, Tierra del Fuego. Photo: amanderson2 / Wikimedia Commons (CC BY 2.0).
Why it is built that way
Rocking is a good way to walk. Lifting a leg and carrying it forward is hard work on every step. Instead, you lean to one side. The other foot swings forward. Then you lean back. Gravity does some of the work.
Waddling looks funny. But it is very clever. You need almost no legs to do it. That is why it suits a robot made from a Brick and two motors.
What would go wrong without it
Now for the part that matters today. A penguin’s two legs are joined by its hips and its body. They cannot go in opposite directions. They are parts of the same animal.
Your Toddle Bot is the same. The two motors are joined by an axle. An axle cannot bend. Say one motor turns clockwise and the other turns counterclockwise. All that push goes into the plastic between them.
Two motors fixed to one shaft are not really two motors. They are one shaft. And the program has no way of knowing that.
The main concept — a program that can break the machine 6 min
The Brick does not know what your model looks like. It will run whatever you write. It keeps running, even while the gears break.
One axle, two motors. When they agree, they turn it together. When they disagree, nothing turns. All the force pushes into the plastic between them.
So which blocks are safe? The rule is short:
Block
Safe on this model?
move [forward v] for (1) [rotations v] :: movement
Yes. Both motors turn the same way, at the same speed.
move for (1) [rotations v] at (75) (25) % speed :: movement
No. Two different speeds on one shaft is still a fight. It is just slower.
[B v] run [clockwise v] for (1) [rotations v] :: motors
No. Only one motor turns. The other one acts like a brake.
Notice something new. Every block in that table is a normal EV3 block. But two of them will break this model. The block is not wrong. It is wrong here.
Before you write a program, find out what could break your machine. The Brick will never tell you.
▶Driving with two motors, and mechanismsHow the Movement blocks work, and how parts move without motors. Open either one if you are not sure yet.Show meHide
ComponentMotion6 min
Driving with two motors
A driving base has two Large Motors, one per wheel. You could drive them with two separate motor blocks — but they would never start at quite the same instant, and the robot would curve away. EV3 has a separate family of Movement blocks that treat the pair as a single driving base.
port B
port C
A driving base is two Large Motors, normally in ports B and C. The Movement blocks treat this pair as one machine rather than two separate motors.
Blocks reference
Block
What it does
set movement motors to [B v] and [C v] :: movement
Tells the Movement blocks which two ports are the driving wheels. Put it at the top of the program, before any movement.
move [forward v] for (2) [rotations v] :: movement
Drives both wheels together, so the robot travels in a straight line.
move for (1) [rotations v] at (75) (25) % speed :: movement
Drives the two wheels at different speeds, which makes the robot curve.
set movement speed to (50) % :: movement
Sets how fast the driving base travels from now on.
The letters must match the sockets
set movement motors to [B] and [C] is the block that decides which two motors every Movement block after it will drive. It does not look at the robot. It drives the two ports you name, whether or not there is a motor in them — so those two letters have to be the two sockets the cables are actually in.
This is the single commonest reason a driving base does nothing, and it is invisible in the program: every block is spelled correctly and the robot still will not go.
Two robots, and the very same program: drive the motors in ports B and C forward.Check the cables. The left robot's motors are in B and C — the two the block names. The right robot's are in A and B.Run it. On the left both wheels are driven and the robot goes straight. On the right only port B has a motor the block is talking to; port C is empty, and the motor in A is never mentioned.So one wheel turns and the other does not, and the robot swings round its dead wheel. Nothing failed, nothing was reported — the program drove the ports it was told to.Finished. Identical programs, identical robots — different sockets.
stopped
The yellow outline marks the two ports the block is driving. A robot only goes straight when both of them have a motor in them.
Both robots run the identical program. The left one has its motors in B and C, so both named ports have a motor and the robot drives straight. The right one is plugged into A and B: the block drives B, finds nothing in C, and never mentions the motor in A at all — so one wheel turns, one wheel sits there, and the robot swings round the dead one instead of driving.
If neither named port has a motor in it — cables in A and D, say, with the block still set to B and C — the robot does not move at all. The program runs happily to the end and the Brick reports nothing wrong, because as far as it is concerned it did exactly what it was told.
So before you look for a bug in the program, look at the cables: read the port letters off the Brick, then make the block say those two. B and C are only the usual choice, not a rule — if your build has the driving motors in A and D, set the block to A and D and everything works.
Straight, curved, and on the spot
Everything a driving base can do comes from those two speed numbers. Try each button below and watch the trail the robot leaves.
when program starts
set movement motors to B and C
move for 2rotations at 5050 % speed
50left wheel · B50right wheel · C
Equal speeds → a straight line
Both wheels are set to the same speed.Equal speeds, so the robot tracks straight — the trail is a straight line.Two rotations later it is exactly where it was pointed.Finished — it will run again in a moment.
stopped
The path is worked out from the two wheel speeds in the block, not drawn by hand — so changing the preset changes the numbers and the shape together.
Both wheels the same speed — the robot goes straight.
One wheel faster than the other — it curves towards the slower side. The bigger the difference, the tighter the curve.
One wheel forward, the other backward — it spins on the spot, which is how a robot turns in a space no wider than itself.
Notice there is no steering block anywhere in that program, and no steering part anywhere on the robot. The turn is made entirely by driving the two wheels different amounts.
when program starts :: events hat
set movement motors to [B v] and [C v] :: movement
move [forward v] for (2) [rotations v] :: movement
move for (1) [rotations v] at (50) (-50) % speed :: movement
How far is one rotation?
“Move forward 2 rotations” says nothing about the floor — it says how many times the wheels go round. How far the robot actually travels depends on how big the wheels are, and once round a standard EV3 driving wheel is about 17.5 cm.
Before doing any sums, get a feel for it. Drag the robot along and watch both scales at once — rotations on top, centimetres underneath, the same line. Land on the half marks: there is a number between 1 and 2, and it is 1.5.
Drag the robot, or use the arrow keys — it moves in half rotations. Rotations above the line, centimetres below.
1.5 rotations26.3 cm
1.5 — a half rotation past 1. Half a turn of the wheels is 8.75 cm, so halves matter.
cm=2rotations
35 ÷ 17.5 = 2. That is a number you can type straight into the block.
1 rotation = 17.5 cm. Two rotations is 35, three is 52.5.
Halves are real. 1.5 rotations is a perfectly good thing to type into the block, and it is 26.25 cm — right between the 1 and the 2 you already tried.
To go a distance you have chosen, divide by 17.5. The calculator does it, but do a few by hand first — 35 ÷ 17.5 = 2 is worth seeing.
Measure your own wheels before trusting the number. A base built with different wheels travels a different distance per rotation, and every calculation on this page moves with it.
set movement motors to [B v] and [C v] :: movement
set movement speed to (30) % :: movement
move [forward v] for (2) [rotations v] :: movement
Turning on the spot
Steering at right 100 or left 100 drives the two wheels in opposite directions, so the base stops travelling and pivots where it stands. The angle it sweeps is a simple doubling of the rotations:
Half a rotation is the one worth remembering: a square corner, 90°.
Rotations
The robot turns
0.25
45° — half a corner
0.5
90° — a square corner
1
180° — turn round and face back
2
360° — all the way round
The one to memorise is 0.5 rotations = 90°. Everything else follows from doubling or halving it.
set movement speed to (20) % :: movement
move [right: 100] for (0.5) [rotations v] :: movement
Turn slowly. The wheels on a driving base are big and the robot carries a lot of weight, so at full speed it keeps going after the motors stop and lands past the angle you asked for. Somewhere between 15% and 30% speed is where turns become repeatable. A turn that overshoots is almost always a turn taken too fast, not a wrong number.
These figures belong to your robot. The distance depends on the wheels and the angle depends on how far apart they are, so a wider base needs a different number for 90°. Test it, measure what actually happened, and adjust — the same discipline as the Gyro Sensor tolerance.
Why it matters
Every wheeled vehicle steers this way — a tank, a digger, an office chair with two driven castors. Cars use a steering rack instead, but a robot that turns by driving its wheels at different speeds needs no steering mechanism at all.
ComponentMechanics4 min
Mechanisms without motors
Some models have no motors and no sensors at all. They are not lesser lessons — they are where the physics lives. A build that stores energy, changes a force, or turns one kind of motion into another explains why the powered models later need the gearing and the speeds they do.
The one bargain behind all of it
Gears, pulleys and levers look like three different topics and are three shapes of the same deal: whatever you gain in force, you pay for in distance. Halve the effort and you move twice as far; move half as far and you need twice the effort. No arrangement of anything gives you both, and recognising that saves a great deal of time hunting for one.
What a mechanism actually does is let you spend the same effort in a form you can manage — a little at a time instead of all at once, or all at once instead of a little at a time.
How does a machine walk without ever being told to?
Friction — the one that is in all of them
Friction is what makes wheels grip and also what wastes effort. Every mesh, pin and rope turn loses a little to it, so a mechanism with more parts delivers less than the arithmetic promises. A build that binds — that is stiff to move by hand — is losing far more than that, and no amount of extra motor power fixes a mechanism that is rubbing.
Before measuring anything, turn the mechanism by hand. It should move smoothly and coast a little. If it does not, fix the build first; numbers taken off a binding mechanism describe the binding, not the idea you were trying to test.
How to investigate a mechanism
Since there is nothing to program, the work is measuring. Change one thing, keep everything else the same, and record what happened — pull the car back 5 cm, then 10, then 15, and measure how far each one travels. Three readings at each setting, not one, because a single run is not evidence.
That is genuinely how engineers test, and it is the same discipline that makes debugging a program work: change one thing at a time.
Say this back before you move on: “On this model: both motors, same way, same speed. Always.”
What’s in this build 4 min
Part
What it is doing here
EV3 Intelligent Brick
Runs the program. It is also the body that rocks. The motors swing its weight from side to side.
Large Motor ×2
Ports B and C. This time the manual tells you. That does not happen often. The two motors are joined by one axle.
The shared axle (no cable)
This is the part the whole lesson is about. Find it before you go on.
Find the axle, and prove it is shared
Turn the Brick off. This test takes thirty seconds. It teaches a lot.
Run your finger along the axle from one motor to the other. Is it one long piece, or two?
Turn one motor’s drum slowly by hand. Watch the other motor’s drum.
It turns too. You did not touch it. The axle turned it. That is what “shared” means. One motor can never move without the other.
Now imagine both motors pushing opposite ways at once. Only the plastic can give way.
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 (one side)
B
B and C are always the pair. The manual’s last step labels the two cables B and C. Follow it.
Large Motor (other side)
C
Today it matters less which motor is B and which is C. They are joined. But write down which is which anyway.
Sensors
none
The Toddle Bot just walks the way it faces.
Check your own build now:
Cables go in B and C. Letters, not numbers.
Both tiles must read the same kind of motor. Put a Large and a Medium motor on one axle, and they fight. They fight even when they agree. One is stronger than the other.
Turn the shared axle by hand, one full turn. Is it smooth all the way? Does anything catch?
Use a flat table. On carpet, a rocking walker grips on one side. Then it just spins round. It does not walk.
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 the better choice today. This robot moves about. A USB cable would pull on one side. But this robot must lean evenly to both sides.
Confirm the connection 2 min
Check the Brick icon: is it connected, or not?
A Large Motor on B and a Large Motor on C. Nothing on A or D. Nothing on the number ports.
Turn the shared axle by hand. Watch both degree counters move together. They should go up at the same speed. They count the same shaft.
Two counters moving as one proves it. These motors cannot move on their own.
Change it and test 8 min
One rule for this whole section: do not make the motors disagree. No steering. No two different speeds. No blocks for one motor. Every step below keeps both motors together.
Change the speed to 15 %. Will it go further or less far in ten rotations? Guess first. The rotations set the distance. But a slow rock may grip better.
Now 90 %. Most groups find it goes less far. A fast rock slips about instead of leaning.
Which speed takes it furthest in ten rotations? Test three speeds. Mark each one with tape on the table. Write them down.
Change forward to backward. Does it go back the same distance? A rocking walker is often better going one way. Find out which way.
Wrap it in a repeat (3) with a wait (1) seconds inside. Does stopping for a moment change how far it gets?
The experiment you are not going to run
What really happens if the motors disagree? It is a good question! The motors get stuck. The Brick keeps sending power to both of them. Then the weakest part breaks. Often it is a gear tooth. Or it is the cross-shaped hole the axle sits in.
Do not test it. You would learn one fact and lose a model. And you already know the fact now.
Engineers know what would break. They choose not to do it. Breaking it to find out is just breaking things.
This is what you are building: the Toddle Bot.
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.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
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.
Make it move 10 min
Four blocks. Every one of them talks to the pair. None talks to one motor. Today that is the safety rule.
when program starts :: events hat
set movement motors to [B v] and [C v] :: movement
set movement speed to (40) % :: movement
move [forward v] for (10) [rotations v] :: movement
One instruction for the pair. Both motors start together. They run at the same speed. They stop together. A shared axle only works this way.
Read it in the order the Brick runs it:
set movement motors to B and C — a setting. It tells the Brick these two are a pair. From now on, one block drives both.
set movement speed to 40 % — also a setting. Not too fast! A walker that rocks too fast just shakes where it is.
move forward for 10 rotations — ten turns of the shared axle. That is lots of rocks. Both motors turn the same way and at the same speed. They do it for the whole block.
What success looks like: a steady rock from side to side. The whole body leans. The robot moves slowly. It may not go in a straight line. Toddle Bots wander. That is just how they work.
Does it buzz and stay put? Stop the program straight away. Check: is one cable in A or D, not B and C? Then only one motor is working. It pushes against the motor that is not moving. That is the fight you must avoid.
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 it to a line. Put tape one metre away. Find how many rotations get the Toddle Bot to the tape. Every block must drive both motors as a pair. No blocks that move just one motor. No steering. No two different speeds. Do three runs. All three must reach the line. Change nothing between runs.
Challenge 2
Find its best speed and prove it. Test at least four speeds. Each time, see how far ten rotations take it. Do three runs at each speed. Tell us which speed won. Show your numbers. A rocking walker has one speed where it grips best. It is not the fastest one.
Challenge 3
Make it walk out, stop for a bit, and walk back to its start line. It will not land in just the right spot. Its legs slip. So first, try it five times. Each time, measure how far off it lands. Then change how far it walks back, to make up for the slip. Show that your fix really helps.
Extra challenge
Write a safety note another class could follow.
Your Toddle Bot must finish a trip you plan. It must be at least two metres long. It must stop at least once on the way. Use only blocks that drive both motors as a pair. Also write a note for the next person who builds this model. Tell them what they must never do to it, and why.
Plan on paper before you build. Look at every block that makes EV3 motors move. Sort them into two lists: safe on this model, and not safe on this model. That list is your note.
Two questions when you show it. Point at any block in your program. How do you know it keeps both motors in step? And say the two motors did not agree. What would break first? The motor, the axle, or something else?