The Rubber Band Gun: a stretched rubber band held on a big gear. A motor turns that gear with a worm. A Touch Sensor is the trigger. Press it, and the gear turns just enough to let the band go.
You have stored energy in rubber before, with the Elastic Car in Lesson 14. You wound that one up by hand and let it go at once. This one has to hold the stretch. It sits there, loaded, with the motor off. Nothing else stops it.
That is the puzzle. A stretched band pulls back very hard. It can spin most sets of gears right round. This one does not move at all. Today you find out why.
In the real world 5 min
Where you have seen it
Most guitars have six of them. The tuning pegs at the top are worm drives. You turn the little key, and the string gets tighter. The string pulls hard, but it cannot turn the key back.
A worm drive. The worm, shaped like a screw, is at the top. It fits into the teeth of the wheel below. Photo: Bernard Spragg. NZ / Wikimedia Commons (CC0).
Why it is built that way
A worm is a gear shaped like a screw. As the screw turns, its ridge pushes the wheel’s teeth along. It moves one tooth for each turn. So one full turn of the worm moves the wheel by just one tooth. That makes the wheel turn very slowly.
Here is the useful part. The ridge meets the teeth almost flat. So if you push the wheel, the ridge just jams tighter. Rubbing stops it moving. The wheel cannot turn the worm, however hard you push.
What would go wrong without it
Think about a lift, a crane, or a car’s steering. All three hold something heavy in place. What if the load could turn the motor backwards? When the power went off, the lift would drop. The crane would swing.
With a worm drive, the machine stays where it is. It needs no power, no brake and no program. For some machines, that is what keeps people safe.
A worm drive is a one-way street. Power goes in through the worm. It cannot come back out through the wheel.
Before you build 1 min
This model has no step-by-step guide. The video below is not one either. It shows a finished Rubber Band Gun working. Watch it to see what you are aiming for. Look closely at how the worm sits against the big gear. Then build from your teacher’s model, or from a photo of a finished one. You are not missing a page. There is no page.
The big idea — the gear that only works one way 6 min
Two normal gears can be turned from either side. A worm and a wheel cannot.
The worm turns the wheel easily. Push the wheel, and the ridge jams. Nothing moves. That is what holds your rubber band.
The wheel turns very slowly, and you can count it. A LEGO worm moves the wheel one tooth per turn. With a 24-tooth gear, that is 24 turns of the motor for one turn of the wheel. That is why your gun winds so slowly and holds so tight.
Gear pair
Can the output drive the input?
Two ordinary gears (Lessons 8, 9 and 11)
Yes. Turn either one, and the other turns.
A worm and a wheel
No. The worm turns the wheel. The wheel cannot turn the worm.
Slow, very strong, and it holds by itself. A worm gives you all three at once.
▶Gearing, and the Touch SensorHow gear ratios work, and the switch this model uses as a trigger. Open either one if it is not clear yet.Show meHide
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.
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.
Say this out loud before you move on: “The worm can turn the wheel. The wheel cannot turn the worm.”
What’s in this build 4 min
Three parts have cables. And you have to tell us which motor it is. This model has no written parts list.
Large Motor
Medium Motor
Which one is in your build? The Large Motor has a big red round end, and its body has steps. The Medium Motor is flat, with a small red bump on its end.
Part
What it is doing here
EV3 Intelligent Brick
Runs the program, and keeps the frame steady.
One motor — you decide which
Turns the worm. It goes in port A. Every program below says A.
Touch Sensor
The trigger. Port 1, as always.
The worm and the big gear (no cable)
The one-way drive. Today’s lesson is about this part.
Prove the worm locks — before you switch anything on
Brick off, and no rubber band on yet. This takes one minute. It is the best minute of the lesson.
Turn the motor by hand. The big gear should creep round very slowly.
Now try to turn the big gear by hand. Push hard. It will not move, and the motor will not turn.
Try harder. It still will not move. Pushing will not break it. The ridge just jams.
Now try two normal gears on another model. They turn from both sides. Feel the difference.
That is the whole lesson, in your hands. The program does not hold the rubber band. The gears do, even with the power off.
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
The motor (turns the worm)
A
When there is just one motor, it goes in A. The programs say A, not the type of motor. The Brick only knows the port.
Touch Sensor (the trigger)
1
Touch is always port 1 in this course.
Check your own build now:
Motor cable in A, sensor cable in 1. A letter and a number.
Does the worm fit well against the gear? It should not be too tight, or slip off the end. If the worm is one stud too far away, it will skip.
Hook the rubber band on and let go. Does it hold? It should not move at all.
Point it at an empty space. Never at a person or a window. Before every run, say out loud where it is pointing.
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.
Put the band on last. Connect the Brick and check the ports before you stretch anything. A loaded gun on the desk can go off if someone bumps the table.
Confirm the connection 2 min
Look at the Brick icon. Is it connected?
Port A shows a motor. Which kind does it say? Check it against section 5.
Port 1 shows a Touch Sensor. Press the red button and watch the number change.
Turn the motor by hand and watch degrees counted go up. See how many degrees it takes to move the big gear a little. That number shows how slow the worm makes it.
Change it and test 8 min
Make one change at a time, and guess what will happen before each run. Keep the firing line clear every time.
Find the smallest number of rotations that still lets the band go. Go down one at a time. When it stops firing, go back up one. That is your number.
Change the speed to 100 %. Will the band fly further? Guess first. It should not. The band’s energy came from your hand when you stretched it. It did not come from the motor.
Now set the speed to 5 %. It still fires. Speed does not matter to a worm drive. It only needs to turn.
Load the band, with the program not running. Push the big gear hard again. It holds. Now say out loud what is holding it.
Add a [A v] run [counterclockwise v] for (2) [rotations v] at the end. It winds the gear back, ready to load again. Does it go back to the same place?
People argue about step 2. Make the motor faster, and the band goes just as far as before. The motor never pushed the band at all. It only got out of the way.
Before you make a machine better, find out what really does the work. Here it is your arm, not the 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.
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.
This is what you are building: the Rubber Band Gun 2.
Make it move 10 min
Four blocks. It is a very short program. It is short because the gears do the hard part.
when program starts :: events hat
[A v] set speed to (30) % :: motors
[1 v] wait until [bumped v] :: sensors
[A v] run [clockwise v] for (2) [rotations v] :: motors
Two turns of the worm move the big gear by two teeth. That is just enough to let the band slip off.
Go through it in the order the Brick runs it:
set speed to 30 % — a setting, not an action. We go slow, because a worm drive is slow anyway. Going faster just makes noise.
wait until bumped — the program stops here. The band stays loaded the whole time this block waits. And nothing in the program is holding it.
run clockwise for 2 rotations — two turns of the motor. That moves the gear only a little, which is just what you want. It is enough to let go, but not enough to whip the gear round.
What success looks like: the machine sits loaded and quiet. A click fires it. The gear stops at once when the motor block ends. It does not roll on or unwind, because the worm will not let it.
If two rotations do not let the band go, add one at a time. Find your own number. If the gear whips round too far, use fewer. Every build hooks the band on a slightly different tooth.
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
Find the smallest release. Start at two rotations. Go down one at a time until the band no longer fires. Then go back up one. Tell us the number. Then prove it works every time. Load and fire five times in a row. Change nothing between them.
Challenge 2
Make it reload itself. After firing, the moving parts must wind back to just the right spot. That is the spot where a new band can hook on. Then the person using it only has to fit the band and press. Show three full rounds. No one may move anything back by hand.
Challenge 3
Prove the worm gear holds. Show it, do not just say it. Load the band. Switch the Brick off fully. Leave the machine for two minutes. It must still be loaded. Then say in one sentence what is holding it. Say why two normal gears could not.
Extra challenge
Build a machine that is safe to leave loaded.
Your gun must sit loaded on a table with no one watching. It must not fire. It must fire only when someone clicks the trigger on purpose. It must give a clear warning before it fires, so nobody gets a shock. Say someone walks past and knocks the table. It must not go off.
Plan on paper before you build. List every way this machine could fire when nobody meant it to. A knock, a nudge, the program starting again, the Brick being switched on. Then decide what stops each one.
Two questions when you show it. What holds the band when there is no power at all? How do you know? And which of your safety steps are in the program? Which are in the moving parts? Which of the two would you trust more?