How Far, Not Just Which Way: The Folding Fan Robot
60 minutes · Ages 7+ · Model: Folding Fan Robot
What you are building 3 min
The Folding Fan Robot: a machine that holds a paper fan and waves it. It fans the air like a person on a hot day.
The Driving Base turned its wheels round and round. So did the Dual Gyro. The Wipers swung out and back, and you gave it a number of degrees. Today you find out what that number means.
This model cannot go round. The fan sits on an arm, and the arm can only go so far. Push past that, and the arm hits the frame. So today the question is not just which way the motor turns. It is how far.
By the end, your robot will fan the air again and again. It will never bang into itself.
In the real world 5 min
Where you have seen it
A folding fan is a row of thin sticks joined at one pin. Paper or silk is stretched across them. People in China and Japan have made fans like this for over a thousand years. In hot places, people still use them every day. You may see one at a wedding, or in the hand of someone waiting outside on a hot afternoon.
Folding fans opened out in a fan dance. All the sticks turn round one pin. Photo: AngMoKio / Wikimedia Commons (CC BY-SA 2.5).
Why it is built that way
A fan does not make air. It moves air that is already there. Sweep something wide and flat to the side, and it pushes air along with it. Moving air takes heat away from your skin. That is why it feels cool.
So we wave a fan back and forth. We do not spin it. One wave pushes the air. The wave back gets ready for the next push. Big, slow waves move more air than small, fast ones. And your hand must turn back before your wrist can bend no more.
What would go wrong without it
Your wrist knows where to stop. A motor does not. This arm can only swing a quarter of a turn. Tell the motor to do a whole turn, and it keeps pulling after the arm hits the frame.
Nothing warns you. The motor whines and the gears click. Then a beam pops off, or a gear tooth breaks. This is the most common way a wrong number breaks a good build.
If a part can only go so far, the movement must stop in time. Saying how far keeps your model in one piece.
The main concept — degrees 6 min
One full turn of a motor is 360 degrees. For a movement smaller than one turn, use degrees.
The motor block has a little menu at the end. In the Wipers, it said degrees. It has three choices.
Block
What it means
[A v] run [clockwise v] for (1) [rotations v] :: motors
One whole turn. Good for wheels, because wheels keep going round.
[A v] run [clockwise v] for (90) [degrees v] :: motors
A quarter of a turn. Good for arms, gates and jaws. These all stop somewhere.
[A v] run [clockwise v] for (2) [seconds v] :: motors
Turn for some time. How far it goes depends on the speed. So it is the least exact of the three.
Learn these numbers by heart: 360° is a full turn, 180° is half, 90° is a quarter, 45° is an eighth. Degrees can go past 360, too. 720 degrees is just two turns.
The program begins. Nothing has turned yet, so both counters read zero.Turning. Watch the two motor counters climb together — they are one movement counted two ways.Exactly 2 rotations, exactly 720°. The big gear has turned only two thirds of a turn.Finished — it will run again in a moment.
stopped
The two motor read-outs are the same measurement — 1 rotation is 360°. Use whichever makes the number easier to read.
Rotations and degrees both measure how far a motor turns. Use rotations when it goes round and round. Use degrees when it stops somewhere.
▶Rotations, degrees, and the Large MotorHow to measure a movement, and all about the motor this model uses. Open it if you are not sure yet.Show meHide
ComponentMotion5 min
Rotations and degrees
There are two ways to tell an EV3 motor how much to move: give it a length of time, or give it an amount of turn. Only the second one is repeatable, and that difference decides whether a machine works reliably or only sometimes.
One rotation means one full turn of this shaft — not one turn of the wheel or gear it drives. Gearing between the two changes how far the mechanism actually moves.
Blocks reference
Block
What it does
[A v] run [clockwise v] for (1) [rotations v] :: motors
One full turn of the motor shaft, then stop. The program waits for it.
[A v] run [clockwise v] for (180) [degrees v] :: motors
Half a turn. 360 degrees is one rotation.
Count it as it turns
The counters below tick up in step with the shaft, so you can watch a rotation being counted rather than take it on trust.
The program begins. Nothing has turned yet, so both counters read zero.Turning. Watch the two motor counters climb together — they are one movement counted two ways.Exactly 2 rotations, exactly 720°. The big gear has turned only two thirds of a turn.Finished — it will run again in a moment.
stopped
The two motor read-outs are the same measurement — 1 rotation is 360°. Use whichever makes the number easier to read.
Rotations or degrees?
Notice that the two motor counters finish together: 2.00 rotations and 720° are the same instant, because they are the same measurement in different units. So pick whichever makes the number easier to read. A winch that needs eight full turns is clearest in rotations. A gate that lifts a quarter turn is clearest in degrees — 90 rather than 0.25.
Gearing changes the answer
The third counter is the one that catches people out. The block counts turns of the motor, not of the thing it drives — and the gear in the demo is three times the size, so two motor rotations move it only 0.67 of a turn. Ask for two rotations and the mechanism does not move two rotations’ worth unless the gearing is one to one.
That is why a number that works on one build has to be retuned when the gearing changes — the program is right, the mechanism is different.
Why it matters
A printer feeds paper an exact distance; a lift stops level with the floor; a robot arm returns to the same place a thousand times. None of that is possible by timing a motor — they all count turns.
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.
Say this back before moving on: “A whole turn is 360 degrees, so if I want less than a turn I ask for degrees.”
What’s in this build 4 min
Look at your model. Find everything with a cable. There should be two electronic parts. Can you name them both?
Part
What it is doing here
EV3 Intelligent Brick
Runs the program and powers the motor. It is also the heaviest part. Its weight stops the robot shaking itself off the table as it fans.
Large Motor
Swings the arm that holds the fan. Check yours. The Large Motor has a big red round end, and slots along its body.
Find the limit before you power anything
These are the most important two minutes in the lesson. Keep the Brick switched off.
Gently turn the fan arm by hand, one way, until it stops. Do not force it.
Now turn it gently the other way until it stops again.
The swing between the two stops is all your motor is allowed to do. Look at it. Is it about a quarter of a circle? Less? More?
Write your answer in degrees. A guess is fine. You will test it soon.
Never find the limit with the motor. Find it with your fingers. You can feel when the arm gets stuck, and stop. The motor cannot feel anything, so it will not stop.
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 (swings the fan arm)
A
When there is only one motor, it goes in A. Every program on this page says A. If yours is in another port, move the cable. Do not change all the blocks.
Sensors
none
This model has none. All four numbered ports stay empty today.
Check your own build now:
Motor cable in port A — a letter, not a number.
Before you start, put the arm about in the middle of its swing. If it starts at one end, the first movement has nowhere to go.
Is the fan clipped on tightly? If the fan flies off, a pin is loose. The program is not the problem.
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.
Two things go wrong in every class. First, the Brick goes to sleep while you build. Wake it up and try again. Second, someone connects to the group behind them, because both Bricks are called EV3. Give yours a new name.
Confirm the connection 2 min
A plugged-in cable does not mean the Brick is connected. Look at the screen, not the cable.
Check the Brick icon: connected, or not.
Check the port tiles. A motor on A, and nothing on 1, 2, 3 or 4.
The tile should say Large Motor. If it says Medium, you have the wrong motor. Go back to section 5.
Swing the fan arm by hand. Watch the degrees counted change on the tile. Swing it from one end to the other, and read the number. Now you know your swing in degrees. You measured it, not guessed it.
Step 4 gave you the number you need for the rest of the lesson. Write it down.
Change it and test 8 min
Change one thing at a time, and predict before each run. Predict means guess what will happen. A wrong guess teaches you something. Just watching teaches you nothing.
Change both degree numbers to 90. Predict: more breeze, or less? Then check. Does the arm still stay away from the ends?
Now make them 20. The fan only wobbles. A small wave moves very little air, even when it is fast.
Put the degrees back, and change the speed to 15 %. Same distance, but slower. Time six waves with the clock on the wall.
Now try speed 100 %. Predict: will it move more air, or just make more noise? Hold your hand in front to find out.
The unfair test: change the second block to 50 degrees. Leave the first at 60. Run it. Where is the arm after six waves?
Remember step 5. Each wave goes out 10 degrees more than it comes back. Six waves make 60 degrees, so the arm creeps into the frame. Out and back must match. Anything that must return to where it started needs this.
This is what you are building: the Folding Fan Robot.
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.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
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
- When Up Button is pressed, the motor turns clockwise.
- When Down Button is pressed, the motor turns counterclockwise.
- When Center Button is pressed, the motor stops.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Log in to see hints.
Challenge 2
Create a variable named "speed"
- Set speed to 0.
- When Left Button is pressed, clear display, decrease speed by 5, play "Speed down" sound, limit minimum speed to -100, and display current speed.
- When Right Button is pressed, clear display, increase speed by 5, play "Speed up" sound, limit maximum speed to 100, and display current speed.
- When Center Button is pressed, start motor using "speed" as the motor speed.
- When Center Button is released, stop motor.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Log in to see hints.
Challenge 3
Create a variable named "speed"
- set the speed to 10 (start from the speed 10%)
When the center button is pressed, clear display and start a continuous loop:
- start motor using speed as the motor speed.
- display current speed on screen
- increase speed by 10 and play a beep sound every 1 second.
- if speed goes above 100, it will play a sound "three", "two", "one", stop motor and stop and exit the program.
Fullscreen it while you build — you can pause and scrub with the player's own controls.
Log in to see hints.
Extra challenge
Build and modify make the fan become 2 direction fans
The program, block by block
Motor A · Speed not set · Sensors none
What it does
Holding the centre button runs motor A clockwise. Letting go stops it. Two stacks share
the one button: one listens for pressed, the other for released.
Worth noticing
No speed block. The program never sets a speed, so the motor runs at its default
speed. Challenge 2 is where the speed becomes a choice.
Start, not run for.Start motor keeps turning until something stops it. That is why
the motor runs for as long as the button is held.
The released stack is the brake. Without it, the motor never stops.