The Timber Saw Machine: a bench saw with a spinning blade, geared up off one Large Motor so it turns far faster than the motor does. It will cut clean through paper.
Which makes it the first model in this course that is genuinely a bit dangerous — not to you, but to anything you feed it. And that changes the question the lesson has to answer.
Up to now, starting a machine has meant clicking a button on a screen, or pressing the buttons on the Brick itself. Today you will add a switch of your own and put it wherever you like, because the one place a stop button must never be is on the dangerous end of the machine.
In the real world 5 min
Where you have seen it
A sawmill turns trees into planks. A log goes in one end on a moving carriage, a blade the height of a person cuts along its length, and square timber comes out. Malaysia has run mills like this for well over a century, first for rubberwood and hardwood, now mostly for plantation timber.
Two circular blades cutting a log in a sawmill. Photo: James Skitt Matthews / City of Vancouver Archives (Public domain).
Why it is built that way
A saw blade does not cut by pushing hard. It cuts by having lots of small teeth arrive very quickly, each taking a sliver. So a saw needs speed at the blade above everything else.
The motor does not turn nearly fast enough on its own, so the machine gears up: a big gear driving a small one makes the small one spin faster. You met this trade with the Gear Shooter — speed bought with force. A saw is the machine that wants that trade in exactly this direction.
What would go wrong without it
Now think about stopping one. If the only switch is next to the blade, then every time something goes wrong a person has to reach towards the danger to make it stop. That is how people lose fingers, and it is why real machines have big red stop buttons placed away from the cutting, low enough to hit with a knee, and often several of them around one machine.
A machine you have to reach into to switch off is badly designed. The control belongs where the person is, not where the danger is.
One part the manual does not mention 3 min
The instruction manual builds the saw without a sensor. You are going to add one. Work through every page of the manual first and get the saw finished and turning. Then come back here: there is no page missing, and you have not skipped a step — the Touch Sensor is this lesson’s own addition, and mounting it is part of the work.
Once the saw itself is built:
Find a Touch Sensor — the one with the red button on the front.
Mount it on the frame as far from the blade as you can reach, facing outwards so the red button is easy to press without leaning over the machine.
Two pins through the sensor’s mounting holes into any beam will hold it. It does not need to be neat. It needs to be firm — a switch that wobbles when you press it is a switch that sometimes does not press.
Leave the cable for now. Section 6 says which port it goes in, and why.
The main concept — the Touch Sensor 6 min
The Touch Sensor is a button on a cable. That is genuinely all it is — and being on a cable is the entire point, because it means the button does not have to live on the Brick.
released
pressed
The same sensor, twice. Out and in — those two positions are the whole of what it can tell the Brick.
It reports one thing, and it is never unsure. But one press of a button is really three different moments, and EV3 lets you ask about each of them.
Block
Waits for
[1 v] wait until [pressed v] :: sensors
The moment the button goes down. Still true while you keep holding it.
[1 v] wait until [released v] :: sensors
The moment it comes back up.
[1 v] wait until [bumped v] :: sensors
Down and up — one complete click. This is what “press the button once” actually means.
The difference sounds like fussing over words. It is not, and the demo below shows why: a program asking is it pressed? gets a “yes” hundreds of times from a single ordinary press, because a finger stays on a button far longer than a computer takes to look at it.
when program starts
forever
if 1 is pressed? then
change count by 1
versus two hat blocks
1 when pressed
1 when bumped
0is pressed? in a loop0when pressed0when bumped
In a loop: 0 answers from one pressBumped: exactly one
Nobody is touching the sensor. All three programs are watching it.A finger presses the button. Watch the red button go in — a couple of millimetres is the sensor's entire movement.The finger is still down. The loop checking «is pressed?» has already run hundreds of times, and every one of them counted.The finger lifts. Only now does «bumped» count, because bumped means pressed AND released.One press. Three completely different answers.Finished. The same press, counted three ways.
released
The middle counter is the one that surprises people. Nothing is wrong with it — a loop really does check that fast, and every check really is a separate answer.
For “click once to make something happen”, use bumped. Pressed fires the instant the button goes down and keeps being true — so the next thing waiting for a press gets it from the same finger.
▶The Touch Sensor, and gearing upThe full reference for the sensor, and for the gear train that makes this blade spin fast. Open either if it is not clear yet.Show meHide
ComponentSensing5 min
The Touch Sensor
The Touch Sensor is the simplest input the EV3 has: a button that is either pressed or not. That sounds trivial, but it is how a robot knows it has hit a wall, reached the end of a track, or been told to start by a person.
released
pressed
The red button out, and the same sensor with it pushed in. These two states are the entire output of this sensor — there is nothing in between.
Blocks reference
Block
What it does
wait until <[1 v] is pressed? :: sensors>
Holds the program here until somebody presses the sensor.
<[1 v] is pressed? :: sensors>
Reports true or false. Drop it into a condition to make a decision rather than a wait.
[1 v] when [bumped v] :: events hat
Starts a whole stack of its own. The dropdown chooses the moment: pressed, released or bumped.
Three different events
A button is not only “pressed”. One press is three things: the moment it goes down, the time it stays down, and the moment it comes back up. Watch what a single press does to three programs at once.
when program starts
forever
if 1 is pressed? then
change count by 1
versus two hat blocks
1 when pressed
1 when bumped
0is pressed? in a loop0when pressed0when bumped
In a loop: 0 answers from one pressBumped: exactly one
Nobody is touching the sensor. All three programs are watching it.A finger presses the button. Watch the red button go in — a couple of millimetres is the sensor's entire movement.The finger is still down. The loop checking «is pressed?» has already run hundreds of times, and every one of them counted.The finger lifts. Only now does «bumped» count, because bumped means pressed AND released.One press. Three completely different answers.Finished. The same press, counted three ways.
released
The middle counter is the one that surprises people. Nothing is wrong with it — a loop really does check that fast, and every check really is a separate answer.
Nothing there is broken. A loop really does get round hundreds of times a second, and each time it asks is pressed? the honest answer is still yes — so if that loop plays a sound or counts something, it does it hundreds of times from one finger. The two hat blocks each fire once, and they fire at different moments: pressed the instant the button goes down, bumped only when it comes back up.
The three options, and what each is for:
Pressed — the button is down right now. Good for “hold to run”.
Released — it is up again. Good for acting when somebody lets go.
Bumped — pressed and released. This is what you want for “click to start”, because it will not fire repeatedly while a finger stays down.
The classic bumper
when program starts :: events hat
set movement motors to [B v] and [C v] :: movement
start moving [straight: 0] :: movement
wait until <[1 v] is pressed? :: sensors>
stop moving :: movement
The robot drives until something presses the sensor. Note that the movement is started unmeasured on purpose — the sensor decides when to stop, not a distance.
Why it matters
Touch sensors are everywhere in machines you cannot see into: a lift knows the doors are shut, a printer knows the lid is closed, a washing machine will not spin until it is latched. They are safety devices as much as inputs.
ComponentMechanics5 min
Gearing up and gearing down
Two meshed gears are a bargain. Whatever one of them gains in turns it loses in force, and whatever it loses in turns it gains in force. There is no arrangement of gears that gives you more of both, and no amount of building will find one.
The ratio is the teeth
Count the teeth on the gear you are turning (the driver) and the teeth on the one being turned (the follower). That is the whole calculation:
turns out = turns in × driver teeth ÷ follower teeth
An 8-tooth gear driving a 24 gives ⅓ of a turn out for every turn in — and three times the turning force. Turn the pair round and you get three turns out and a third of the force. Count the turns yourself below.
0.00turns in0.00turns out×3turning force
strongerslowerslow and strong — a lifting winch
Two gears, meshed. The one on the left is being turned; the one on the right is along for the ride.Watch the two counters. They are not climbing at the same rate.Whatever the follower loses in turns, it gains in force — and whatever it gains in turns, it loses in force. There is no setting that gives you both.Finished. Count the turns again with a different pair and the trade goes the other way.
stopped
The number of teeth is the whole story. 8 teeth driving 24 means 8 ÷ 24 of a turn out for every turn in — and the force changes by exactly the opposite amount.
Gearing down, gearing up
Arrangement
Turns
Force
What it is for
Gearing down — small driving large
fewer
more
winches, lifts, robot arms, anything that has to move a weight
Gearing up — large driving small
more
less
fans, spinners, launchers, wheels on a light fast robot
1 : 1 — same size
same
same
moving the drive to a different axle, or fixing a direction
The names are worth getting right because they are backwards from what people expect: gearing down makes the output slower, not smaller, and it is the setting that makes a weak motor able to lift things.
Gear trains
Put several pairs in a row and the ratios multiply. Two 1:3 reductions in series give 1:9 — which is how a Medium Motor ends up able to raise something it could never shift directly. This is also how a gearbox with a sensible number of parts reaches a ratio that a single pair never could: a 40-tooth gear driven by an 8 is 1:5, and doing it twice is 1:25.
Only the first and last gear affect the ratio. Anything in the middle passes the motion along and changes nothing but the direction — which is a whole idea of its own, in Changing the direction of a turn.
What it costs
Every mesh loses a little to friction, so a long train is less efficient than a short one. Gearing down far enough to lift a heavy load also makes the mechanism slow, and slow is not always acceptable. And a gear train that is geared down hard is very hard to turn backwards by hand, which is either a useful brake or a nuisance depending on what you are building.
Why it matters
A bicycle is the same idea with a chain instead of teeth in mesh: the low gear that gets you up a hill is turning the back wheel slowly and pushing hard, and the high gear you use going downhill does the opposite. Cars, drills, cranes and clocks are all making the same trade.
Say this back before moving on: “Bumped means the button went down and came back up again.”
What’s in this build 4 min
Three electronic parts today — one more than any model you have built so far.
Part
What it is doing here
EV3 Intelligent Brick
Runs the program and forms the base of the machine.
Large Motor
Drives the gear train. Strong rather than fast — the gears will turn its strength into the blade’s speed.
Touch Sensor
The start and stop switch. Added by you in section 3, not by the manual.
Count the gearing yourself
The blade spins faster than the motor, and you can work out how much faster without any maths you have not already done.
Find the gear on the motor and the gear on the blade. Count the teeth on each — mark a starting tooth with your fingernail so you know where you began.
Turn the motor gear one full turn by hand and count how many turns the blade makes.
Big gear driving small gear means the small one spins more times. Is your blade making two turns per motor turn? Three?
Whatever number you got is what you have traded away in force. The blade spins that many times faster and pushes that many times less hard.
Ports — and the rule 4 min
Sensors go in ports 1, 2, 3, 4. Motors go in ports A, B, C, D. They are not interchangeable, and nothing will tell you politely if you swap them.
Today is the first time that rule has anything to bite on. Every model up to now had only motors, so there was no way to get it wrong. Now you have one of each.
Part
Port
Why this one
Large Motor (drives the blade)
A
A single working motor takes A, as it has all course.
Touch Sensor (start/stop)
1
Touch is always port 1 in this course. Keeping the same sensor on the same port every time means a program written by one group runs on another group’s robot.
Check your own build now:
Motor cable in A. A letter.
Touch Sensor cable in 1. A number.
Press the red button with your finger. It should click and spring back. If it feels mushy, it is mounted against something — move it.
Stand where you would stand to use the machine. Can you reach the button without putting a hand near the blade? If not, move the sensor. That is the whole reason it is on a cable.
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.
Do not run this one untethered until it works. A machine with a spinning blade is one you want to be able to stop from the computer as well as from the button, at least until you trust your own program.
Confirm the connection 2 min
This is the first lesson where the port tiles have something interesting to say, so read them properly.
Check the Brick icon: connected, or not.
Port A should show a Large Motor.
Port 1 should show a Touch Sensor. If port 1 is empty, the cable is in a letter port — the software will not see a sensor there, whatever you plug in.
Now press and hold the red button and watch the port 1 tile. The reading flips while you hold it, and flips back when you let go. You have just watched the sensor work, before a single block ran.
If the tile does not change when you press the button, stop here. Nothing you write will work, and it is a cable, not a bug.
Make it move 10 min
Six blocks. Wait for a click, run the saw, wait for another click, stop. Clear the table around the blade before you run it.
when program starts :: events hat
[A v] set speed to (85) % :: motors
[1 v] wait until [bumped v] :: sensors
[A v] start motor [clockwise v] :: motors
[1 v] wait until [bumped v] :: sensors
[A v] stop motor :: motors
One click starts the saw and the next one stops it — and the blade keeps spinning in between, because nothing tells it not to.
Walk it in the order the Brick runs it:
set speed to 85 % — nothing moves. A saw wants speed, and the gearing will add more on top.
wait until bumped — the program stops dead here. It will sit for as long as you like. Nothing happens until a finger presses and lifts.
start motor clockwise — the blade spins up. Note this is start motor, not run for: there is no ending built in, so it keeps going while the program moves on.
wait until bumped — a second click. Meanwhile the saw is running.
stop motor — and it stops.
What success looks like: the machine sits silent until you click. Then the blade spins and keeps spinning, however long you leave it. Click again and it stops. Feed it a strip of paper while it runs and it should cut straight through.
Why bumped and not pressed? Try it: change both blocks to pressed and run it. One press starts the saw and instantly stops it again, because your finger is still down when the program reaches the second block — so the second wait is already satisfied. Change them back.
Change it and test 8 min
One change at a time, and predict before each run. Keep your hands clear of the blade on every run.
Set the speed to 30 %. Try cutting a strip of paper. Predict first: will a slow blade cut, tear, or just push the paper along?
Back to 85 %, and this time cut a folded strip — two layers. Does the blade slow down as it bites? That is the force you traded away for speed, showing up.
Swap stop motor for a set speed to (30) % followed by stop motor. Predict whether the blade stops any more gently. Then watch how long it freewheels after the stop — a heavy blade does not stop when the motor does.
Change the direction to counterclockwise. Try the paper again. Does it still cut, or does it now push the paper away?
The one that matters: while the saw is running, hold the button down for a long five seconds instead of clicking. Does it stop when you press, or when you let go? Now you know exactly what bumped means.
Step 3 is the one worth remembering beyond this lesson. The program said stop and the machine did not stop — the blade is heavy and spinning fast, and it takes time to run down. Real machines are the same, which is why you never reach in the moment after switching off.
This is what you are building: the Timber Saw Machine.
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.
Use the viewer's own controls to zoom and turn pages. 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 & mission 27 min
Work through the challenges in order — each is harder than the last. The mission comes after all three, and it is meant to make you plan before you build.
Challenge 1
Make the machine say what it is doing. The screen must read STOPPED while the blade is still and RUNNING while it spins, changing at the same moment the blade does. Somebody standing back from the machine should be able to tell from the screen alone whether it is safe to approach.
Challenge 2
Build a hold-to-run switch. The saw must spin only while the button is actually held down, and stop the instant it is released. This is a real safety design, used on machines where letting go must always mean stop. You will need a different option in the dropdown than the one the lesson used, and you will need to say which and why.
Challenge 3
Make it hard to start by accident. Your saw must refuse to spin up unless the button is clicked twice deliberately, so that a bag knocking the switch cannot start it. Then explain, in one sentence, what an accidental single knock does to your machine now, and what it did before.
Mission
Design the whole safety system, not just the switch.
Your saw must be operable from start to finish without a hand ever going near the blade. It must announce what state it is in, warn before it spins up, run until it is deliberately stopped, and be stoppable at any moment — including while it is running and including immediately after it has started.
Plan on paper before you build, and plan the sensor's position as carefully as the program. Where does the operator stand? Can they reach the switch from there? Is there anywhere the machine can be while the screen says something untrue?
Two questions when you demonstrate it. Show us a moment where your machine could be stopped and one where it could not — and if there is no such moment, prove it. And why is a switch on a cable safer than the buttons on the Brick, given that both of them work?