Skip to content
Tactiverge

Tactiverge BuildBUILD 003

Create an Intelligent Sorting Machine

A conveyor belt carries a jumble of red, blue and metal parts past three sensors, and one sensor sometimes lies. Can you design the logic that still drops every part into the right bin?

Start buildingWatch first60 min · browser only · free

Live build-along: not scheduled yet. Everything here works on your own, any time.

Why it matters

Sorting machines decide what happens to parcels, recycling, fruit and factory parts, often far faster than a person could look. Recycling plants, for example, use optical sensors and puffs of air to separate materials. Every one of those machines rests on the same idea: measure, turn the measurement into a decision, and act on it, reliably, millions of times.

Your objective: Design the decision logic for a virtual sorting machine: turn sensor readings into yes/no signals, write the rules as truth tables and logic gates, and make the machine tolerate one faulty sensor.

  1. 1.

    The belt

    Parts arrive one at a time. The machine has a fraction of a second to decide about each one.

  2. 2.

    The sensors

    Three colour sensors, a light gate that times how long each part blocks a beam, and a metal detector. Each reading is a little bit noisy.

  3. 3.

    The threshold

    A number becomes a yes or no by comparing it with a threshold. Parts close to the threshold are where mistakes happen.

  4. 4.

    The logic

    AND, OR and NOT combine the yes/no signals into one decision: which bin?

  5. 5.

    The flap

    A diverter flap acts on the decision. If the logic is wrong, the flap is confidently wrong too.

Watch (optional, short)

Hand-picked explainers from their creators. Each one has a reason to watch it. Skip them if you’d rather just build.

Introduces AND, OR, NOT and XOR, the building blocks behind every digital decision a computer makes.

10 min 7 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

Builds real logic gates from transistors on a breadboard, linking abstract logic to actual electronics.

13 min 1 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

Detailed animations follow light through the lens onto the image sensor's pixels, then show how it becomes a digital photo.

14 min 20 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

The engineering you’ll use

Thresholding

Compare a reading with a threshold to get a bit: 1 if it is above, 0 if not. Choosing the threshold is a design decision.

bit = 1 if reading ≥ threshold, else 0

Truth tables

List every combination of inputs and the output you want. With n yes/no inputs there are 2ⁿ rows, so three sensors give 8 rows.

rows = 2ⁿ

Logic gates

AND is 1 only when every input is 1; OR is 1 when at least one is; NOT flips. Any rule in a truth table can be built from these.

red bin = R AND NOT L AND NOT M

Averaging and speed

A sensor that averages n noisy samples cuts its noise by √n. A faster belt gives it less time to look at each part, so fewer samples and noisier readings: throughput against accuracy.

σ_avg = σ / √n, n = sample rate × window ÷ belt speed

Majority voting

Three sensors check the same thing. If at least two say yes, believe yes. One faulty sensor can no longer fool the machine.

Y = (A·B) + (B·C) + (A·C)

Errors have two kinds

A false positive sends a part to a bin it does not belong in; a false negative misses one that does. Moving the threshold trades one kind for the other.

accuracy = correct decisions / all decisions

Connects to: Thresholding and simple classification · Logic gates and Boolean algebra · Digital input and output · How sensors measure · Measurement error and uncertainty · Analog-to-digital conversion · Decisions and loops · Evaluation metrics · Testing and debugging

Same machine. Five ways in.

Pick the level that feels like a stretch, not a wall. You can switch any time, and your work saves to your Workshop.

□ Systems Engineer · Survive a lying sensor

Glare makes colour sensor C1 read 100 on 30% of parts. Build a voting circuit from at most five AND/OR gates that no single sensor can fool, calculate how often a majority of three is wrong when each sensor is wrong 10% of the time, and explain when voting would not help.

You’ll make: A voting circuit that passes the glare test on every sensor, a correct probability and a 30-word explanation, checked on the server.

Checked instantly on our server

A sensor is lying. Sunlight from a window puts glare on colour sensor C1: 30% of the time it reads 100 whatever it is looking at. Three colour sensors look at every part. Design the logic that decides R from C1, C2 and C3 so that any single lying sensor can't change the decision. We test it with the glare on each sensor in turn.

Voting circuit · AND and OR only · up to 5 gates

Every gate input and the output need a wire.

Your circuit's truth table
C1C2C3R
000?
001?
010?
011?
100?
101?
110?
111?
C1C1 says redC2C2 says redC3C3 says redGate says largeDetector says metalRed0Metal0Mixed0Reject0

100 parts, shown at 4× speed.

Accuracy
43.0%
Parts / min
120
Colour noise
±6.0
Wrong in Red
0

Latest parts past the sensors

  • Run the belt to see readings.
Colour sensor C1 readingsthreshold 69
0100

■ red parts ■ orange caps ■ everything else

Light gate lengthsthreshold 65 mm
20120
Your machine
0.3 of parts

How often the faulty sensor reads 100 whatever it sees.

1
Rule table (from Level 2)
Rule table: one bin for each combination of red (R), large (L) and metal (M)
RLMSend to
000
001
010
011
100
101
110
111

At the live build-along

60 minutes, building together

Team challenge
Teams of three get the same conveyor, the same brief and the same noisy sensors. Each team finds settings that sort at least 96% of parts at 120 parts per minute, then explains the one decision that made the biggest difference. No leaderboard: every team that gets there explains how.
Your own design
On your own: push the belt as fast as you can while staying above 96% on the unseen batches. Write down what you traded away, and which wrong bin worries you most.
Questions
Moderated questions in the live room. Questions are answered on screen without names, and chat stays off.
Extension
Add a fifth bin: 'unsure', for parts whose colour reading sits very close to the threshold, so a person checks them. Which parts would land there, and what does it cost the client in staff time?
You leave with
A saved rule table, tuned machine settings with their accuracy on unseen batches, a working voting circuit and a written explanation of false positives and false negatives, stored in your Workshop and counted toward your Passport.

For educators & facilitators

A complete run of show, misconceptions, safety notes and a printable worksheet.

Open the facilitator guide

Safety: Browser simulation and paper design only. Never put hands near a real conveyor, diverter or factory machine, and never open sensor housings or mains-powered equipment. Any physical extension needs an adult's safety review and supervision before anyone starts.

Go further

Tell the people who built this

Optional. We’re students too, and we change things because of what you say.

Please don’t include your name or anything personal. Nothing you write is shown publicly.

Next build · 004Design a Robotic Gripper