Balancing Robot Lab teaching notes
For middle and high school physics, computer science and robotics teachers. These notes cover a first period, the levels, the misconceptions the app is built to confront, and what it leaves out.
Using this with a class? Make a free class and add your students yourself: each gets a username and password, with no email or Google account needed. Or give them one join code. Using Google Classroom? Post the link there; with a free class, the link also puts each student in your class, so you see their work. mytekDev is also available from the Google Workspace Marketplace, so your school's Google admin can install it for everyone.A first lesson: Open it on the projector at Level 1 and press play. The starter program does nothing, and the robot tips over in under a second. Ask the class what the program would have to do to stop it. Take the answer that sounds like "drive the wheels toward the way it is leaning" and type it in as Level 2. Then ask: how hard should it push? Level 3 lets them find out by turning one number.
Set up a free class Share to Google Classroom- About these notes
- A first period
- The levels
- What students get wrong, and where the app answers it
- Students' own 3D models
- What the app simplifies, on purpose
- Setting it up for a class
- Standards
About these notes
Balancing Robot Lab is a two-wheeled self-balancing robot in a workshop, programmed in Blocks or Python. The robot is sized from a published classroom balancing robot: a 0.6 kg body, 27 cm tall, with its center of mass 12 cm above the axle, on wheels 4 cm across, with that robot's motor numbers. Left alone it falls over in under a second, so it only stays up if the program keeps driving the wheels under it.
All fourteen levels are open. Each adds one idea a real balancing robot needs: how hard to push, how fast it is tipping, where the wheels have gone, a sensor that drifts, a slower loop, a push from the side, a load, a slope. A tilt graph with the motor power under it, a slow-motion replay of the last 3 seconds, and a tuning sheet let students see what their numbers did.
A first period
Levels 1 to 3 are meant to fit in a period, with time to talk about what the number does.
- Watch it fall (about 10 minutes) Open Level 1 and press the round play button or the space bar. The starter program does nothing, and the robot tips over in about 0.7 seconds. Ask the class what the program would have to do to stop it, and listen for an answer like drive the wheels toward the way it is leaning.
- Make it taller (about 5 minutes) Open Robot, then Configurator, make the body taller, press Done and run it again. A taller robot falls more slowly: about 1 second at 54 cm against 0.73 at 27 cm. That is why a broom is easier to balance on a hand than a pencil.
- Catch it (about 15 minutes) Level 2 asks for 3 seconds standing. The rule is if tilt is more than 0, drive forward; otherwise drive backward. It works, and the tilt graph shows it chattering. Ask why it never settles.
- Turn one number (about 15 minutes) Level 3 asks for 10 seconds. Students drive at tilt times a number and change the number. A very small one falls, the middle range stands, and a very large one shakes and falls again. Ask them to find the smallest and the biggest number that still pass.
The levels
Each level opens with a mission box that says what to do. The lines under it say what the robot is doing as it runs, and the result says what happened and what to try next.
| Level | The job | What it is built to show |
|---|---|---|
| 1. Watch it fall | Run the starter at two heights and compare | Unstable on its own; a taller robot falls more slowly |
| 2. Drive toward the fall | Stand for 3 seconds | An if and else in a loop works, and it chatters |
| 3. As hard as it leans | Stand for 10 seconds | Proportional control: too small falls, a big number holds, too big falls again |
| 4. Tilt speed | Caught from 8 degrees, stand 15 seconds, calmly | The tilt speed (the D term) calms what the tilt alone cannot |
| 5. Stay on the mat | Stand 30 seconds within 10 cm of the cross | The wheel speed and distance hold it in place |
| 6. The gyro gives speed | Stand 30 seconds, no perfect tilt sensor | A gyro gives a rate with an error; adding it up drifts unless it is calibrated |
| 7. How often | Stand 15 seconds with a loop every 50 ms | A slower loop needs gentler numbers |
| 8. Lean to go | Drive to a line 1 m ahead and stop on it | To go, it must lean; to lean, it rolls back first |
| 9. Turn | Turn a quarter turn left and hold | Steering on top of balancing |
| 10. The push test | Catch three of five taps, each harder | Saturation: the biggest lean the motors can catch |
| 11. Carry a load | A 400 g box, 3 cm forward, 30 seconds calmly | The balance point moves with the load |
| 12. Ramps and a slippery floor | Up, down and across a slippery patch to a finish line | Leaning into a slope; grip caps the push |
| 13. The delivery | A cup of water over a ramp and a bump and round a corner, under 40 seconds | All of it, with a spill limit |
| 14. Your course | A course the student builds | Testing a controller on a course of their own |
In Python a program starts with from balancer import Robot and robot = Robot(). It reads robot.tilt() in Levels 1 to 5, robot.tilt_speed() in Levels 4 and 5, robot.gyro() and robot.accel_tilt() from Level 6, and robot.distance(), robot.wheel_speed() and, from Level 8, robot.speed(). It acts with robot.drive(percent), robot.steer(percent) from Level 9, robot.stop() and robot.wait(seconds). Blocks make the same calls, and Start from my blocks turns them into the Python.
What students get wrong, and where the app answers it
| What students think | Where the app answers it |
|---|---|
| A balancing robot holds still | Level 2: it never settles. Its tilt graph chatters back and forth, and even a good controller is making constant small corrections. |
| A taller robot is harder to balance | Level 1: it falls more slowly, so it is easier to catch. The configurator shows it with numbers. |
| A bigger gain is always better | Level 3: tilt times 10 falls in about 1.5 seconds, numbers from 80 to 200 stand, and a very large one such as 250 or 400 falls again after about 8 seconds. |
| The lean is all the program needs | Level 4: from 8 degrees the lean alone can only just stand, rocking over a degree. Adding the tilt speed calms it to a few hundredths. |
| If the robot is upright it stays where it is | Level 5: catching a lean rolls the robot away. The wheel terms bring it back, and to roll back it must first lean back. |
| A sensor that reads zero means upright | Level 6: a gyro is wrong by a few degrees a second even at rest. Added up for a minute, 5 degrees a second is 300 degrees. Level 11: a load moves the balance point, so zero is no longer upright. |
| A faster loop never matters | Level 7: with a pass every 50 ms each push lasts five times as long, and the numbers that worked now overshoot. |
| Motors that are strong enough can catch anything | Level 10: the first taps are caught. At the fourth the power graph sits at 100 percent and the lean keeps growing. |
| Motor power is watts | In the app it is the share of the battery's voltage the motor gets, as robot kits say it, so mostly it sets how fast the wheel turns. |
Students' own 3D models
In a saved project, Robot, then Models, lets a student put a 3D model from their Files (a .glb file, or one from the platform library) in the room, up to three, or on the robot. On the robot at 0 grams it is a decoration.
Give it a weight and it is a real load: it moves the balance point, and the program may need new numbers, as in Level 11. In Levels 11 and 13 the level's own load is the weight, and the model takes the place of the box or the cup. A model has to be light enough to draw quickly, under 40,000 triangles, and other people see it only if the file is shared.
What the app simplifies, on purpose
- The robot only tips forward and back, never sideways, and nothing breaks. The padded bumpers end the run when one touches the floor.
- The floor is flat until Level 12, and the battery gives a steady 8 volts.
- The motors are ideal unless Real motors is switched on, which adds a dead zone and makes one motor a little weaker.
- The gyro's error is made up fresh each run, a few degrees a second, and its noise is small. A real board adds more.
- A load's weight is treated as a point at the height of Level 11's box. A tall model's real center would be higher.
- Nobody rides it, and the program does not run on a real robot. The Python is the same shape as the code on a real kit, but not the same code.
Setting it up for a class
No setup is needed. With free accounts, each student's levels, best runs, build, programs and models save as one project. Typed words in a shared project, its name, the robot's name and the program, pass the platform's filter.
Big screen takes the app full screen for a projector. Slower and Speed up change how fast time runs; a program's wait is robot time at any speed. The Slow-motion replay button, or the R key, shows the last 3 seconds at an eighth of the speed, and Tuning sheet under File keeps the build and each level's result in one place.
Standards
- NGSS MS-PS2-2: how the robot's motion changes with the push on it, one variable at a time (height, then gain), with no formula.
- NGSS HS-PS2-1: the tilt graph and the motor graph as data for force and acceleration, and the motor's force limit in Level 10.
- NGSS HS-ETS1-3: trading off height, wheel size, gearing and battery position in the configurator, and judging each build against the same levels.
- CSTA 2-AP-12: a loop that reads a sensor and acts.
- CSTA 2-AP-17 and 3A-AP-15: testing and refining a program against a graph, and choosing numbers because of what the graph showed.
Middle school keeps the formulas out: the story is the graph and the number. High school can add the pendulum model, the motor equation and the role of each term of a PD controller.
More help
Is something on this page wrong or not clear? Write to us.
Page last reviewed November 2026.
Google, Google Classroom and Chromebook are trademarks of Google LLC.